mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
show auto-delete state in settings-summary
This commit is contained in:
@@ -467,7 +467,8 @@
|
||||
<string name="pref_background_custom_color">Custom color</string>
|
||||
|
||||
<!-- automatically delete message -->
|
||||
<string name="autodel_title">Automatically delete messages</string>
|
||||
<string name="autodel_title">Auto-delete messages</string>
|
||||
<string name="autodel_title_short">Auto-delete</string>
|
||||
<string name="autodel_device_title">Delete messages from device</string>
|
||||
<string name="autodel_server_title">Delete messages from server</string>
|
||||
<!-- %1$d will be replaced by the number of messages, you can assume plural/lots here. %1$s will be replaced by a timespan in italics or so. -->
|
||||
|
||||
@@ -117,10 +117,13 @@ public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment {
|
||||
}
|
||||
|
||||
public static CharSequence getSummary(Context context) {
|
||||
DcContext dcContext = DcHelper.getContext(context);
|
||||
final String onRes = context.getString(R.string.on);
|
||||
final String offRes = context.getString(R.string.off);
|
||||
String readReceiptState = DcHelper.getContext(context).getConfigInt("mdns_enabled")!=0? onRes : offRes;
|
||||
return context.getString(R.string.pref_read_receipts) + " " + readReceiptState;
|
||||
String readReceiptState = dcContext.getConfigInt("mdns_enabled")!=0? onRes : offRes;
|
||||
String autodelState = (dcContext.getConfigInt("delete_device_after")!=0 || dcContext.getConfigInt("delete_server_after")!=0)? onRes : offRes;
|
||||
return context.getString(R.string.pref_read_receipts) + " " + readReceiptState +
|
||||
", " + context.getString(R.string.autodel_title_short) + " " + autodelState;
|
||||
}
|
||||
|
||||
private class BlockedContactsClickListener implements Preference.OnPreferenceClickListener {
|
||||
|
||||
Reference in New Issue
Block a user