mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-21 07:09:56 +01:00
Add revoke remote wipe conversation notification
This commit is contained in:
@@ -327,12 +327,18 @@ class ConversationVisitor implements
|
|||||||
return new ConversationNoticeItem(
|
return new ConversationNoticeItem(
|
||||||
R.layout.list_item_conversation_notice_in, text, r);
|
R.layout.list_item_conversation_notice_in, text, r);
|
||||||
}
|
}
|
||||||
default: // WIPE
|
case WIPE:
|
||||||
String text = ctx.getString(R.string.remote_wipe_wipe_sent,
|
String text = ctx.getString(R.string.remote_wipe_wipe_sent,
|
||||||
contactName.getValue()) + " " + UiUtils
|
contactName.getValue()) + " " + UiUtils
|
||||||
.formatDateAbsolute(ctx, r.getMessageExpiry());
|
.formatDateAbsolute(ctx, r.getMessageExpiry());
|
||||||
return new ConversationNoticeItem(
|
return new ConversationNoticeItem(
|
||||||
R.layout.list_item_conversation_notice_out, text, r);
|
R.layout.list_item_conversation_notice_out, text, r);
|
||||||
|
default: // REVOKE
|
||||||
|
String revokeText = ctx.getString(R.string.remote_wipe_revoke_sent,
|
||||||
|
contactName.getValue()) + " " + UiUtils
|
||||||
|
.formatDateAbsolute(ctx, r.getMessageExpiry());
|
||||||
|
return new ConversationNoticeItem(
|
||||||
|
R.layout.list_item_conversation_notice_out, revokeText, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class RevokeRemoteWipeSuccessFragment extends BaseFragment {
|
|||||||
public View onCreateView(@NonNull LayoutInflater inflater,
|
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||||
@Nullable ViewGroup container,
|
@Nullable ViewGroup container,
|
||||||
@Nullable Bundle savedInstanceState) {
|
@Nullable Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.fragment_activate_remote_wipe_success,
|
View view = inflater.inflate(R.layout.fragment_revoke_remote_wipe_success,
|
||||||
container, false);
|
container, false);
|
||||||
|
|
||||||
Button button = view.findViewById(R.id.button);
|
Button button = view.findViewById(R.id.button);
|
||||||
|
|||||||
@@ -1,6 +1,51 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_height="match_parent">
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingLeft="@dimen/margin_large"
|
||||||
|
android:paddingTop="@dimen/margin_medium"
|
||||||
|
android:paddingRight="@dimen/margin_large"
|
||||||
|
android:paddingBottom="@dimen/margin_medium">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:text="@string/button_confirm"
|
||||||
|
android:textSize="24sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/remote_wipe_revoke_success"
|
||||||
|
android:textSize="30sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginLeft="32dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:layout_marginRight="32dp"
|
||||||
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/ic_baseline_done_outline_24" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -750,6 +750,7 @@
|
|||||||
<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>
|
||||||
|
<string name="remote_wipe_revoke_sent">%1$s may no longer activate a remote wipe.</string>
|
||||||
|
|
||||||
<!-- activate -->
|
<!-- activate -->
|
||||||
<string name="activity_name_activate_remote_wipe">Activate Remote Wipe</string>
|
<string name="activity_name_activate_remote_wipe">Activate Remote Wipe</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user