1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 10:17:18 +00:00

Set/reset Gmail specific starred label

This commit is contained in:
M66B 2021-02-09 17:39:11 +01:00
parent 52056956c1
commit 05f453b67b

View file

@ -704,7 +704,7 @@ class Core {
db.message().setMessageUiSeen(folder.id, seen);
}
private static void onFlag(Context context, JSONArray jargs, EntityFolder folder, EntityMessage message, IMAPFolder ifolder) throws MessagingException, JSONException {
private static void onFlag(Context context, JSONArray jargs, EntityFolder folder, EntityMessage message, IMAPFolder ifolder) throws MessagingException, JSONException, IOException {
// Star/unstar message
DB db = DB.getInstance(context);
@ -723,6 +723,8 @@ class Core {
throw new MessageRemovedException();
imessage.setFlag(Flags.Flag.FLAGGED, flagged);
if (imessage instanceof GmailMessage)
((GmailMessage) imessage).setLabels(new String[]{"\\Starred"}, flagged);
db.message().setMessageFlagged(message.id, flagged);
}