Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -653,10 +653,6 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener, BiometricCa
override fun onPause() {
super.onPause()

// Start any delayed updates
if (ApkInstaller.delayedInstaller?.startInstallation() == true) {
Toast.makeText(this, R.string.update_started, Toast.LENGTH_LONG).show()
}
try {
if (isCastApiAvailable()) {
mSessionManager?.removeSessionManagerListener(mSessionManagerListener)
Expand Down Expand Up @@ -711,6 +707,11 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener, BiometricCa
}

override fun onDestroy() {
// Start any delayed updates
if (ApkInstaller.delayedInstaller?.startInstallation() == true) {
Toast.makeText(this, R.string.update_started, Toast.LENGTH_LONG).show()
}

filesToDelete.forEach { path ->
val result = File(path).deleteRecursively()
if (result) {
Expand Down