mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 01:39:18 +02:00
Merge branch 'adb/issue-3894' of https://github.com/deltachat/deltachat-android into adb/issue-3894
This commit is contained in:
commit
b6ce6d908f
3 changed files with 19 additions and 29 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
* target Android 15
|
* target Android 15
|
||||||
* improve readability of info messages in dark mode
|
* improve readability of info messages in dark mode
|
||||||
|
* drop too short disappearing messages options
|
||||||
* fix Direct Share shortcuts
|
* fix Direct Share shortcuts
|
||||||
* fix: don't show error message when cancelling profile creation
|
* fix: don't show error message when cancelling profile creation
|
||||||
* enable permanent notification by default if push notifications are not available
|
* enable permanent notification by default if push notifications are not available
|
||||||
|
|
|
@ -60,14 +60,12 @@ public class EphemeralMessagesDialog {
|
||||||
.setPositiveButton(R.string.ok, (dialog, which) -> {
|
.setPositiveButton(R.string.ok, (dialog, which) -> {
|
||||||
final long burnAfter;
|
final long burnAfter;
|
||||||
switch (selectedChoice[0]) {
|
switch (selectedChoice[0]) {
|
||||||
case 1: burnAfter = TimeUnit.MINUTES.toSeconds(1); break;
|
case 1: burnAfter = TimeUnit.MINUTES.toSeconds(5); break;
|
||||||
case 2: burnAfter = TimeUnit.MINUTES.toSeconds(5); break;
|
case 2: burnAfter = TimeUnit.HOURS.toSeconds(1); break;
|
||||||
case 3: burnAfter = TimeUnit.MINUTES.toSeconds(30); break;
|
case 3: burnAfter = TimeUnit.DAYS.toSeconds(1); break;
|
||||||
case 4: burnAfter = TimeUnit.HOURS.toSeconds(1); break;
|
case 4: burnAfter = TimeUnit.DAYS.toSeconds(7); break;
|
||||||
case 5: burnAfter = TimeUnit.DAYS.toSeconds(1); break;
|
case 5: burnAfter = TimeUnit.DAYS.toSeconds(35); break;
|
||||||
case 6: burnAfter = TimeUnit.DAYS.toSeconds(7); break;
|
case 6: burnAfter = TimeUnit.DAYS.toSeconds(365); break;
|
||||||
case 7: burnAfter = TimeUnit.DAYS.toSeconds(35); break;
|
|
||||||
case 8: burnAfter = TimeUnit.DAYS.toSeconds(365); break;
|
|
||||||
default: burnAfter = 0; break;
|
default: burnAfter = 0; break;
|
||||||
}
|
}
|
||||||
listener.onTimeSelected(burnAfter);
|
listener.onTimeSelected(burnAfter);
|
||||||
|
@ -84,30 +82,23 @@ public class EphemeralMessagesDialog {
|
||||||
if (timespan == 0) {
|
if (timespan == 0) {
|
||||||
return 0; // off
|
return 0; // off
|
||||||
}
|
}
|
||||||
|
|
||||||
// Choose timespan close to the current one out of available options.
|
// 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)) {
|
if (timespan < TimeUnit.HOURS.toSeconds(1)) {
|
||||||
return 3; // 30 minutes
|
return 1; // 5 minutes
|
||||||
}
|
}
|
||||||
if (timespan < TimeUnit.DAYS.toSeconds(1)) {
|
if (timespan < TimeUnit.DAYS.toSeconds(1)) {
|
||||||
return 4; // 1 hour
|
return 2; // 1 hour
|
||||||
}
|
}
|
||||||
if (timespan < TimeUnit.DAYS.toSeconds(7)) {
|
if (timespan < TimeUnit.DAYS.toSeconds(7)) {
|
||||||
return 5; // 1 day
|
return 3; // 1 day
|
||||||
}
|
}
|
||||||
if (timespan < TimeUnit.DAYS.toSeconds(35)) {
|
if (timespan < TimeUnit.DAYS.toSeconds(35)) {
|
||||||
return 6; // 1 week
|
return 4; // 1 week
|
||||||
}
|
}
|
||||||
if (timespan < TimeUnit.DAYS.toSeconds(365)) {
|
if (timespan < TimeUnit.DAYS.toSeconds(365)) {
|
||||||
return 7; // 5 weeks
|
return 5; // 5 weeks
|
||||||
}
|
}
|
||||||
return 8; // 1 year
|
return 6; // 1 year
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,14 +49,12 @@
|
||||||
|
|
||||||
<string-array name="ephemeral_message_durations">
|
<string-array name="ephemeral_message_durations">
|
||||||
<!-- 0 --> <item>@string/off</item>
|
<!-- 0 --> <item>@string/off</item>
|
||||||
<!-- 1 --> <item>@string/after_1_minute</item>
|
<!-- 1 --> <item>@string/after_5_minutes</item>
|
||||||
<!-- 2 --> <item>@string/after_5_minutes</item>
|
<!-- 2 --> <item>@string/autodel_after_1_hour</item>
|
||||||
<!-- 3 --> <item>@string/after_30_minutes</item>
|
<!-- 3 --> <item>@string/autodel_after_1_day</item>
|
||||||
<!-- 4 --> <item>@string/autodel_after_1_hour</item>
|
<!-- 4 --> <item>@string/autodel_after_1_week</item>
|
||||||
<!-- 5 --> <item>@string/autodel_after_1_day</item>
|
<!-- 5 --> <item>@string/after_5_weeks</item>
|
||||||
<!-- 6 --> <item>@string/autodel_after_1_week</item>
|
<!-- 6 --> <item>@string/autodel_after_1_year</item>
|
||||||
<!-- 7 --> <item>@string/after_5_weeks</item>
|
|
||||||
<!-- 8 --> <item>@string/autodel_after_1_year</item>
|
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="mute_durations">
|
<string-array name="mute_durations">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue