Lint fixes

This commit is contained in:
arkon
2023-11-05 09:14:57 -05:00
parent 4f3a0b3523
commit 953f5fb025
29 changed files with 182 additions and 57 deletions

View File

@@ -71,7 +71,10 @@ internal class ExtensionGithubApi {
}
}
suspend fun checkForUpdates(context: Context, fromAvailableExtensionList: Boolean = false): List<Extension.Installed>? {
suspend fun checkForUpdates(
context: Context,
fromAvailableExtensionList: Boolean = false,
): List<Extension.Installed>? {
// Limit checks to once a day at most
if (!fromAvailableExtensionList && Date().time < lastExtCheck.get() + 1.days.inWholeMilliseconds) {
return null

View File

@@ -133,7 +133,10 @@ internal class ExtensionInstaller(private val context: Context) {
emit(downloadStatus)
// Stop polling when the download fails or finishes
if (downloadStatus == DownloadManager.STATUS_SUCCESSFUL || downloadStatus == DownloadManager.STATUS_FAILED) {
if (
downloadStatus == DownloadManager.STATUS_SUCCESSFUL ||
downloadStatus == DownloadManager.STATUS_FAILED
) {
return@flow
}