Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved x265, H.266, VC1 and VVC codec replacements
- Open the exact movie on Letterboxd instead of a search

### Changed
- Show filter, sort and instance buttons together on folded iPhone Duo

### Fixed
- Fixed a freeze when opening some movies and series on iPhone

Expand Down
10 changes: 0 additions & 10 deletions Ruddarr/Utilities/Environment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ extension EnvironmentValues {
// swiftlint:disable:next implicit_optional_initialization
@Entry var deleteSeries: Binding<Series?>? = nil

var hasVerticalToolbar: Bool {
#if os(iOS)
if #available(iOS 27.1, *) {
return toolbarVerticalEdge != nil
}
#endif

return false
}

var isCompactPhone: Bool {
deviceType == .phone && horizontalSizeClass != .regular
}
Expand Down
17 changes: 5 additions & 12 deletions Ruddarr/Views/Movies/MoviesView+Toolbar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ extension MoviesView {
}.pickerStyle(.inline)
}
} label: {
Label("Sort By", systemImage: "arrow.up.arrow.down")
.imageScale(.medium)
ToolbarIconLabel(title: Text("Sort By"), systemImage: "arrow.up.arrow.down")
}
}

Expand Down Expand Up @@ -121,15 +120,9 @@ extension MoviesView {
var toolbarInstancePicker: some ToolbarContent {
@Bindable var settings = settings

#if os(iOS)
let placement: ToolbarItemPlacement = hasVerticalToolbar ? .bottomBar : .navigation
#else
let placement: ToolbarItemPlacement = .navigation
#endif
ToolbarSpacer(.fixed, placement: .navigation)

ToolbarSpacer(.fixed, placement: placement)

ToolbarItem(placement: placement) {
ToolbarItem(placement: .navigation) {
Menu {
Picker(selection: $settings.radarrInstanceId, label: Text("Instances")) {
ForEach(settings.radarrInstances) { instance in
Expand All @@ -138,8 +131,8 @@ extension MoviesView {
}
.pickerStyle(.inline)
} label: {
Label(
settings.radarrInstance?.label ?? String(localized: "Instance"),
ToolbarIconLabel(
title: Text(settings.radarrInstance?.label ?? String(localized: "Instance")),
systemImage: "internaldrive"
)
}
Expand Down
4 changes: 1 addition & 3 deletions Ruddarr/Views/MoviesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ struct MoviesView: View {
@Environment(RadarrInstance.self) var instance

@Environment(\.deviceType) var deviceType
@Environment(\.hasVerticalToolbar) var hasVerticalToolbar
@Environment(\.isFolded) private var isFolded

@State private var scrollView: ScrollViewProxy?

Expand Down Expand Up @@ -88,7 +86,7 @@ struct MoviesView: View {
toolbarSearchButton

if settings.radarrInstances.count > 1 {
if deviceType == .phone && !isFolded { toolbarInstancePicker }
if deviceType == .phone { toolbarInstancePicker }
if deviceType == .pad { bottomBarInstancePicker }
}
}
Expand Down
17 changes: 5 additions & 12 deletions Ruddarr/Views/Series/SeriesView+Toolbar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ extension SeriesView {
}.pickerStyle(.inline)
}
} label: {
Label("Sort By", systemImage: "arrow.up.arrow.down")
.imageScale(.medium)
ToolbarIconLabel(title: Text("Sort By"), systemImage: "arrow.up.arrow.down")
}
}

Expand Down Expand Up @@ -121,15 +120,9 @@ extension SeriesView {
var toolbarInstancePicker: some ToolbarContent {
@Bindable var settings = settings

#if os(iOS)
let placement: ToolbarItemPlacement = hasVerticalToolbar ? .bottomBar : .navigation
#else
let placement: ToolbarItemPlacement = .navigation
#endif
ToolbarSpacer(.fixed, placement: .navigation)

ToolbarSpacer(.fixed, placement: placement)

ToolbarItem(placement: placement) {
ToolbarItem(placement: .navigation) {
Menu {
Picker(selection: $settings.sonarrInstanceId, label: Text("Instances")) {
ForEach(settings.sonarrInstances) { instance in
Expand All @@ -138,8 +131,8 @@ extension SeriesView {
}
.pickerStyle(.inline)
} label: {
Label(
settings.sonarrInstance?.label ?? String(localized: "Instance"),
ToolbarIconLabel(
title: Text(settings.sonarrInstance?.label ?? String(localized: "Instance")),
systemImage: "internaldrive"
)
}
Expand Down
4 changes: 1 addition & 3 deletions Ruddarr/Views/SeriesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ struct SeriesView: View {
@Environment(SonarrInstance.self) var instance

@Environment(\.deviceType) var deviceType
@Environment(\.hasVerticalToolbar) var hasVerticalToolbar
@Environment(\.isFolded) private var isFolded

@State private var scrollView: ScrollViewProxy?

Expand Down Expand Up @@ -91,7 +89,7 @@ struct SeriesView: View {
toolbarSearchButton

if settings.sonarrInstances.count > 1 {
if deviceType == .phone && !isFolded { toolbarInstancePicker }
if deviceType == .phone { toolbarInstancePicker }
if deviceType == .pad { bottomBarInstancePicker }
}
}
Expand Down
13 changes: 13 additions & 0 deletions Ruddarr/Views/Shared/Toolbar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ struct ToolbarFilterLabel: View {
}
}

struct ToolbarIconLabel: View {
var title: Text
var systemImage: String

var body: some View {
Image(systemName: systemImage)
.background {
title.opacity(0)
}
.accessibilityLabel(title)
}
}

struct MonitorBookmark: View {
var monitored: Bool
var loading: Bool = false
Expand Down
3 changes: 3 additions & 0 deletions TestFlight/WhatToTest.en-US.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ Added
- Improved x265, H.266, VC1 and VVC codec replacements
- Open the exact movie on Letterboxd instead of a search

Changed
- Show filter, sort and instance buttons together on folded iPhone Duo

Fixed
- Fixed a freeze when opening some movies and series on iPhone
Loading