Code Cleanup

This commit is contained in:
Prathamesh More 2022-04-21 19:47:24 +05:30
parent 4b4232ce6b
commit b143419520
4 changed files with 4 additions and 16 deletions

View file

@ -2,6 +2,7 @@ package code.name.monkey.appthemehelper
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import androidx.appcompat.app.AppCompatActivity
/**
@ -30,6 +31,6 @@ open class ATHActivity : AppCompatActivity() {
fun postRecreate() {
// hack to prevent java.lang.RuntimeException: Performing pause of activity that is not resumed
// makes sure recreate() is called right after and not in onResume()
Handler().post { recreate() }
Handler(Looper.getMainLooper()).post { recreate() }
}
}