fix: check index exists.
This commit is contained in:
parent
0bb4fe6aed
commit
6a6d447456
4
.gitignore
vendored
4
.gitignore
vendored
@ -323,4 +323,6 @@ fabric.properties
|
||||
crowdin.properties
|
||||
|
||||
.kotlin/
|
||||
build-cache/
|
||||
build-cache/
|
||||
|
||||
act
|
||||
|
@ -161,12 +161,14 @@ class ReaderActivity :
|
||||
override fun onPageSelected(position: Int) {
|
||||
super.onPageSelected(position)
|
||||
|
||||
if (allItems[position].starred) {
|
||||
canRemoveFromFavorite()
|
||||
} else {
|
||||
canFavorite()
|
||||
if (!allItems.isNullOrEmpty() && allItems.size >= position) {
|
||||
if (allItems[position].starred) {
|
||||
canRemoveFromFavorite()
|
||||
} else {
|
||||
canFavorite()
|
||||
}
|
||||
readItem(allItems[position])
|
||||
}
|
||||
readItem(allItems[position])
|
||||
}
|
||||
},
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user