mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Display message when getting or sending a remote wipe wipe message
This commit is contained in:
@@ -16,6 +16,7 @@ import org.briarproject.briar.api.introduction.IntroductionResponse;
|
||||
import org.briarproject.briar.api.messaging.PrivateMessageHeader;
|
||||
import org.briarproject.briar.api.privategroup.invitation.GroupInvitationRequest;
|
||||
import org.briarproject.briar.api.privategroup.invitation.GroupInvitationResponse;
|
||||
import org.briarproject.briar.api.remotewipe.MessageType;
|
||||
import org.briarproject.briar.api.remotewipe.RemoteWipeMessageHeader;
|
||||
import org.briarproject.briar.api.socialbackup.ShardMessageHeader;
|
||||
|
||||
@@ -309,14 +310,28 @@ class ConversationVisitor implements
|
||||
|
||||
@Override
|
||||
public ConversationItem visitRemoteWipeMessage(RemoteWipeMessageHeader r) {
|
||||
if (r.isLocal()) {
|
||||
String text = ctx.getString(R.string.remote_wipe_setup_sent, contactName.getValue());
|
||||
return new ConversationNoticeItem(
|
||||
R.layout.list_item_conversation_notice_out, text, r);
|
||||
} else {
|
||||
String text = ctx.getString(R.string.remote_wipe_setup_received, contactName.getValue());
|
||||
return new ConversationNoticeItem(
|
||||
R.layout.list_item_conversation_notice_in, text, r);
|
||||
switch (r.getMessageType()) {
|
||||
case SETUP:
|
||||
if (r.isLocal()) {
|
||||
String text = ctx.getString(R.string.remote_wipe_setup_sent, contactName.getValue());
|
||||
return new ConversationNoticeItem(
|
||||
R.layout.list_item_conversation_notice_out, text, r);
|
||||
} else {
|
||||
String text = ctx.getString(R.string.remote_wipe_setup_received, contactName.getValue());
|
||||
return new ConversationNoticeItem(
|
||||
R.layout.list_item_conversation_notice_in, text, r);
|
||||
}
|
||||
default: // WIPE
|
||||
if (r.isLocal()) {
|
||||
String text = ctx.getString(R.string.remote_wipe_wipe_sent, contactName.getValue());
|
||||
return new ConversationNoticeItem(
|
||||
R.layout.list_item_conversation_notice_out, text, r);
|
||||
} else {
|
||||
// TODO this is only for testing - will be removed in production
|
||||
String text = "GOT REMOTE WIPE SIGNAL";
|
||||
return new ConversationNoticeItem(
|
||||
R.layout.list_item_conversation_notice_in, text, r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -746,6 +746,7 @@
|
||||
<!-- conversation -->
|
||||
<string name="remote_wipe_setup_received">%1$s has added you as a remote wiper.</string>
|
||||
<string name="remote_wipe_setup_sent">You have added %1$s as a remote wiper.</string>
|
||||
<string name="remote_wipe_wipe_sent">You have sent an activate remote wipe signal to %1$s.</string>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user