A cross platform Audiobookshelf client for Android and iOS
Dart
Fix iOS EQ button visibility and widget issues
Barnabas0e93c5f0ffb4
diff --git a/ios/NowPlayingWidget/NowPlayingWidget.swift b/ios/NowPlayingWidget/NowPlayingWidget.swiftindex 3f823066..c343737c 100644--- a/ios/NowPlayingWidget/NowPlayingWidget.swift+++ b/ios/NowPlayingWidget/NowPlayingWidget.swift@@ -174,32 +174,44 @@ struct SmallWidgetView: View {.lineLimit(1).frame(maxWidth: .infinity, alignment: .leading)- HStack(spacing: 16) {+ HStack(spacing: 18) {if entry.appAlive {Button(intent: SkipBackIntent()) {Image(systemName: "backward.fill")- .font(.caption)+ .font(.title3)+ .frame(width: 28, height: 28)+ .contentShape(Rectangle())}Button(intent: PlayPauseIntent()) {Image(systemName: entry.isPlaying ? "pause.fill" : "play.fill")- .font(.caption)+ .font(.title2)+ .frame(width: 32, height: 32)+ .contentShape(Rectangle())}Button(intent: SkipForwardIntent()) {Image(systemName: "forward.fill")- .font(.caption)+ .font(.title3)+ .frame(width: 28, height: 28)+ .contentShape(Rectangle())}} else {Link(destination: skipBackURL) {Image(systemName: "backward.fill")- .font(.caption)+ .font(.title3)+ .frame(width: 28, height: 28)+ .contentShape(Rectangle())}Link(destination: playPauseURL) {Image(systemName: entry.isPlaying ? "pause.fill" : "play.fill")- .font(.caption)+ .font(.title2)+ .frame(width: 32, height: 32)+ .contentShape(Rectangle())}Link(destination: skipForwardURL) {Image(systemName: "forward.fill")- .font(.caption)+ .font(.title3)+ .frame(width: 28, height: 28)+ .contentShape(Rectangle())}}}diff --git a/ios/Runner/SceneDelegate.swift b/ios/Runner/SceneDelegate.swiftindex 3913d9d5..8a44865b 100644--- a/ios/Runner/SceneDelegate.swift+++ b/ios/Runner/SceneDelegate.swift@@ -13,5 +13,16 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {controller.loadDefaultSplashScreenView()window?.rootViewController = controllerwindow?.makeKeyAndVisible()++ // Forward any cold-launch URL (e.g. from a home screen widget tap) to the+ // AppDelegate so registered Flutter plugins like home_widget can receive it.+ if let url = connectionOptions.urlContexts.first?.url {+ _ = UIApplication.shared.delegate?.application?(UIApplication.shared, open: url, options: [:])+ }+ }++ func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {+ guard let url = URLContexts.first?.url else { return }+ _ = UIApplication.shared.delegate?.application?(UIApplication.shared, open: url, options: [:])}}diff --git a/lib/widgets/card_button_config.dart b/lib/widgets/card_button_config.dartindex 96c2a2cb..d55d3bfd 100644--- a/lib/widgets/card_button_config.dart+++ b/lib/widgets/card_button_config.dart@@ -9,7 +9,7 @@ class CardButtonDef {}/// Button IDs that are hidden on iOS (features not yet supported).-final Set<String> _iosHiddenButtons = Platform.isIOS ? const {'cast', 'equalizer'} : const {};+final Set<String> _iosHiddenButtons = Platform.isIOS ? const {'cast'} : const {};const _allCardButtons = [CardButtonDef('chapters', 'Chapters', Icons.list_rounded),