mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
placed backupGithub on onPause
This commit is contained in:
parent
22a04bafd2
commit
28307ed9fc
1 changed files with 4 additions and 6 deletions
|
@ -384,6 +384,10 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
|||
} catch (e: Exception) {
|
||||
logError(e)
|
||||
}
|
||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
if (githubApi.getLatestLoginData() != null && settingsManager.getBoolean(getString(R.string.automatic_cloud_backups), false)) {
|
||||
this@MainActivity.backupGithub()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -425,14 +429,8 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
|||
|
||||
override fun onDestroy() {
|
||||
val broadcastIntent = Intent()
|
||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
broadcastIntent.action = "restart_service"
|
||||
broadcastIntent.setClass(this, VideoDownloadRestartReceiver::class.java)
|
||||
|
||||
if (githubApi.getLatestLoginData() != null && settingsManager.getBoolean(getString(R.string.automatic_cloud_backups), false)) {
|
||||
this@MainActivity.backupGithub()
|
||||
}
|
||||
|
||||
this.sendBroadcast(broadcastIntent)
|
||||
afterPluginsLoadedEvent -= ::onAllPluginsLoaded
|
||||
super.onDestroy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue