mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-23 01:00:04 +02:00
Fix a theme issue when starting the app the first time
This commit is contained in:
parent
0c8f2a4a03
commit
071bf82bc7
1 changed files with 7 additions and 4 deletions
|
@ -59,11 +59,14 @@ public class MainApplication extends MultiDexApplication {
|
|||
|
||||
Cyanea.init(this, super.getResources());
|
||||
List<CyaneaTheme> list = CyaneaTheme.Companion.from(getAssets(), "themes/cyanea_themes.json");
|
||||
int theme = sharedpreferences.getInt(getString(R.string.SET_THEME), 0);
|
||||
boolean custom_theme = sharedpreferences.getBoolean("use_custom_theme", false);
|
||||
/*if (!custom_theme) {
|
||||
list.get(theme).apply(Cyanea.getInstance());
|
||||
}*/
|
||||
boolean no_theme_set = sharedpreferences.getBoolean("no_theme_set", true);
|
||||
if (no_theme_set && !custom_theme) {
|
||||
list.get(0).apply(Cyanea.getInstance());
|
||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||
editor.putBoolean("no_theme_set", false);
|
||||
editor.apply();
|
||||
}
|
||||
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
|
||||
StrictMode.setVmPolicy(builder.build());
|
||||
|
||||
|
|
Loading…
Reference in a new issue