Skip to content

Commit

Permalink
Merge pull request #172 from KieronQuinn/release/2.2.1
Browse files Browse the repository at this point in the history
release/2.2.1
  • Loading branch information
KieronQuinn authored Apr 19, 2023
2 parents 3703e0a + 4360ec3 commit ee3eece
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ apply plugin: 'com.google.android.gms.oss-licenses-plugin'
String DEFAULT_MANIFEST = "247:https://storage.googleapis.com/music-iq-db/updatable_ytm_db/20230402-030031/manifest.json"
String DEFAULT_MANIFEST_V3 = "3048:https://storage.googleapis.com/music-iq-db/updatable_db_v3/20230402-030031/manifest.json"

def tagName = '2.2'
def version = 220
def tagName = '2.2.1'
def version = 221

def getKeystoreProperties() {
def properties = new Properties()
Expand Down
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 220,
"versionName": "2.2",
"versionCode": 221,
"versionName": "2.2.1",
"outputFile": "app-release.apk"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class UpdatesRepositoryImpl(
}

private fun getUpdateCache(repository: String): GitHubRelease? {
val file = File(updatesCacheDir, repository)
val file = File(updatesCacheDir, "${repository}_${BuildConfig.VERSION_CODE}")
if(!file.exists()) return null
val cachedRelease = try {
gson.fromJson(file.readText(), CachedGitHubRelease::class.java)
Expand All @@ -207,7 +207,7 @@ class UpdatesRepositoryImpl(
}

private fun GitHubRelease.cacheRelease(repository: String) {
val file = File(updatesCacheDir, repository)
val file = File(updatesCacheDir, "${repository}_${BuildConfig.VERSION_CODE}")
val cachedRelease = gson.toJson(CachedGitHubRelease(System.currentTimeMillis(), this))
file.writeText(cachedRelease)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.os.TransactionTooLargeException
import android.util.SizeF
import android.view.LayoutInflater
import android.view.View
Expand Down Expand Up @@ -199,9 +200,11 @@ class WidgetRepositoryImpl(
private fun List<AppWidget>.sendLayouts(
state: RecognitionState?, onDemandEnabled: Boolean
) = forEach {
appWidgetManager.updateAppWidget(
it.id, it.getRemoteViews(state, onDemandEnabled)
)
try {
appWidgetManager.updateAppWidget(it.id, it.getRemoteViews(state, onDemandEnabled))
}catch (e: TransactionTooLargeException) {
//Suppress, shouldn't happen unless system has lagged
}
}

private fun getRemoteView41(): RemoteViews {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class UpdatesViewModelImpl(
}.flowOn(Dispatchers.IO)

private fun getPamState(clearCache: Boolean) = flow {
emit(updatesRepository.getPAMUpdateState(clearCache))
emit(updatesRepository.getPAMUpdateState(ignoreCache = clearCache))
}.flowOn(Dispatchers.IO)

private val downloadState = combine(
Expand Down

0 comments on commit ee3eece

Please sign in to comment.