Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/5012
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Guard bottom navigation against crash when no account is set

A null-account check has been added to the bottom navigation so it skips navigation instead of crashing.

https://github.com/owncloud/android/issues/4998
https://github.com/owncloud/android/pull/5012
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ abstract class DrawerActivity : ToolbarActivity() {
}

private fun bottomBarNavigationTo(menuItemId: Int, isCurrentOptionActive: Boolean) {
if (account == null) {
return
}
when (menuItemId) {
R.id.nav_all_files -> navigateToOption(FileListOption.ALL_FILES)
R.id.nav_spaces -> navigateToOption(FileListOption.SPACES_LIST)
Expand Down
Loading