fix crash when switch dark mode
This commit is contained in:
parent
b464282f4a
commit
f7ff5ea3cb
|
@ -243,7 +243,7 @@ public final class Accounts {
|
|||
*/
|
||||
static void init() {
|
||||
if (initialized)
|
||||
throw new IllegalStateException("Already initialized");
|
||||
return;
|
||||
|
||||
loadGlobalAccountStorages();
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public final class ConfigHolder {
|
|||
|
||||
public synchronized static void init() throws IOException {
|
||||
if (configInstance != null) {
|
||||
throw new IllegalStateException("Configuration is already loaded");
|
||||
return;
|
||||
}
|
||||
|
||||
configInstance = loadConfig();
|
||||
|
|
|
@ -95,7 +95,7 @@ public class Controllers {
|
|||
|
||||
public static void init() {
|
||||
if (initialized)
|
||||
throw new IllegalStateException("Already initialized");
|
||||
return;
|
||||
|
||||
controllers.addAll(getControllersFromDisk());
|
||||
checkControllers();
|
||||
|
|
|
@ -135,7 +135,7 @@ public final class Profiles {
|
|||
|
||||
static void init() {
|
||||
if (initialized)
|
||||
throw new IllegalStateException("Already initialized");
|
||||
return;
|
||||
|
||||
HashSet<String> names = new HashSet<>();
|
||||
config().getConfigurations().forEach((name, profile) -> {
|
||||
|
|
|
@ -24,6 +24,7 @@ class ManagePageManager(
|
|||
const val PAGE_ID_MANAGE_MOD: Int = 15003
|
||||
const val PAGE_ID_MANAGE_WORLD: Int = 15004
|
||||
}
|
||||
|
||||
var profile: Profile? = null
|
||||
var version: String? = null
|
||||
|
||||
|
@ -61,6 +62,7 @@ class ManagePageManager(
|
|||
)
|
||||
versionSettingPage
|
||||
}
|
||||
|
||||
PAGE_ID_MANAGE_INSTALL -> {
|
||||
installerListPage = InstallerListPage(
|
||||
context,
|
||||
|
@ -70,6 +72,7 @@ class ManagePageManager(
|
|||
)
|
||||
installerListPage
|
||||
}
|
||||
|
||||
PAGE_ID_MANAGE_MOD -> {
|
||||
modListPage = ModListPage(
|
||||
context,
|
||||
|
@ -79,6 +82,7 @@ class ManagePageManager(
|
|||
)
|
||||
modListPage
|
||||
}
|
||||
|
||||
PAGE_ID_MANAGE_WORLD -> {
|
||||
worldListPage = WorldListPage(
|
||||
context,
|
||||
|
@ -88,6 +92,7 @@ class ManagePageManager(
|
|||
)
|
||||
worldListPage
|
||||
}
|
||||
|
||||
else -> null
|
||||
}
|
||||
if (page != null) {
|
||||
|
|
Loading…
Reference in New Issue