mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 12:47:26 +01:00
Fix a crash when updating active category and no categories available
This commit is contained in:
parent
e73eed4a9b
commit
8f144316a6
@ -204,8 +204,9 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
|
|||||||
LibraryUpdateService.start(activity, true)
|
LibraryUpdateService.start(activity, true)
|
||||||
}
|
}
|
||||||
R.id.action_update_category -> {
|
R.id.action_update_category -> {
|
||||||
val category = presenter.categories[view_pager.currentItem]
|
presenter.categories.getOrNull(view_pager.currentItem)?.let {
|
||||||
LibraryUpdateService.start(activity, true, category)
|
LibraryUpdateService.start(activity, true, it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
R.id.action_edit_categories -> {
|
R.id.action_edit_categories -> {
|
||||||
val intent = CategoryActivity.newIntent(activity)
|
val intent = CategoryActivity.newIntent(activity)
|
||||||
|
Loading…
Reference in New Issue
Block a user