move restore backup button from context menu on welcome screen
This commit is contained in:
parent
c3489836c4
commit
920656b45d
|
@ -11,6 +11,7 @@ import android.security.KeyChainAliasCallback;
|
|||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -140,7 +141,11 @@ public class WelcomeActivity extends XmppActivity implements XmppConnectionServi
|
|||
addInviteUri(intent);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
binding.restoreBackup.setOnClickListener(v -> {
|
||||
if (hasStoragePermission(REQUEST_IMPORT_BACKUP)) {
|
||||
startActivity(new Intent(this, ImportBackupActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -156,11 +161,6 @@ public class WelcomeActivity extends XmppActivity implements XmppConnectionServi
|
|||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_import_backup:
|
||||
if (hasStoragePermission(REQUEST_IMPORT_BACKUP)) {
|
||||
startActivity(new Intent(this, ImportBackupActivity.class));
|
||||
}
|
||||
break;
|
||||
case R.id.action_scan_qr_code:
|
||||
UriHandlerActivity.scan(this, true);
|
||||
break;
|
||||
|
|
|
@ -68,6 +68,15 @@
|
|||
android:layout_gravity="right"
|
||||
android:text="@string/i_already_have_an_account"
|
||||
android:textColor="?android:textColorSecondary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/restore_backup"
|
||||
style="@style/Widget.Conversations.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:text="@string/restore_backup"
|
||||
android:textColor="?android:textColorSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
|
|
|
@ -14,9 +14,4 @@
|
|||
android:title="@string/action_add_account_with_certificate"
|
||||
android:visible="true"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_import_backup"
|
||||
android:title="@string/restore_backup"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
Loading…
Reference in a new issue