Skip to content

Commit

Permalink
chore: disable macos ui due to instability
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Mar 7, 2023
1 parent 8ce2192 commit a1896b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
6 changes: 6 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ class SpotubeState extends ConsumerState<Spotube> with WidgetsBindingObserver {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
setState(() {
appPlatform = Theme.of(context).platform;
if (appPlatform == TargetPlatform.macOS) {
appPlatform = TargetPlatform.android;
}
});
});
}
Expand Down Expand Up @@ -245,6 +248,9 @@ class SpotubeState extends ConsumerState<Spotube> with WidgetsBindingObserver {

void changePlatform(TargetPlatform targetPlatform) {
appPlatform = targetPlatform;
if (appPlatform == TargetPlatform.macOS) {
appPlatform = TargetPlatform.android;
}
setState(() {});
}

Expand Down
11 changes: 0 additions & 11 deletions lib/services/queries/category.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import 'package:fl_query/fl_query.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:spotify/spotify.dart';
import 'package:spotube/extensions/map.dart';
import 'package:spotube/extensions/page.dart';
import 'package:spotube/hooks/use_spotify_infinite_query.dart';

class CategoryQueries {
Expand All @@ -29,15 +27,6 @@ class CategoryQueries {
}
return lastPageData.nextOffset;
},
jsonConfig: JsonConfig<Page<Category>>(
toJson: (page) => page.toJson(),
fromJson: (json) => PageJson.fromJson<Category>(
json,
(json) {
return Category.fromJson((json as Map).castKeyDeep<String>());
},
),
),
refreshConfig: RefreshConfig.withDefaults(
context,
staleDuration: const Duration(minutes: 30),
Expand Down

0 comments on commit a1896b4

Please sign in to comment.