Add bookmarking to chapter selection menu (closes #1065)
This commit is contained in:
parent
57d1ed1073
commit
a7ece4fdf3
@ -362,11 +362,13 @@ class ChaptersController : NucleusController<ChaptersPresenter>(),
|
|||||||
|
|
||||||
override fun onActionItemClicked(mode: ActionMode, item: MenuItem): Boolean {
|
override fun onActionItemClicked(mode: ActionMode, item: MenuItem): Boolean {
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.action_select_all -> selectAll()
|
|
||||||
R.id.action_mark_as_read -> markAsRead(getSelectedChapters())
|
|
||||||
R.id.action_mark_as_unread -> markAsUnread(getSelectedChapters())
|
|
||||||
R.id.action_download -> downloadChapters(getSelectedChapters())
|
R.id.action_download -> downloadChapters(getSelectedChapters())
|
||||||
R.id.action_delete -> showDeleteChaptersConfirmationDialog()
|
R.id.action_delete -> showDeleteChaptersConfirmationDialog()
|
||||||
|
R.id.action_bookmark -> bookmarkChapters(getSelectedChapters(), true)
|
||||||
|
R.id.action_remove_bookmark -> bookmarkChapters(getSelectedChapters(), false)
|
||||||
|
R.id.action_mark_as_read -> markAsRead(getSelectedChapters())
|
||||||
|
R.id.action_mark_as_unread -> markAsUnread(getSelectedChapters())
|
||||||
|
R.id.action_select_all -> selectAll()
|
||||||
else -> return false
|
else -> return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
@ -390,9 +392,9 @@ class ChaptersController : NucleusController<ChaptersPresenter>(),
|
|||||||
|
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.action_download -> downloadChapters(chapters)
|
R.id.action_download -> downloadChapters(chapters)
|
||||||
|
R.id.action_delete -> deleteChapters(chapters)
|
||||||
R.id.action_bookmark -> bookmarkChapters(chapters, true)
|
R.id.action_bookmark -> bookmarkChapters(chapters, true)
|
||||||
R.id.action_remove_bookmark -> bookmarkChapters(chapters, false)
|
R.id.action_remove_bookmark -> bookmarkChapters(chapters, false)
|
||||||
R.id.action_delete -> deleteChapters(chapters)
|
|
||||||
R.id.action_mark_as_read -> markAsRead(chapters)
|
R.id.action_mark_as_read -> markAsRead(chapters)
|
||||||
R.id.action_mark_as_unread -> markAsUnread(chapters)
|
R.id.action_mark_as_unread -> markAsUnread(chapters)
|
||||||
R.id.action_mark_previous_as_read -> markPreviousAsRead(chapter)
|
R.id.action_mark_previous_as_read -> markPreviousAsRead(chapter)
|
||||||
|
@ -15,6 +15,16 @@
|
|||||||
android:title="@string/action_delete"
|
android:title="@string/action_delete"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_bookmark"
|
||||||
|
android:title="@string/action_bookmark"
|
||||||
|
android:visible="true" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_remove_bookmark"
|
||||||
|
android:title="@string/action_remove_bookmark"
|
||||||
|
android:visible="true" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_mark_as_read"
|
android:id="@+id/action_mark_as_read"
|
||||||
android:icon="@drawable/ic_done_all_white_24dp"
|
android:icon="@drawable/ic_done_all_white_24dp"
|
||||||
|
Loading…
Reference in New Issue
Block a user