From 8814baf659f4a95802d391166457e3edb022e007 Mon Sep 17 00:00:00 2001 From: LooKeR Date: Wed, 1 Jan 2025 20:06:24 +0530 Subject: [PATCH] Format: Removed some "::class" operators Might come and bit me back --- .../main/kotlin/com/looker/droidify/ScreenActivity.kt | 9 +++++++-- .../kotlin/com/looker/droidify/service/SyncService.kt | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/looker/droidify/ScreenActivity.kt b/app/src/main/kotlin/com/looker/droidify/ScreenActivity.kt index df8416c0..30ecf445 100644 --- a/app/src/main/kotlin/com/looker/droidify/ScreenActivity.kt +++ b/app/src/main/kotlin/com/looker/droidify/ScreenActivity.kt @@ -12,6 +12,7 @@ import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.Toolbar import androidx.core.view.WindowCompat import androidx.fragment.app.Fragment +import androidx.fragment.app.PredictiveBackControl import androidx.fragment.app.commit import androidx.lifecycle.lifecycleScope import com.looker.core.common.DeeplinkType @@ -153,6 +154,11 @@ abstract class ScreenActivity : AppCompatActivity() { backHandler() } + override fun onDestroy() { + super.onDestroy() + onBackPressedCallback = null + } + override fun onSaveInstanceState(outState: Bundle) { super.onSaveInstanceState(outState) outState.putParcelableArrayList(STATE_FRAGMENT_STACK, ArrayList(fragmentStack)) @@ -254,9 +260,8 @@ abstract class ScreenActivity : AppCompatActivity() { lifecycleScope.launch { installer install installItem } } } - Unit } - }::class + } } open fun handleIntent(intent: Intent?) { diff --git a/app/src/main/kotlin/com/looker/droidify/service/SyncService.kt b/app/src/main/kotlin/com/looker/droidify/service/SyncService.kt index 9a3b811f..07f773d3 100644 --- a/app/src/main/kotlin/com/looker/droidify/service/SyncService.kt +++ b/app/src/main/kotlin/com/looker/droidify/service/SyncService.kt @@ -368,7 +368,7 @@ class SyncService : ConnectionService() { } is State.Finish -> {} - }::class + } }.build() ) }