Refresh adapter after the cover is changed. Some minor changes on categories.

This commit is contained in:
inorichi
2016-02-25 16:13:48 +01:00
parent 4dde6d1a31
commit 61c7feca87
3 changed files with 16 additions and 23 deletions
@@ -266,7 +266,6 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
when (item.itemId) {
R.id.action_edit_cover -> {
changeSelectedCover(presenter.selectedMangas)
adapter.refreshRegisteredAdapters()
destroyActionModeIfNeeded()
}
R.id.action_move_to_category -> {
@@ -329,8 +328,11 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
try {
// Update cover to selected file, show error if something went wrong
if (!presenter.editCoverWithLocalFile(picture, manga))
if (presenter.editCoverWithLocalFile(picture, manga)) {
adapter.refreshRegisteredAdapters()
} else {
ToastUtil.showShort(context, R.string.notification_manga_update_failed)
}
} catch (e: IOException) {
e.printStackTrace()