diff --git a/lib/screens/discover_screen.dart b/lib/screens/discover_screen.dart index f6f8e25b..9c085a01 100644 --- a/lib/screens/discover_screen.dart +++ b/lib/screens/discover_screen.dart @@ -894,7 +894,7 @@ class _DiscoverScreenState extends State const Spacer(), Consumer2( builder: (context, watchTogether, companionRemote, _) { - final isDesktop = PlatformDetector.isDesktop(context); + final isDesktop = PlatformDetector.shouldActAsRemoteHost(context); final userProvider = context.watch(); return FocusableActionBar( diff --git a/lib/screens/main_screen.dart b/lib/screens/main_screen.dart index fd181b73..ce36b933 100644 --- a/lib/screens/main_screen.dart +++ b/lib/screens/main_screen.dart @@ -419,8 +419,8 @@ class _MainScreenState extends State with RouteAware, WindowListener _multiServerProvider!.addListener(_handleLiveTvChanged); } - // Wire up Companion Remote command routing (desktop only, once) - if (!_companionRemoteSetup && PlatformDetector.isDesktop(context)) { + // Wire up Companion Remote command routing (host devices only, once) + if (!_companionRemoteSetup && PlatformDetector.shouldActAsRemoteHost(context)) { _companionRemoteSetup = true; _setupCompanionRemote(); } diff --git a/lib/screens/settings/settings_screen.dart b/lib/screens/settings/settings_screen.dart index e6444a5e..62ab9d41 100644 --- a/lib/screens/settings/settings_screen.dart +++ b/lib/screens/settings/settings_screen.dart @@ -1160,7 +1160,7 @@ class _SettingsScreenState extends State with FocusableTab { style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold), ), ), - if (PlatformDetector.isDesktop(context)) + if (PlatformDetector.shouldActAsRemoteHost(context)) ListTile( leading: const AppIcon(Symbols.phone_android_rounded, fill: 1), title: Text(t.companionRemote.hostRemoteSession), diff --git a/lib/utils/platform_detector.dart b/lib/utils/platform_detector.dart index cb86ec93..a75ff426 100644 --- a/lib/utils/platform_detector.dart +++ b/lib/utils/platform_detector.dart @@ -51,6 +51,12 @@ class PlatformDetector { return isDesktop(context) || isTV(); } + /// Whether this device should act as a companion remote host (receiver). + /// Desktop platforms and Android TV are hosts; phones/tablets are controllers. + static bool shouldActAsRemoteHost(BuildContext context) { + return isDesktop(context) || isTV(); + } + /// Detects if running on a mobile platform (iOS or Android) /// Uses Theme for consistent platform detection across the app static bool isMobile(BuildContext context) {