Moved configuration web request to another thread (#85)
* Moved configuration web request to another thread Fixes the FPS drop when spam clicking a config checkbox. Changed logging back to the original I was playing around with how i should write the Runnable, and accidently replaced the sl4j logging.
This commit is contained in:
@@ -229,6 +229,8 @@ public class ConfigManager
|
|||||||
String oldValue = (String) properties.setProperty(groupName + "." + key, value);
|
String oldValue = (String) properties.setProperty(groupName + "." + key, value);
|
||||||
|
|
||||||
if (client != null)
|
if (client != null)
|
||||||
|
{
|
||||||
|
Runnable task = () ->
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -238,6 +240,9 @@ public class ConfigManager
|
|||||||
{
|
{
|
||||||
logger.warn("unable to set configuration item", ex);
|
logger.warn("unable to set configuration item", ex);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
RuneLite.getRunelite().getExecutor().execute(task);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user