Ferrite: Format
Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
6e95c6072c
commit
e0784b3cec
6 changed files with 8 additions and 8 deletions
|
|
@ -11,7 +11,7 @@ enum DefaultAction: Codable, CaseIterable, Hashable {
|
|||
static var allCases: [DefaultAction] {
|
||||
[.none, .share, .kodi, .custom(name: "", listId: "")]
|
||||
}
|
||||
|
||||
|
||||
case none
|
||||
case share
|
||||
case kodi
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ extension CodableWrapper: RawRepresentable {
|
|||
}
|
||||
return string
|
||||
}
|
||||
|
||||
|
||||
init?(rawValue: String) {
|
||||
guard
|
||||
let data = rawValue.data(using: .utf8),
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ public class PluginManager: ObservableObject {
|
|||
case .kodi:
|
||||
navModel.kodiExpanded = true
|
||||
navModel.currentChoiceSheet = .action
|
||||
case .custom(let name, let listId):
|
||||
case let .custom(name, listId):
|
||||
let actionFetchRequest = Action.fetchRequest()
|
||||
actionFetchRequest.fetchLimit = 1
|
||||
actionFetchRequest.predicate = NSPredicate(format: "name == %@ AND listId == %@", name, listId)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ struct CustomScopeBarModifier<V: View>: ViewModifier {
|
|||
if #available(iOS 15, *) {
|
||||
content
|
||||
.backport.introspectSearchController { searchController in
|
||||
|
||||
// MARK: One-time setup
|
||||
|
||||
guard hostingController == nil else { return }
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ struct DefaultActionPickerView: View {
|
|||
DefaultChoiceButton(defaultAction: $defaultAction, selectedOption: .none)
|
||||
DefaultChoiceButton(defaultAction: $defaultAction, selectedOption: .share)
|
||||
|
||||
if actionRequirement == .debrid && !kodiServers.isEmpty {
|
||||
if actionRequirement == .debrid, !kodiServers.isEmpty {
|
||||
DefaultChoiceButton(defaultAction: $defaultAction, selectedOption: .kodi)
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ private struct DefaultChoiceButton: View {
|
|||
return "Share link"
|
||||
case .kodi:
|
||||
return "Open in Kodi"
|
||||
case .custom(_, _):
|
||||
case .custom:
|
||||
// This should not be called
|
||||
return "Custom button"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ struct SettingsView: View {
|
|||
|
||||
@AppStorage("Debug.ShowErrorToasts") var showErrorToasts = true
|
||||
|
||||
|
||||
var body: some View {
|
||||
NavView {
|
||||
Form {
|
||||
|
|
@ -98,7 +97,7 @@ struct SettingsView: View {
|
|||
Text("Share")
|
||||
case .kodi:
|
||||
Text("Kodi")
|
||||
case .custom(let name, _):
|
||||
case let .custom(name, _):
|
||||
Text(name)
|
||||
}
|
||||
}
|
||||
|
|
@ -126,7 +125,7 @@ struct SettingsView: View {
|
|||
Text("Share")
|
||||
case .kodi:
|
||||
Text("Kodi")
|
||||
case .custom(let name, _):
|
||||
case let .custom(name, _):
|
||||
Text(name)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue