mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +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.messaging.PrivateMessageHeader;
|
||||||
import org.briarproject.briar.api.privategroup.invitation.GroupInvitationRequest;
|
import org.briarproject.briar.api.privategroup.invitation.GroupInvitationRequest;
|
||||||
import org.briarproject.briar.api.privategroup.invitation.GroupInvitationResponse;
|
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.remotewipe.RemoteWipeMessageHeader;
|
||||||
import org.briarproject.briar.api.socialbackup.ShardMessageHeader;
|
import org.briarproject.briar.api.socialbackup.ShardMessageHeader;
|
||||||
|
|
||||||
@@ -309,14 +310,28 @@ class ConversationVisitor implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ConversationItem visitRemoteWipeMessage(RemoteWipeMessageHeader r) {
|
public ConversationItem visitRemoteWipeMessage(RemoteWipeMessageHeader r) {
|
||||||
if (r.isLocal()) {
|
switch (r.getMessageType()) {
|
||||||
String text = ctx.getString(R.string.remote_wipe_setup_sent, contactName.getValue());
|
case SETUP:
|
||||||
return new ConversationNoticeItem(
|
if (r.isLocal()) {
|
||||||
R.layout.list_item_conversation_notice_out, text, r);
|
String text = ctx.getString(R.string.remote_wipe_setup_sent, contactName.getValue());
|
||||||
} else {
|
return new ConversationNoticeItem(
|
||||||
String text = ctx.getString(R.string.remote_wipe_setup_received, contactName.getValue());
|
R.layout.list_item_conversation_notice_out, text, r);
|
||||||
return new ConversationNoticeItem(
|
} else {
|
||||||
R.layout.list_item_conversation_notice_in, text, r);
|
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 -->
|
<!-- conversation -->
|
||||||
<string name="remote_wipe_setup_received">%1$s has added you as a remote wiper.</string>
|
<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_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="activity_name_remote_wipe">Remote Wipe</string>
|
||||||
<string name="assigned_wipers">Your assigned trusted wipers</string>
|
<string name="assigned_wipers">Your assigned trusted wipers</string>
|
||||||
<string name="activate_remote_wipe">Activate remote wipe</string>
|
<string name="activate_remote_wipe">Activate remote wipe</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user