Fix header problem with revoke remote wipe messages

This commit is contained in:
ameba23
2021-09-01 11:59:12 +02:00
parent 18d1dd041d
commit 581ecc9aaa
5 changed files with 22 additions and 11 deletions

View File

@@ -334,23 +334,19 @@ class ConversationVisitor implements
return new ConversationNoticeItem(
R.layout.list_item_conversation_notice_out, text, r);
default: // REVOKE
String revokeText;
if (r.isLocal()) {
String revokeText =
ctx.getString(R.string.remote_wipe_revoke_sent,
contactName.getValue()) + " " + UiUtils
.formatDateAbsolute(ctx,
r.getMessageExpiry());
revokeText = ctx.getString(R.string.remote_wipe_revoke_sent,
contactName.getValue());
return new ConversationNoticeItem(
R.layout.list_item_conversation_notice_out,
revokeText, r);
} else {
String revokeText =
revokeText =
ctx.getString(R.string.remote_wipe_revoke_received,
contactName.getValue()) + " " + UiUtils
.formatDateAbsolute(ctx,
r.getMessageExpiry());
contactName.getValue());
return new ConversationNoticeItem(
R.layout.list_item_conversation_notice_out,
R.layout.list_item_conversation_notice_in,
revokeText, r);
}
}

View File

@@ -750,7 +750,7 @@
<string name="activity_name_remote_wipe">Remote Wipe</string>
<string name="assigned_wipers">Your assigned trusted wipers</string>
<string name="activate_remote_wipe">Activate remote wipe</string>
<string name="remote_wipe_revoke_sent">%1$s may no longer activate a remote wipe.</string>
<string name="remote_wipe_revoke_sent">You have removed %1$s as a remote wiper.</string>
<string name="remote_wipe_revoke_received">You can no longer activate a remote wipe for %1$s.</string>
<!-- activate -->