mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-23 21:19:37 +00:00
Be more conservative with handlers and references
Expiring message timers could end up leaking references and executing work even after their conversation item was no longer visible Maybe fixes #6898 // FREEBIE
This commit is contained in:
@@ -379,6 +379,10 @@ public class Util {
|
||||
else handler.post(runnable);
|
||||
}
|
||||
|
||||
public static void runOnMainDelayed(final @NonNull Runnable runnable, long delayMillis) {
|
||||
handler.postDelayed(runnable, delayMillis);
|
||||
}
|
||||
|
||||
public static void runOnMainSync(final @NonNull Runnable runnable) {
|
||||
if (isMainThread()) {
|
||||
runnable.run();
|
||||
|
Reference in New Issue
Block a user