Skip to content

Commit 06130c7

Browse files
committed
fix initial selection
1 parent 5d7c701 commit 06130c7

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/main/java/org/thoughtcrime/securesms/EphemeralMessagesDialog.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,30 +82,23 @@ private static int getPreselection(int timespan) {
8282
if (timespan == 0) {
8383
return 0; // off
8484
}
85-
8685
// Choose timespan close to the current one out of available options.
87-
if (timespan < TimeUnit.MINUTES.toSeconds(5)) {
88-
return 1; // 1 minute
89-
}
90-
if (timespan < TimeUnit.MINUTES.toSeconds(30)) {
91-
return 2; // 5 minutes
92-
}
9386
if (timespan < TimeUnit.HOURS.toSeconds(1)) {
94-
return 3; // 30 minutes
87+
return 1; // 5 minutes
9588
}
9689
if (timespan < TimeUnit.DAYS.toSeconds(1)) {
97-
return 4; // 1 hour
90+
return 2; // 1 hour
9891
}
9992
if (timespan < TimeUnit.DAYS.toSeconds(7)) {
100-
return 5; // 1 day
93+
return 3; // 1 day
10194
}
10295
if (timespan < TimeUnit.DAYS.toSeconds(35)) {
103-
return 6; // 1 week
96+
return 4; // 1 week
10497
}
10598
if (timespan < TimeUnit.DAYS.toSeconds(365)) {
106-
return 7; // 5 weeks
99+
return 5; // 5 weeks
107100
}
108-
return 8; // 1 year
101+
return 6; // 1 year
109102
}
110103

111104
}

0 commit comments

Comments
 (0)