1
1
import ArtistFeatureInterface
2
2
import BaseFeature
3
3
import DesignSystem
4
- import KeychainModule
5
4
import Localization
6
5
import LogManager
7
6
import NeedleFoundation
@@ -21,7 +20,6 @@ public final class ArtistViewController:
21
20
22
21
@IBOutlet weak var collectionView : UICollectionView !
23
22
@IBOutlet weak var activityIndicator : NVActivityIndicatorView !
24
- @IBOutlet weak var easterEggButton : UIButton !
25
23
private let retryWarningView = WMRetryWarningView (
26
24
description: LocalizationStrings . unknownErrorWarning,
27
25
retryButtonTitle: LocalizationStrings . titleRetry
@@ -79,15 +77,6 @@ public final class ArtistViewController:
79
77
. bind ( with: self ) { owner, _ in
80
78
let offsetY : CGFloat = owner. collectionView. contentOffset. y + STATUS_BAR_HEGHIT( )
81
79
owner. translucentView. alpha = min ( max ( offsetY / owner. translucentView. frame. height, 0 ) , 1 )
82
- owner. easterEggButton. isHidden = owner. collectionView. contentOffset. y > 10
83
- }
84
- . disposed ( by: disposeBag)
85
-
86
- easterEggButton. rx. tap
87
- . bind ( with: self ) { owner, _ in
88
- owner. showTextInputAlert { id in
89
- owner. postNotification ( id: id ?? " " )
90
- }
91
80
}
92
81
. disposed ( by: disposeBag)
93
82
}
@@ -228,64 +217,3 @@ extension ArtistViewController: UIGestureRecognizerDelegate {
228
217
return false
229
218
}
230
219
}
231
-
232
- #if DEBUG || QA
233
- #warning("🎉:: 디버그용 이스터에그")
234
- private extension ArtistViewController {
235
- func showTextInputAlert( completion: @escaping ( String ? ) -> Void ) {
236
- let alertController = UIAlertController (
237
- title: " 푸시발송 " ,
238
- message: " songID를 입력하세요. " ,
239
- preferredStyle: . alert
240
- )
241
-
242
- alertController. addTextField { textField in
243
- textField. placeholder = " songID를 입력하세요. "
244
- }
245
-
246
- let okAction = UIAlertAction ( title: " OK " , style: . default) { _ in
247
- let textField = alertController. textFields? . first
248
- let inputText = textField? . text
249
- completion ( inputText)
250
- }
251
-
252
- let cancelAction = UIAlertAction ( title: " Cancel " , style: . cancel, handler: nil )
253
- alertController. addAction ( okAction)
254
- alertController. addAction ( cancelAction)
255
-
256
- present ( alertController, animated: true , completion: nil )
257
- }
258
-
259
- func postNotification( id: String ) {
260
- let urlString = " U5l/gXs0ZmvBbJC8Lj4REKUhMpiYZByzM3MgyVD4Bk+LR+6IMoZBaEDwQB47DcpH "
261
- guard let url = URL ( string: AES256 . decrypt ( encoded: urlString) ) else {
262
- return
263
- }
264
-
265
- var request = URLRequest ( url: url)
266
- request. httpMethod = " POST "
267
- request. setValue ( " application/json " , forHTTPHeaderField: " Content-Type " )
268
-
269
- let keychain = KeychainImpl ( )
270
- request. addValue ( " bearer \( keychain. load ( type: . accessToken) ) " , forHTTPHeaderField: " Authorization " )
271
-
272
- let parameters : [ String : String ] = [
273
- " page " : " songDetail " ,
274
- " songId " : id
275
- ]
276
-
277
- if let bodyData = try ? JSONSerialization . data ( withJSONObject: parameters, options: [ ] ) {
278
- request. httpBody = bodyData
279
- }
280
-
281
- let task = URLSession . shared. dataTask ( with: request) { _, response, error in
282
- if let error = error {
283
- LogManager . printDebug ( " Error: \( error. localizedDescription) " )
284
- return
285
- }
286
- LogManager . printDebug ( " response: \( String ( describing: response) ) " )
287
- }
288
- task. resume ( )
289
- }
290
- }
291
- #endif
0 commit comments