Ferrite: Update to support iOS 16.4 and Swift 5.8
Xcode 14.3 changed many parts about swift which caused Ferrite to not compile. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
d5ba67503b
commit
fbd99752e4
7 changed files with 23 additions and 24 deletions
|
|
@ -36,7 +36,8 @@ struct InstalledPluginButtonView<P: Plugin>: View {
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let tags = installedPlugin.getTags(), !tags.isEmpty {
|
let tags = installedPlugin.getTags()
|
||||||
|
if !tags.isEmpty {
|
||||||
PluginTagsView(tags: tags)
|
PluginTagsView(tags: tags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@ struct PluginCatalogButtonView<PJ: PluginJson>: View {
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let tags = availablePlugin.getTags(), !tags.isEmpty {
|
let tags = availablePlugin.getTags()
|
||||||
|
if !tags.isEmpty {
|
||||||
PluginTagsView(tags: tags)
|
PluginTagsView(tags: tags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,8 @@ struct PluginInfoMetaView<P: Plugin>: View {
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let tags = selectedPlugin.getTags(), !tags.isEmpty {
|
let tags = selectedPlugin.getTags()
|
||||||
|
if !tags.isEmpty {
|
||||||
PluginTagsView(tags: tags)
|
PluginTagsView(tags: tags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,13 +33,12 @@ struct PluginAggregateView<P: Plugin, PJ: PluginJson>: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
List {
|
List {
|
||||||
if
|
let filteredUpdatedPlugins = pluginManager.fetchUpdatedPlugins(
|
||||||
let filteredUpdatedPlugins = pluginManager.fetchUpdatedPlugins(
|
forType: PJ.self,
|
||||||
forType: PJ.self,
|
installedPlugins: installedPlugins,
|
||||||
installedPlugins: installedPlugins,
|
searchText: searchText
|
||||||
searchText: searchText
|
)
|
||||||
),
|
if !filteredUpdatedPlugins.isEmpty
|
||||||
!filteredUpdatedPlugins.isEmpty
|
|
||||||
{
|
{
|
||||||
Section(header: InlineHeader("Updates")) {
|
Section(header: InlineHeader("Updates")) {
|
||||||
ForEach(filteredUpdatedPlugins, id: \.self) { (updatedPlugin: PJ) in
|
ForEach(filteredUpdatedPlugins, id: \.self) { (updatedPlugin: PJ) in
|
||||||
|
|
@ -60,13 +59,13 @@ struct PluginAggregateView<P: Plugin, PJ: PluginJson>: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
|
||||||
let filteredAvailablePlugins = pluginManager.fetchFilteredPlugins(
|
let filteredAvailablePlugins = pluginManager.fetchFilteredPlugins(
|
||||||
forType: PJ.self,
|
forType: PJ.self,
|
||||||
installedPlugins: installedPlugins,
|
installedPlugins: installedPlugins,
|
||||||
searchText: searchText
|
searchText: searchText
|
||||||
),
|
)
|
||||||
!filteredAvailablePlugins.isEmpty
|
if !filteredAvailablePlugins.isEmpty
|
||||||
{
|
{
|
||||||
Section(header: InlineHeader("Catalog")) {
|
Section(header: InlineHeader("Catalog")) {
|
||||||
ForEach(filteredAvailablePlugins, id: \.self) { availablePlugin in
|
ForEach(filteredAvailablePlugins, id: \.self) { availablePlugin in
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ struct SearchFilterHeaderView: View {
|
||||||
Text("None").tag(nil as Source?)
|
Text("None").tag(nil as Source?)
|
||||||
|
|
||||||
ForEach(sources, id: \.self) { source in
|
ForEach(sources, id: \.self) { source in
|
||||||
if let name = source.name, source.enabled {
|
if source.enabled {
|
||||||
Text(name)
|
Text(source.name)
|
||||||
.tag(Source?.some(source))
|
.tag(Source?.some(source))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,6 @@ struct MainView: View {
|
||||||
case .batch:
|
case .batch:
|
||||||
BatchChoiceView()
|
BatchChoiceView()
|
||||||
case .activity:
|
case .activity:
|
||||||
EmptyView()
|
|
||||||
// TODO: Fix share sheet
|
|
||||||
if #available(iOS 16, *) {
|
if #available(iOS 16, *) {
|
||||||
ShareSheet(activityItems: navModel.activityItems)
|
ShareSheet(activityItems: navModel.activityItems)
|
||||||
.presentationDetents([.medium, .large])
|
.presentationDetents([.medium, .large])
|
||||||
|
|
|
||||||
|
|
@ -80,8 +80,7 @@ struct SettingsView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
Section(header: InlineHeader("Default actions")) {
|
Section(header: InlineHeader("Default actions")) {
|
||||||
// TODO: Uncomment
|
if debridManager.enabledDebrids.count > 0 {
|
||||||
//if debridManager.enabledDebrids.count > 0 {
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
DefaultActionPickerView(
|
DefaultActionPickerView(
|
||||||
actionRequirement: .debrid,
|
actionRequirement: .debrid,
|
||||||
|
|
@ -108,7 +107,7 @@ struct SettingsView: View {
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
DefaultActionPickerView(
|
DefaultActionPickerView(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue