Skip to content

Commit

Permalink
Synchronize flag_seen with keyword Seen in load state, related to dbm…
Browse files Browse the repository at this point in the history
…ail#139 (temp)
  • Loading branch information
cncioranu committed Jan 8, 2022
1 parent 2d8ce40 commit 34c280a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dm_mailboxstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ static T state_load_messages(T M, Connection_T c, gboolean coldLoad)
uid = g_new0(uint64_t,1);
*uid = id;
//TRACE(TRACE_DEBUG, "SEQ FOUND %ld",id);
/* free all keywords, it will be added later again */
if (!result->keywords){
g_list_destroy(result->keywords);
}
}
}

Expand Down Expand Up @@ -202,10 +206,6 @@ static T state_load_messages(T M, Connection_T c, gboolean coldLoad)
//TRACE(TRACE_DEBUG, "SEQ Remove MSG EXPUNGING [ %" PRIu64 " expunge flag %d, was expunged %d]", *uid, result->expunge, result->expunged);
}
}
/* free all keywords, it will be added later again */
if (!result->keywords){
g_list_free(result->keywords);
}
/* add Seen as flag when IMAP_FLAGS_SEEN=1 */
if (result->flags[IMAP_FLAG_SEEN]==1){
result->keywords = g_list_append(result->keywords, g_strdup("Seen"));
Expand Down

0 comments on commit 34c280a

Please sign in to comment.