From 97ffea040f23b0ea610beb40a9a7c1b3cedbfb5a Mon Sep 17 00:00:00 2001 From: Mikunj Date: Fri, 6 Dec 2019 13:00:08 +1100 Subject: [PATCH] Move session restore prompt from message level to conversation level. --- res/layout/conversation_activity.xml | 7 ++ res/layout/conversation_item_update.xml | 9 --- res/layout/session_restore_banner.xml | 66 +++++++++++++++++++ res/values/strings.xml | 8 ++- .../conversation/ConversationActivity.java | 60 +++++++++++++---- .../conversation/ConversationAdapter.java | 5 +- .../conversation/ConversationFragment.java | 6 +- .../conversation/ConversationItem.java | 1 - .../conversation/ConversationUpdateItem.java | 20 +----- .../database/model/DisplayRecord.java | 6 +- .../database/model/MessageRecord.java | 2 +- .../database/model/SmsMessageRecord.java | 8 +-- .../database/model/ThreadRecord.java | 8 +-- .../securesms/jobs/PushDecryptJob.java | 52 ++++++--------- .../ConversationUpdateItemViewDelegate.kt | 7 -- .../securesms/loki/FriendRequestHandler.kt | 7 +- .../securesms/loki/LokiThreadDatabase.kt | 20 ++++++ .../loki/LokiThreadDatabaseDelegate.kt | 1 + .../loki/SessionRestoreBannerView.kt | 55 ++++++++++++++++ .../securesms/util/TextSecurePreferences.java | 8 --- 20 files changed, 232 insertions(+), 124 deletions(-) create mode 100644 res/layout/session_restore_banner.xml delete mode 100644 src/org/thoughtcrime/securesms/loki/ConversationUpdateItemViewDelegate.kt create mode 100644 src/org/thoughtcrime/securesms/loki/SessionRestoreBannerView.kt diff --git a/res/layout/conversation_activity.xml b/res/layout/conversation_activity.xml index 6d2e36cbb8..ef3ca408a1 100644 --- a/res/layout/conversation_activity.xml +++ b/res/layout/conversation_activity.xml @@ -51,6 +51,13 @@ android:inflatedId="@+id/unverified_banner" android:layout="@layout/conversation_activity_unverified_banner_stub" /> + + -