The overall UI of Ferrite has been changed to make animations smoother and streamline the experiences. A new search filter interface has been added for all iOS versions, but iOS 15 and up have smooth UI applied due to bugs with searchbars in iOS 14 (which shouldn't even have a searchbar in the first place). Also fix the plugin fetching logic to not listen to a combine publisher and instead use a notification that is easier to control. Signed-off-by: kingbri <bdashore3@proton.me>
32 lines
837 B
Swift
32 lines
837 B
Swift
//
|
|
// DebridChoiceView.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 11/26/22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct DebridPickerView<Content: View>: View {
|
|
@EnvironmentObject var debridManager: DebridManager
|
|
|
|
@ViewBuilder var label: Content
|
|
|
|
var body: some View {
|
|
Menu {
|
|
Picker("", selection: $debridManager.selectedDebridType) {
|
|
Text("None")
|
|
.tag(nil as DebridType?)
|
|
|
|
ForEach(DebridType.allCases, id: \.self) { (debridType: DebridType) in
|
|
if debridManager.enabledDebrids.contains(debridType) {
|
|
Text(debridType.toString())
|
|
.tag(DebridType?.some(debridType))
|
|
}
|
|
}
|
|
}
|
|
} label: {
|
|
label
|
|
}
|
|
}
|
|
}
|