Merge pull request #3467 from deltachat/adb/issue-3437

add "After 1 year" option to disappearing messages
This commit is contained in:
adb
2025-08-13 13:55:04 +02:00
committed by GitHub
5 changed files with 13 additions and 2 deletions
+2 -1
View File
@@ -2,9 +2,10 @@
## Unreleased
* allow to clone email chats
* add "After 1 year" option to disappearing messages
* improve image quality when setting group avatars
* add Estonian translation, update other translations
* allow to clone email chats
* fix some small bugs
* update to core 2.11.0
@@ -67,6 +67,7 @@ public class EphemeralMessagesDialog {
case 5: burnAfter = TimeUnit.DAYS.toSeconds(1); break;
case 6: burnAfter = TimeUnit.DAYS.toSeconds(7); break;
case 7: burnAfter = TimeUnit.DAYS.toSeconds(35); break;
case 8: burnAfter = TimeUnit.DAYS.toSeconds(365); break;
default: burnAfter = 0; break;
}
listener.onTimeSelected(burnAfter);
@@ -103,7 +104,10 @@ public class EphemeralMessagesDialog {
if (timespan < TimeUnit.DAYS.toSeconds(35)) {
return 6; // 1 week
}
return 7; // 5 weeks
if (timespan < TimeUnit.DAYS.toSeconds(365)) {
return 7; // 5 weeks
}
return 8; // 1 year
}
}
@@ -226,6 +226,8 @@ public class DcHelper {
dcContext.setStockTranslation(155, context.getString(R.string.ephemeral_timer_days_by_other));
dcContext.setStockTranslation(156, context.getString(R.string.ephemeral_timer_weeks_by_you));
dcContext.setStockTranslation(157, context.getString(R.string.ephemeral_timer_weeks_by_other));
dcContext.setStockTranslation(158, context.getString(R.string.ephemeral_timer_1_year_by_you));
dcContext.setStockTranslation(159, context.getString(R.string.ephemeral_timer_1_year_by_other));
// HACK: svg does not handle entities correctly and shows `&quot;` as the text `quot;`.
// until that is fixed, we fix the most obvious errors (core uses encode_minimal, so this does not affect so many characters)
+1
View File
@@ -56,6 +56,7 @@
<!-- 5 --> <item>@string/autodel_after_1_day</item>
<!-- 6 --> <item>@string/autodel_after_1_week</item>
<!-- 7 --> <item>@string/after_5_weeks</item>
<!-- 8 --> <item>@string/autodel_after_1_year</item>
</string-array>
<string-array name="mute_durations">
+3
View File
@@ -956,6 +956,9 @@
<string name="ephemeral_timer_1_week_by_you">You set disappearing messages timer to 1 week.</string>
<!-- %1$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_1_week_by_other">Disappearing messages timer set to 1 week by %1$s.</string>
<string name="ephemeral_timer_1_year_by_you">You set disappearing messages timer to 1 year.</string>
<!-- %1$s will be replaced by name of the contact -->
<string name="ephemeral_timer_1_year_by_other">Disappearing messages timer set to 1 year by %1$s.</string>
<!-- %1$s will be replaced by the number of minutes (always >1) the timer is set to -->
<string name="ephemeral_timer_minutes_by_you">You set disappearing messages timer to %1$s minutes.</string>
<!-- %1$s will be replaced by the number of minutes (always >1) the timer is set to, %2$s will be replaced by name and address of the contact -->