Fix the favorite button

This commit is contained in:
Jobobby04
2020-05-19 22:57:41 -04:00
parent e4b52c036a
commit 3fdfd91fff
2 changed files with 2 additions and 1 deletions

View File

@ -745,7 +745,7 @@ class MangaAllInOneController :
*
* @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.
// Border drawable if false, filled drawable if true.
binding.btnFavorite.apply {

View File

@ -240,6 +240,7 @@ class MangaAllInOnePresenter(
*/
fun toggleFavorite(): Boolean {
manga.favorite = !manga.favorite
controller.setFavoriteButtonState(manga.favorite)
if (!manga.favorite) {
manga.removeCovers(coverCache)
}