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