From fd808042a8e2e91448be08f64271a3f44e16b24f Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 26 Apr 2023 10:43:44 -0500 Subject: [PATCH] Restore backup prominent on welcome screen --- .../conversations/ui/WelcomeActivity.java | 6 +++++ src/cheogram/res/drawable/restore.xml | 22 +++++++++++++++++++ src/cheogram/res/layout/activity_welcome.xml | 14 +++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/cheogram/res/drawable/restore.xml diff --git a/src/cheogram/java/eu/siacs/conversations/ui/WelcomeActivity.java b/src/cheogram/java/eu/siacs/conversations/ui/WelcomeActivity.java index 6d2e5d584..9e3051216 100644 --- a/src/cheogram/java/eu/siacs/conversations/ui/WelcomeActivity.java +++ b/src/cheogram/java/eu/siacs/conversations/ui/WelcomeActivity.java @@ -202,6 +202,12 @@ public class WelcomeActivity extends XmppActivity implements XmppConnectionServi addInviteUri(intent); startActivity(intent); }); + + binding.useBackup.setOnClickListener(v -> { + if (hasStoragePermission(REQUEST_IMPORT_BACKUP)) { + startActivity(new Intent(this, ImportBackupActivity.class)); + } + }); } @Override diff --git a/src/cheogram/res/drawable/restore.xml b/src/cheogram/res/drawable/restore.xml new file mode 100644 index 000000000..6e3356e17 --- /dev/null +++ b/src/cheogram/res/drawable/restore.xml @@ -0,0 +1,22 @@ + + + + + + + + + + diff --git a/src/cheogram/res/layout/activity_welcome.xml b/src/cheogram/res/layout/activity_welcome.xml index 95006dea7..8107fc0a8 100644 --- a/src/cheogram/res/layout/activity_welcome.xml +++ b/src/cheogram/res/layout/activity_welcome.xml @@ -243,7 +243,6 @@ android:text="@string/i_already_have_an_account" android:textColor="?colorAccent" /> -