mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Fix so UI updated immediately when match started remotely
This commit is contained in:
@@ -21,16 +21,16 @@ public class FThreads {
|
||||
}
|
||||
}
|
||||
|
||||
public static void invokeInEdtLater(final Runnable runnable) {
|
||||
GuiBase.getInterface().invokeInEdtLater(runnable);
|
||||
public static void invokeInEdtLater(final Runnable proc) {
|
||||
GuiBase.getInterface().invokeInEdtLater(proc);
|
||||
}
|
||||
|
||||
public static void invokeInEdtNowOrLater(final Runnable proc) {
|
||||
if (isGuiThread()) {
|
||||
proc.run();
|
||||
GuiBase.getInterface().invokeInEdtNow(proc);
|
||||
}
|
||||
else {
|
||||
invokeInEdtLater(proc);
|
||||
GuiBase.getInterface().invokeInEdtLater(proc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ public interface IGuiBase {
|
||||
boolean isRunningOnDesktop();
|
||||
String getCurrentVersion();
|
||||
String getAssetsDir();
|
||||
void invokeInEdtNow(Runnable runnable);
|
||||
void invokeInEdtLater(Runnable runnable);
|
||||
void invokeInEdtAndWait(Runnable proc);
|
||||
boolean isGuiThread();
|
||||
|
||||
Reference in New Issue
Block a user