mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
fix(update): keep preview-only channel guess transient
This commit is contained in:
1 parent
97480e5e83
commit
36c8ea2110
2 files changed
+3
-3
No files matched your search
@@ -224,7 +224,7 @@ object AppUpdates {
|
||||
catalog.recentPreviews.any { matchesInstalledCommit(it.commit, me.commit) }
|
||||
)
|
||||
if (stable?.version?.let { compareVersions(me.version, it) < 0 } == true) return Guess(Follow(Channel.STABLE), !publishedPreview)
|
||||
return Guess(Follow(if (publishedPreview) Channel.NIGHTLY else Channel.STABLE), publishedPreview)
|
||||
return Guess(Follow(if (publishedPreview) Channel.NIGHTLY else Channel.STABLE), false)
|
||||
}
|
||||
|
||||
fun setFollow(context: Context, follow: Follow) {
|
||||
|
||||
@@ -330,11 +330,11 @@ class AppUpdatesTest {
|
||||
assertTrue(g.certain)
|
||||
}
|
||||
|
||||
@Test fun aPublishedPreviewPastStableIsCertainNightly() {
|
||||
@Test fun aPublishedPreviewPastStableIsGuessedNightlyWithoutSaving() {
|
||||
val withHistory = AppUpdates.Catalog(stable, release("1111111"), emptyList(), 0L, recentPreview)
|
||||
val g = AppUpdates.guessFollow(withHistory, me("2".repeat(40), version = "0.3.0"))
|
||||
assertEquals(AppUpdates.Channel.NIGHTLY, g.follow.channel)
|
||||
assertTrue(g.certain)
|
||||
assertFalse(g.certain)
|
||||
}
|
||||
|
||||
@Test fun anUncataloguedNewerBuildStaysStableForNow() {
|
||||
|
||||
Reference in new issue
Block a user