mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-10-15 03:37:09 -04:00
fix: bypass stale update catalog caches
This commit is contained in:
1 parent
efdab60b22
commit
e16f351540
1 file changed
+3
-2
@@ -194,10 +194,11 @@ object AppUpdates {
|
||||
|
||||
/** One static request, rather than several unauthenticated GitHub API requests. */
|
||||
fun refresh(context: Context): Catalog {
|
||||
val checkedAt = System.currentTimeMillis()
|
||||
val catalog = readPublishedCatalog(
|
||||
JSONObject(get(CATALOG_URL)),
|
||||
JSONObject(get("$CATALOG_URL?checked=$checkedAt")),
|
||||
context.packageName,
|
||||
System.currentTimeMillis(),
|
||||
checkedAt,
|
||||
)
|
||||
prefs(context).edit().putString(KEY_CATALOG, writeCatalog(catalog).toString()).apply()
|
||||
return catalog
|
||||
|
||||
Reference in new issue
Block a user