Skip to content

Commit

Permalink
🎨 取消更新失败toast
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoxieyoulei committed Jul 1, 2024
1 parent 932edfd commit bc734c9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ import top.yogiczy.mytv.data.utils.Constants
import top.yogiczy.mytv.ui.screens.leanback.toast.LeanbackToastProperty
import top.yogiczy.mytv.ui.screens.leanback.toast.LeanbackToastState
import top.yogiczy.mytv.utils.Downloader
import top.yogiczy.mytv.utils.Logger
import top.yogiczy.mytv.utils.compareVersion
import java.io.File

class LeanBackUpdateViewModel : ViewModel() {
private val log = Logger.create(javaClass.simpleName)

private var _isChecking = false
private var _isUpdating = false

Expand All @@ -37,7 +40,7 @@ class LeanBackUpdateViewModel : ViewModel() {
_latestRelease = GitRepository().latestRelease(Constants.GIT_RELEASE_LATEST_URL)
_isUpdateAvailable = _latestRelease.version.compareVersion(currentVersion) > 0
} catch (e: Exception) {
LeanbackToastState.I.showToast("检查更新失败")
log.e("检查更新失败", e)
} finally {
_isChecking = false
}
Expand Down

0 comments on commit bc734c9

Please sign in to comment.