MainActivity*: Improve self-update log messages
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -159,7 +159,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
if (it != null) {
|
if (it != null) {
|
||||||
showUpdatesSheet(it)
|
showUpdatesSheet(it)
|
||||||
} else {
|
} else {
|
||||||
Log.i("No self-update available")
|
Log.i("No Aurora Store update available")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class MainViewModel : ViewModel() {
|
|||||||
val selfUpdateAvailable = _selfUpdateAvailable.asSharedFlow()
|
val selfUpdateAvailable = _selfUpdateAvailable.asSharedFlow()
|
||||||
|
|
||||||
fun checkSelfUpdate(context: Context) {
|
fun checkSelfUpdate(context: Context) {
|
||||||
|
Log.i(TAG, "Checking for Aurora Store updates")
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
val gson: Gson =
|
val gson: Gson =
|
||||||
@@ -48,8 +49,8 @@ class MainViewModel : ViewModel() {
|
|||||||
}
|
}
|
||||||
} catch (exception: Exception) {
|
} catch (exception: Exception) {
|
||||||
_selfUpdateAvailable.emit(null)
|
_selfUpdateAvailable.emit(null)
|
||||||
Log.d(TAG, "Failed to check self-update", exception)
|
Log.d(TAG, "Failed to check Aurora Store updates", exception)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user