perf: Reduce amount of network requests

This commit is contained in:
oSumAtrIX
2023-09-29 18:39:07 +02:00
parent 8661d72e45
commit 8ce266bc94
12 changed files with 78 additions and 272 deletions

View File

@ -39,9 +39,9 @@ class NavigationViewModel extends IndexTrackingViewModel {
// Force disable Material You on Android 11 and below
if (dynamicTheme.themeId.isOdd) {
const int ANDROID_12_SDK_VERSION = 31;
const int android12SdkVersion = 31;
final AndroidDeviceInfo info = await DeviceInfoPlugin().androidInfo;
if (info.version.sdkInt < ANDROID_12_SDK_VERSION) {
if (info.version.sdkInt < android12SdkVersion) {
await prefs.setInt('themeMode', 0);
await prefs.setBool('useDynamicTheme', false);
await dynamicTheme.setTheme(0);