mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-27 09:00:46 +03:00
Fix a crash when updating active category and no categories available
This commit is contained in:
parent
e73eed4a9b
commit
8f144316a6
1 changed files with 3 additions and 2 deletions
|
@ -204,8 +204,9 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
|
|||
LibraryUpdateService.start(activity, true)
|
||||
}
|
||||
R.id.action_update_category -> {
|
||||
val category = presenter.categories[view_pager.currentItem]
|
||||
LibraryUpdateService.start(activity, true, category)
|
||||
presenter.categories.getOrNull(view_pager.currentItem)?.let {
|
||||
LibraryUpdateService.start(activity, true, it)
|
||||
}
|
||||
}
|
||||
R.id.action_edit_categories -> {
|
||||
val intent = CategoryActivity.newIntent(activity)
|
||||
|
|
Loading…
Reference in a new issue