Skip to content

Commit

Permalink
SwiftLint: Trailing closure warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sitomani committed Oct 7, 2023
1 parent 86b158f commit dc3b049
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 185 deletions.
2 changes: 1 addition & 1 deletion 4champ.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
454F520F21610F83007011F3 /* ComposerCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ComposerCell.xib; sourceTree = "<group>"; };
455CC0A52104A0E20094A5D3 /* SwiftyBeaver.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftyBeaver.framework; path = Carthage/Build/iOS/SwiftyBeaver.framework; sourceTree = "<group>"; };
4569AC8A21628C70000EDFDC /* UISearchBar+ActivityIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UISearchBar+ActivityIndicator.swift"; sourceTree = "<group>"; };
456E6F2D240A5FAF0034BDA2 /* PlaylistView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaylistView.swift; sourceTree = "<group>"; };
456E6F2D240A5FAF0034BDA2 /* PlaylistView.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = PlaylistView.swift; sourceTree = "<group>"; tabWidth = 2; };
45855FC624444C9B0079C767 /* ampplayer.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ampplayer.entitlements; sourceTree = "<group>"; };
45855FC8244467420079C767 /* DownloadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadView.swift; sourceTree = "<group>"; };
45855FCA244475050079C767 /* DownloadHostingController.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = DownloadHostingController.swift; sourceTree = "<group>"; tabWidth = 2; };
Expand Down
40 changes: 20 additions & 20 deletions 4champ/Scenes/DownloadView/DownloadView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,46 +41,46 @@ struct DownloadView: View {
ProgressBar(value: $store.model.progress)
.frame(height: 4)
.padding(EdgeInsets(top: 5, leading: 15, bottom: 5, trailing: 15))

Text(store.model.summary)
.padding(EdgeInsets(top: 5, leading: 15, bottom: 0, trailing: 15))
.foregroundColor(.black)

HStack {
if store.model.error == nil &&
(store.model.importType == .universalLink ||
(store.model.importType == .documentLink && store.model.importIds.count > 0)) {
(store.model.importType == .documentLink && store.model.importIds.count > 0)) {
Button(action: {
self.store.play()
}) {
Text("DownloadView_Play")
}.frame(maxWidth: .infinity, minHeight: 50).padding(5).contentShape(Rectangle())
.disabled(self.store.model.progress < 1.0)
self.store.play()
}, label: {
Text("DownloadView_Play")
}).frame(maxWidth: .infinity, minHeight: 50).padding(5).contentShape(Rectangle())
.disabled(self.store.model.progress < 1.0)
}
if store.model.error == nil && store.model.importType == .universalLink {
Button(action: {
self.store.keep()
}) {
Text("Dialog_Keep") // Image("preview-save")
}.frame(maxWidth: .infinity, minHeight: 50).padding(5).contentShape(Rectangle())
Button(action: {
self.store.keep()
}, label: {
Text("Dialog_Keep") // Image("preview-save")
}).frame(maxWidth: .infinity, minHeight: 50).padding(5).contentShape(Rectangle())
}
if store.model.error == nil && store.model.importType == .documentLink && store.model.importIds.count > 0 {
Button(action: {
self.store.assignComposer()
}) {
}, label: {
Text("Local_Import_Assign")
}.frame(maxWidth: .infinity, minHeight: 50).padding(5).contentShape(Rectangle())
}).frame(maxWidth: .infinity, minHeight: 50).padding(5).contentShape(Rectangle())
}
Button(action: {
self.store.dismiss()
}) {
}, label: {
Text("DownloadView_Dismiss")
}.frame(maxWidth: .infinity, minHeight: 50).padding(5).contentShape(Rectangle())
}).frame(maxWidth: .infinity, minHeight: 50).padding(5).contentShape(Rectangle())
}.padding(5)
}.background(Color(Appearance.veryLightGray)).cornerRadius(10.0)
}.padding(EdgeInsets(top: 0, leading: 40, bottom: 0, trailing: 40)).onDisappear(perform: {
self.store.swipeDismissed()
})
}.padding(EdgeInsets(top: 0, leading: 40, bottom: 0, trailing: 40)).onDisappear(perform: {
self.store.swipeDismissed()
})
}
}

Expand Down
16 changes: 8 additions & 8 deletions 4champ/Scenes/PlaylistSelector/PlaylistPickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ struct PlaylistPickerView: View {
if store.viewModel.status == DownloadStatus.complete {
Button(action: {
self.deleteAction()
}) {
}, label: {
HStack {
Image("trashcan").renderingMode(.template).foregroundColor(.red)
Text("ModulesView_Delete")
}.frame(maxWidth: .infinity, minHeight: 50)
}.background(Color(Appearance.veryLightGray)).cornerRadius(5).padding(EdgeInsets(top: 8, leading: 5, bottom: -12, trailing: 5)).foregroundColor(.red)
}).background(Color(Appearance.veryLightGray)).cornerRadius(5).padding(EdgeInsets(top: 8, leading: 5, bottom: -12, trailing: 5)).foregroundColor(.red)
}
if store.viewModel.service == .amp {
Button(action: {
self.shareAction()
}) {
}, label: {
HStack {
Image("shareicon").renderingMode(.template).foregroundColor(.blue)
Text("NP_Share")
}.frame(maxWidth: .infinity, minHeight: 50)
}.background(Color(Appearance.veryLightGray)).cornerRadius(5).padding(EdgeInsets(top: 8, leading: 5, bottom: 4, trailing: 5))
}).background(Color(Appearance.veryLightGray)).cornerRadius(5).padding(EdgeInsets(top: 8, leading: 5, bottom: 4, trailing: 5))
}
}.background(Color.black.opacity(0.25))
VStack {
Expand All @@ -73,12 +73,12 @@ struct PlaylistPickerView: View {
}.labelsHidden().background(Color(Appearance.veryLightGray))
}.frame(maxWidth: .infinity).background(Color(Appearance.veryLightGray)).cornerRadius(5).padding(EdgeInsets(top: 5, leading: 5, bottom: -5, trailing: 5))
HStack {
Button(action: addModuleToPlaylist) {
Button(action: addModuleToPlaylist, label: {
Text("PlaylistSelector_Add").frame(maxWidth: .infinity, minHeight: 50).background(Color(Appearance.veryLightGray))
}.cornerRadius(5).padding(EdgeInsets(top: 5, leading: 5, bottom: 8, trailing: 0))
Button(action: { self.dismissAction() }) {
}).cornerRadius(5).padding(EdgeInsets(top: 5, leading: 5, bottom: 8, trailing: 0))
Button(action: { self.dismissAction() }, label: {
Text("G_Cancel").frame(maxWidth: .infinity, minHeight: 50).background(Color(Appearance.veryLightGray))
}.cornerRadius(5).padding(EdgeInsets(top: 5, leading: 0, bottom: 8, trailing: 5))
}).cornerRadius(5).padding(EdgeInsets(top: 5, leading: 0, bottom: 8, trailing: 5))
}.background(Color.black.opacity(0.0))
}.background(Color(.black).opacity(0.25))
}
Expand Down
Loading

0 comments on commit dc3b049

Please sign in to comment.