🐞 Fix #1541 Favorite star in menu not clickable

Signed-off-by: Stefan Niedermann <info@niedermann.it>
This commit is contained in:
Stefan Niedermann 2022-08-11 09:47:18 +02:00
parent 7f5842ced8
commit fcebf67c03
2 changed files with 3 additions and 1 deletions

View file

@ -201,7 +201,7 @@ public abstract class BaseNoteFragment extends BrandedFragment implements Catego
}
private void prepareFavoriteOption(MenuItem item) {
item.setIcon(TRUE.equals(note.getFavorite()) ? R.drawable.ic_star_white_24dp : R.drawable.ic_star_border_white_24dp);
item.setIcon(note.getFavorite() ? R.drawable.ic_star_white_24dp : R.drawable.ic_star_border_white_24dp);
item.setChecked(note.getFavorite());
tintMenuIcon(item, colorAccent);
}
@ -227,6 +227,7 @@ public abstract class BaseNoteFragment extends BrandedFragment implements Catego
listener.close();
return true;
} else if (itemId == R.id.menu_favorite) {
note.setFavorite(!note.getFavorite());
repo.toggleFavoriteAndSync(localAccount, note.getId());
listener.onNoteUpdated(note);
prepareFavoriteOption(item);

View file

@ -1,4 +1,5 @@
- 📱️ Add option to not keep screen on (#1531)
- 🐞 Favorite star in menu not clickable (#1541)
- ⚙️ Add monochrome icon (#1544) - by @salixor
- ⚙️ Use the new Android 12 SplashScreen API (#1546) - by @salixor
- 🌎 Updated translations