mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 12:47:26 +01:00
Add warning on update check for Android 4.x users
This commit is contained in:
parent
44b47b49bc
commit
218313428f
@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.data.updater
|
||||
|
||||
import android.app.PendingIntent
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.support.v4.app.NotificationCompat
|
||||
import com.evernote.android.job.Job
|
||||
import com.evernote.android.job.JobManager
|
||||
@ -13,6 +14,11 @@ import eu.kanade.tachiyomi.util.notificationManager
|
||||
class UpdaterJob : Job() {
|
||||
|
||||
override fun onRunJob(params: Params): Result {
|
||||
// Android 4.x is no longer supported
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
return Result.SUCCESS
|
||||
}
|
||||
|
||||
return UpdateChecker.getUpdateChecker()
|
||||
.checkForUpdate()
|
||||
.map { result ->
|
||||
|
@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.ui.setting
|
||||
import android.app.Dialog
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.support.v7.preference.PreferenceScreen
|
||||
import android.view.View
|
||||
@ -121,6 +122,11 @@ class SettingsAboutController : SettingsController() {
|
||||
private fun checkVersion() {
|
||||
if (activity == null) return
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
activity?.toast("Newer versions of Tachiyomi require Android 5+")
|
||||
return
|
||||
}
|
||||
|
||||
activity?.toast(R.string.update_check_look_for_updates)
|
||||
releaseSubscription?.unsubscribe()
|
||||
releaseSubscription = updateChecker.checkForUpdate()
|
||||
|
Loading…
Reference in New Issue
Block a user