Misc fixes for update checking
This commit is contained in:
@@ -68,6 +68,8 @@ class MainActivity : AppCompatActivity(), NavigationBarView.OnItemSelectedListen
|
||||
try {
|
||||
UpdateChecker.check().collect(this@MainActivity::onAppUpdateAvailable)
|
||||
} catch (_: CancellationException) {
|
||||
} catch (e: AppUpdate.IgnoredException) {
|
||||
Timber.d(e)
|
||||
} catch (e: Exception) {
|
||||
Timber.w(e)
|
||||
SmartSnackbar.make(e).show()
|
||||
|
||||
@@ -3,6 +3,8 @@ package be.mygod.vpnhotspot.util
|
||||
import android.app.Activity
|
||||
|
||||
interface AppUpdate {
|
||||
class IgnoredException(cause: Throwable?) : RuntimeException(cause)
|
||||
|
||||
val downloaded: Boolean? get() = null
|
||||
val message: String? get() = null
|
||||
val stalenessDays: Int? get() = null
|
||||
|
||||
Reference in New Issue
Block a user