Skip to content

Commit 9f327f0

Browse files
committed
fix: Web fixes and cleanup
1 parent 67da2a5 commit 9f327f0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/main.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ void main(List<String> args) async {
7979
await NotificationService.init();
8080

8181
// Check if running on android TV
82-
final leanBackEnabled =
83-
defaultTargetPlatform == TargetPlatform.android ? await NativeVideoActivity().isLeanBackEnabled() : false;
82+
final leanBackEnabled = (!kIsWeb && defaultTargetPlatform == TargetPlatform.android)
83+
? await NativeVideoActivity().isLeanBackEnabled()
84+
: false;
8485

85-
if (defaultTargetPlatform == TargetPlatform.windows) {
86+
if (!kIsWeb && defaultTargetPlatform == TargetPlatform.windows) {
8687
await SMTCWindows.initialize();
8788
}
8889

@@ -94,7 +95,7 @@ void main(List<String> args) async {
9495

9596
String windowArguments = "";
9697

97-
if (defaultTargetPlatform == TargetPlatform.macOS) {
98+
if (!kIsWeb && defaultTargetPlatform == TargetPlatform.macOS) {
9899
await WindowManipulator.initialize(enableWindowDelegate: true);
99100
}
100101

lib/providers/update_notifications_provider.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ class UpdateNotifications {
6161
final interval = ref.read(clientSettingsProvider).updateNotificationsInterval;
6262

6363
try {
64-
if (!kIsWeb && (Platform.isWindows || Platform.isMacOS || Platform.isLinux)) {
64+
if (kIsWeb) return;
65+
if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
6566
_desktopTimer?.cancel();
6667
_desktopTimer = Timer.periodic(interval, (_) {
6768
performHeadlessUpdateCheck();

0 commit comments

Comments
 (0)