Fix the favorite button
This commit is contained in:
parent
e4b52c036a
commit
3fdfd91fff
@ -745,7 +745,7 @@ class MangaAllInOneController :
|
|||||||
*
|
*
|
||||||
* @param isFavorite determines if manga is favorite or not.
|
* @param isFavorite determines if manga is favorite or not.
|
||||||
*/
|
*/
|
||||||
private fun setFavoriteButtonState(isFavorite: Boolean) {
|
fun setFavoriteButtonState(isFavorite: Boolean) {
|
||||||
// Set the Favorite drawable to the correct one.
|
// Set the Favorite drawable to the correct one.
|
||||||
// Border drawable if false, filled drawable if true.
|
// Border drawable if false, filled drawable if true.
|
||||||
binding.btnFavorite.apply {
|
binding.btnFavorite.apply {
|
||||||
|
@ -240,6 +240,7 @@ class MangaAllInOnePresenter(
|
|||||||
*/
|
*/
|
||||||
fun toggleFavorite(): Boolean {
|
fun toggleFavorite(): Boolean {
|
||||||
manga.favorite = !manga.favorite
|
manga.favorite = !manga.favorite
|
||||||
|
controller.setFavoriteButtonState(manga.favorite)
|
||||||
if (!manga.favorite) {
|
if (!manga.favorite) {
|
||||||
manga.removeCovers(coverCache)
|
manga.removeCovers(coverCache)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user