Skip to content

Commit 6b338a9

Browse files
authored
feat: warn for outdated versions after 6 months (#7144)
3 months were proven to be too short some years ago, after that issue, we went far up to 12 months. however, 12 months were considered too long after recent discussions :) so, 6 months seems to be a good compromise. the warning is still repeated every months and the text is unchanged. advantage is still that this approach does not require network or opt-in, and catches really all lazy updaters with few effort, cmp deltachat/deltachat-desktop#5422
1 parent e6ab1e3 commit 6b338a9

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/constants.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ pub const DC_GCL_ADDRESS: u32 = 0x04;
9595
pub(crate) const DC_RESEND_USER_AVATAR_DAYS: i64 = 14;
9696

9797
// warn about an outdated app after a given number of days.
98-
// as we use the "provider-db generation date" as reference (that might not be updated very often)
99-
// and as not all system get speedy updates,
98+
// reference is the release date.
99+
// as not all system get speedy updates,
100100
// do not use too small value that will annoy users checking for nonexistent updates.
101-
pub(crate) const DC_OUTDATED_WARNING_DAYS: i64 = 365;
101+
pub(crate) const DC_OUTDATED_WARNING_DAYS: i64 = 183;
102102

103103
/// messages that should be deleted get this chat_id; the messages are deleted from the working thread later then. This is also needed as rfc724_mid should be preset as long as the message is not deleted on the server (otherwise it is downloaded again)
104104
pub const DC_CHAT_ID_TRASH: ChatId = ChatId::new(3);

src/tools/tools_tests.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,10 @@ async fn test_maybe_warn_on_outdated() {
437437
let t = TestContext::new().await;
438438
let timestamp_now: i64 = time();
439439

440-
// in about 6 months, the app should not be outdated
441-
// (if this fails, provider-db is not updated since 6 months)
440+
// in about 3 months, the app should not be outdated
442441
maybe_warn_on_outdated(
443442
&t,
444-
timestamp_now + 180 * 24 * 60 * 60,
443+
timestamp_now + 90 * 24 * 60 * 60,
445444
get_release_timestamp(),
446445
)
447446
.await;

0 commit comments

Comments
 (0)