Refactor: Code Cleanup
Signed-off-by: HeCodes2Much <wayne6324@gmail.com>
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Launcher"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
android:launchMode="singleTop"
|
||||
android:clearTaskOnLaunch="true"
|
||||
tools:targetApi="tiramisu">
|
||||
<activity
|
||||
android:name=".ui.activities.LauncherActivity"
|
||||
|
||||
@@ -11,6 +11,7 @@ object AppReloader {
|
||||
val intent = packageManager.getLaunchIntentForPackage(context.packageName)
|
||||
val componentName = intent?.component
|
||||
val mainIntent = Intent.makeRestartActivityTask(componentName)
|
||||
mainIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
||||
|
||||
// Delay the restart slightly to ensure all current activities are finished
|
||||
Handler(Looper.getMainLooper()).post {
|
||||
|
||||
Reference in New Issue
Block a user