runelite-client: Start the ClientLoader running before injection starts
This saves about a second of startup time. It also removes the possibly incorrect ClientUpdateCheckMode from the RuneLiteModule
This commit is contained in:
@@ -51,7 +51,6 @@ import net.runelite.client.RuneLiteModule;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.config.Config;
|
||||
import net.runelite.client.config.ConfigItem;
|
||||
import net.runelite.client.rs.ClientUpdateCheckMode;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
@@ -84,7 +83,7 @@ public class PluginManagerTest
|
||||
public void before() throws IOException
|
||||
{
|
||||
Injector injector = Guice.createInjector(Modules
|
||||
.override(new RuneLiteModule(ClientUpdateCheckMode.AUTO, true))
|
||||
.override(new RuneLiteModule(() -> null, true))
|
||||
.with(BoundFieldModule.of(this)));
|
||||
|
||||
RuneLite.setInjector(injector);
|
||||
@@ -108,7 +107,6 @@ public class PluginManagerTest
|
||||
configClasses.add(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -146,7 +144,7 @@ public class PluginManagerTest
|
||||
{
|
||||
List<Module> modules = new ArrayList<>();
|
||||
modules.add(new GraphvizModule());
|
||||
modules.add(new RuneLiteModule(ClientUpdateCheckMode.AUTO, true));
|
||||
modules.add(new RuneLiteModule(() -> null, true));
|
||||
|
||||
PluginManager pluginManager = new PluginManager(true, null, null, null, null, null);
|
||||
pluginManager.loadCorePlugins();
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
package net.runelite.client.rs;
|
||||
|
||||
import java.io.IOException;
|
||||
import okhttp3.OkHttpClient;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
@@ -38,8 +37,7 @@ public class ClientConfigLoaderTest
|
||||
@Test
|
||||
public void test() throws IOException
|
||||
{
|
||||
final ClientConfigLoader loader = new ClientConfigLoader(new OkHttpClient());
|
||||
final RSConfig config = loader.fetch();
|
||||
final RSConfig config = ClientConfigLoader.fetch();
|
||||
|
||||
for (String key : config.getClassLoaderProperties().keySet())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user