@@ -51,7 +51,7 @@ class PlayerViewController: UIViewController {
5151 style: . plain,
5252 target: self ,
5353 action: #selector( showEqualizer) )
54-
54+
5555 tableView. translatesAutoresizingMaskIntoConstraints = false
5656 tableView. delegate = self
5757 tableView. dataSource = self
@@ -92,20 +92,21 @@ class PlayerViewController: UIViewController {
9292
9393 @objc private func addNowPlaylistItem( ) {
9494 let controller = UIAlertController ( title: " Add new item " , message: " " , preferredStyle: . alert)
95- controller. addTextField { ( textField) in
95+ controller. addTextField { textField in
9696 textField. placeholder = " Insert url here "
9797 }
98- let saveAction = UIAlertAction ( title: " Save " , style: . default) { [ viewModel] action in
98+ let saveAction = UIAlertAction ( title: " Save " , style: . default) { [ viewModel] _ in
9999 if let textfield = controller. textFields? . first,
100- let text = textfield. text {
100+ let text = textfield. text
101+ {
101102 viewModel. add ( urlString: text)
102103 }
103104 }
104105 let cancelAction = UIAlertAction ( title: " Cancel " , style: . cancel, handler: nil )
105106
106107 controller. addAction ( saveAction)
107108 controller. addAction ( cancelAction)
108- self . present ( controller, animated: true , completion: nil )
109+ present ( controller, animated: true , completion: nil )
109110 }
110111}
111112
@@ -149,14 +150,13 @@ extension PlayerViewController: UITableViewDelegate {
149150 }
150151}
151152
152-
153153final class PlaylistTableViewCell : UITableViewCell {
154- override init ( style: UITableViewCell . CellStyle , reuseIdentifier: String ? ) {
154+ override init ( style _ : UITableViewCell . CellStyle , reuseIdentifier: String ? ) {
155155 super. init ( style: . subtitle, reuseIdentifier: reuseIdentifier)
156156 }
157157
158158 @available ( * , unavailable)
159- required init ? ( coder: NSCoder ) {
159+ required init ? ( coder _ : NSCoder ) {
160160 fatalError ( " init(coder:) has not been implemented " )
161161 }
162162}
0 commit comments