mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-29 17:53:27 -05:00
Remove app update check on Android 5.x
This commit is contained in:
parent
ae9bf06b46
commit
13324dd1a1
2 changed files with 12 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
package eu.kanade.tachiyomi
|
package eu.kanade.tachiyomi
|
||||||
|
|
||||||
|
import android.os.Build
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import eu.kanade.tachiyomi.data.backup.BackupCreatorJob
|
import eu.kanade.tachiyomi.data.backup.BackupCreatorJob
|
||||||
|
@ -142,6 +143,11 @@ object Migrations {
|
||||||
if (oldVersion < 59) {
|
if (oldVersion < 59) {
|
||||||
// Reset rotation to Free after replacing Lock
|
// Reset rotation to Free after replacing Lock
|
||||||
preferences.rotation().set(1)
|
preferences.rotation().set(1)
|
||||||
|
|
||||||
|
// Disable update check for Android 5.x users
|
||||||
|
if (BuildConfig.INCLUDE_UPDATER && Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
||||||
|
UpdaterJob.cancelTask(context)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.ui.more
|
package eu.kanade.tachiyomi.ui.more
|
||||||
|
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import androidx.preference.PreferenceScreen
|
import androidx.preference.PreferenceScreen
|
||||||
|
@ -142,6 +143,11 @@ class AboutController : SettingsController() {
|
||||||
private fun checkVersion() {
|
private fun checkVersion() {
|
||||||
if (activity == null) return
|
if (activity == null) return
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
||||||
|
activity?.toast(R.string.update_check_eol)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
activity?.toast(R.string.update_check_look_for_updates)
|
activity?.toast(R.string.update_check_look_for_updates)
|
||||||
|
|
||||||
launchNow {
|
launchNow {
|
||||||
|
|
Loading…
Reference in a new issue