mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 05:45:06 +01:00
parent
d1d327cfe1
commit
27fef68e54
@ -98,6 +98,11 @@ class RecentMangaHolder(
|
||||
}
|
||||
setTextColor(ChapterUtil.readColor(context, item))
|
||||
}
|
||||
if (binding.frontView.translationX == 0f) {
|
||||
binding.read.setImageResource(
|
||||
if (item.read) R.drawable.ic_eye_off_24dp else R.drawable.ic_eye_24dp
|
||||
)
|
||||
}
|
||||
val notValidNum = item.mch.chapter.chapter_number <= 0
|
||||
binding.body.isVisible = !isUpdates
|
||||
binding.body.text = when {
|
||||
|
@ -33,7 +33,7 @@ class RecentMangaItem(
|
||||
}
|
||||
|
||||
override fun isSwipeable(): Boolean {
|
||||
return mch.manga.id != null && !chapter.read
|
||||
return mch.manga.id != null
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
|
@ -524,19 +524,26 @@ class RecentsController(bundle: Bundle? = null) :
|
||||
val lastRead = chapter.last_page_read
|
||||
val pagesLeft = chapter.pages_left
|
||||
lastChapterId = chapter.id
|
||||
presenter.markChapterRead(chapter, true)
|
||||
snack = view?.snack(R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE) {
|
||||
val wasRead = chapter.read
|
||||
presenter.markChapterRead(chapter, !wasRead)
|
||||
snack = view?.snack(
|
||||
if (wasRead) R.string.marked_as_unread
|
||||
else R.string.marked_as_read,
|
||||
Snackbar.LENGTH_INDEFINITE
|
||||
) {
|
||||
anchorView = activityBinding?.bottomNav
|
||||
var undoing = false
|
||||
setAction(R.string.undo) {
|
||||
presenter.markChapterRead(chapter, false, lastRead, pagesLeft)
|
||||
presenter.markChapterRead(chapter, wasRead, lastRead, pagesLeft)
|
||||
undoing = true
|
||||
}
|
||||
addCallback(
|
||||
object : BaseTransientBottomBar.BaseCallback<Snackbar>() {
|
||||
override fun onDismissed(transientBottomBar: Snackbar?, event: Int) {
|
||||
super.onDismissed(transientBottomBar, event)
|
||||
if (!undoing && presenter.preferences.removeAfterMarkedAsRead()) {
|
||||
if (!undoing && presenter.preferences.removeAfterMarkedAsRead() &&
|
||||
!wasRead
|
||||
) {
|
||||
lastChapterId = chapter.id
|
||||
presenter.deleteChapter(chapter, manga)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user