From 06130c7cd8442d4fdbb57a0af208c4c1071c6e55 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Fri, 22 Aug 2025 16:07:02 +0200 Subject: [PATCH] fix initial selection --- .../securesms/EphemeralMessagesDialog.java | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/EphemeralMessagesDialog.java b/src/main/java/org/thoughtcrime/securesms/EphemeralMessagesDialog.java index cad06974b..338660eef 100644 --- a/src/main/java/org/thoughtcrime/securesms/EphemeralMessagesDialog.java +++ b/src/main/java/org/thoughtcrime/securesms/EphemeralMessagesDialog.java @@ -82,30 +82,23 @@ public class EphemeralMessagesDialog { if (timespan == 0) { return 0; // off } - // Choose timespan close to the current one out of available options. - if (timespan < TimeUnit.MINUTES.toSeconds(5)) { - return 1; // 1 minute - } - if (timespan < TimeUnit.MINUTES.toSeconds(30)) { - return 2; // 5 minutes - } if (timespan < TimeUnit.HOURS.toSeconds(1)) { - return 3; // 30 minutes + return 1; // 5 minutes } if (timespan < TimeUnit.DAYS.toSeconds(1)) { - return 4; // 1 hour + return 2; // 1 hour } if (timespan < TimeUnit.DAYS.toSeconds(7)) { - return 5; // 1 day + return 3; // 1 day } if (timespan < TimeUnit.DAYS.toSeconds(35)) { - return 6; // 1 week + return 4; // 1 week } if (timespan < TimeUnit.DAYS.toSeconds(365)) { - return 7; // 5 weeks + return 5; // 5 weeks } - return 8; // 1 year + return 6; // 1 year } }