mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-10-25 14:15:48 +03:00
Recreate activity when last account has been deleted
This commit is contained in:
parent
5cc5f25284
commit
021363963b
1 changed files with 4 additions and 2 deletions
|
@ -285,7 +285,7 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
|
|||
localAccount = null;
|
||||
SingleAccountHelper.setCurrentAccount(getApplicationContext(), null);
|
||||
db.getNoteServerSyncHelper().updateAccount();
|
||||
askForNewAccount();
|
||||
recreate();
|
||||
}
|
||||
}
|
||||
setupHeader();
|
||||
|
@ -552,7 +552,9 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
|
|||
Intent aboutIntent = new Intent(getApplicationContext(), AboutActivity.class);
|
||||
startActivityForResult(aboutIntent, about);
|
||||
} else if (item == itemTrashbin) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(localAccount.getUrl() + "/index.php/apps/files/?dir=/&view=trashbin")));
|
||||
if(localAccount != null) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(localAccount.getUrl() + "/index.php/apps/files/?dir=/&view=trashbin")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue