[db] track and clear repo update errors

Historically, we've just shown a giant Toast for repo update errors, now we track them in the DB, so we can properly expose them in the UI.
This commit is contained in:
Torsten Grote committed 2026-01-05 17:24:10 -03:00
1 parent f81060859d
commit dea8a2e504
7 files changed
+75 -7

No files matched your search

@@ -129,7 +129,14 @@ internal class IndexV1UpdaterTest : DbTest() {
assertIs<SigningException>(result.e)
// check that the DB transaction was rolled back and the DB wasn't changed
assertEquals(repo, repoDao.getRepository(repoId) ?: fail())
// except for adding the error to the repo
val expectedRepo = repo.copy(
preferences = repo.preferences.copy(
errorCount = 1,
lastError = "Signing certificate does not match"
),
)
assertEquals(expectedRepo, repoDao.getRepository(repoId) ?: fail())
assertEquals(0, appDao.countApps())
assertEquals(0, versionDao.countAppVersions())
}