add optionally theme cache invalidation every update
This commit is contained in:
@@ -19661,6 +19661,9 @@ public final class R {
|
||||
public static final int cache_size = 0x7f12188d; // 2131892365
|
||||
public static final int cache_size_summ = 0x7f12188e; // 2131892366
|
||||
public static final int clear_all_cache = 0x7f12188f; // 2131892367
|
||||
public static final int invalidate_theme_cache_each_update_title = 0x7f121890; // 2131892368
|
||||
public static final int invertFilters = 0x7f121891; // 2131892369
|
||||
public static final int invertFilters_summ = 0x7f121892; // 2131892370
|
||||
}
|
||||
|
||||
public static final class style {
|
||||
|
||||
@@ -46,7 +46,10 @@ public class MainActivityInjector {
|
||||
NotificationChannels.createChannels();
|
||||
}
|
||||
|
||||
if (Preferences.isNewBuild() && !ThemesUtils.isMonetTheme() && ThemesManager.canApplyCustomAccent()) {
|
||||
if (Preferences.isNewBuild()
|
||||
&&!ThemesUtils.isMonetTheme()
|
||||
&&ThemesManager.canApplyCustomAccent())
|
||||
{
|
||||
Preferences.updateBuildNumber();
|
||||
updateBinsAndTmpArchive(activity);
|
||||
}
|
||||
|
||||
@@ -292,12 +292,16 @@ public class Preferences {
|
||||
}
|
||||
|
||||
public static boolean isNewBuild() {
|
||||
try {
|
||||
return getPreferences().getLong("setupTime", 0L) != AndroidUtils.getGlobalContext().getPackageManager().getPackageInfo(AndroidUtils.getPackageName(), 0).lastUpdateTime;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
if(Preferences.getBoolValue("invalidate_theme_cache_each_update",true))
|
||||
try {
|
||||
return AndroidUtils.getGlobalContext()
|
||||
.getPackageManager()
|
||||
.getPackageInfo(AndroidUtils.getPackageName(), 0)
|
||||
.lastUpdateTime != getPreferences().getLong("setupTime", 0L);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void updateBuildNumber() {
|
||||
|
||||
@@ -7012,6 +7012,7 @@
|
||||
|
||||
<string name="datasettings_title">Налады дадзеных прыкладання</string>
|
||||
<string name="invalidate_theme_cache_title">Інвалідацыя кэша тэмы</string>
|
||||
<string name="invalidate_theme_cache_each_update_title">Інвалідацыя кэша тэмы пры кожным абнаўленні</string>
|
||||
|
||||
<string name="useCustomPrefsStyle_title">Выкарыстоўваць новыя тумблеры</string>
|
||||
<string name="useCustomPrefsStyle_summ">Больш сучасны і стыльны выгляд тумблераў у наладах</string>
|
||||
|
||||
@@ -6394,6 +6394,7 @@
|
||||
|
||||
<string name="datasettings_title">Настройки данных приложения</string>
|
||||
<string name="invalidate_theme_cache_title">Инвалидация кэша темы</string>
|
||||
<string name="invalidate_theme_cache_each_update_title">Инвалидация кэша темы при каждом обновлении</string>
|
||||
|
||||
<string name="useCustomPrefsStyle_title">Использовать новые переключатели</string>
|
||||
<string name="useCustomPrefsStyle_summ">Более современный и стильный вид тумблеров в настройках</string>
|
||||
|
||||
@@ -6319,6 +6319,7 @@
|
||||
|
||||
<string name="datasettings_title">Налаштування даних додатку</string>
|
||||
<string name="invalidate_theme_cache_title">Інвалідація кешу теми</string>
|
||||
<string name="invalidate_theme_cache_each_update_title">Інвалідація кешу теми при кожному оновленні</string>
|
||||
|
||||
<string name="useCustomPrefsStyle_title">Використовувати нові перемикачі</string>
|
||||
<string name="useCustomPrefsStyle_summ">Більш сучасний і стильний вигляд тумблерів у налаштуваннях</string>
|
||||
|
||||
@@ -6532,6 +6532,7 @@ May look like a fake leaving the online"</string>
|
||||
|
||||
<string name="datasettings_title">Application data settings</string>
|
||||
<string name="invalidate_theme_cache_title">Invalidate theme cache</string>
|
||||
<string name="invalidate_theme_cache_each_update_title">Invalidate theme cache each update</string>
|
||||
|
||||
<string name="useCustomPrefsStyle_title">Use new switches</string>
|
||||
<string name="useCustomPrefsStyle_summ">More modern and stylish toggle switches in settings</string>
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
android:summary="@string/accent_color_summ"
|
||||
android:icon="@drawable/bg_accent_circle"
|
||||
android:title="@string/accent_color_title"/>
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="invalidate_theme_cache_each_update"
|
||||
android:title="@string/invalidate_theme_cache_each_update_title"/>
|
||||
<Preference
|
||||
android:key="invalidate_theme_cache"
|
||||
android:title="@string/invalidate_theme_cache_title" />
|
||||
|
||||
Reference in New Issue
Block a user