mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
message_storage.c: remove invalid assert in linphone_chat_room_delete_message and force recomputation of unread messages count after removal, since database is not synced anymore with chat messages in memory
This commit is contained in:
parent
d9a2fb2e08
commit
91352ffccd
1 changed files with 3 additions and 4 deletions
|
|
@ -417,10 +417,9 @@ void linphone_chat_room_delete_message(LinphoneChatRoom *cr, LinphoneChatMessage
|
|||
linphone_sql_request(lc->db,buf);
|
||||
sqlite3_free(buf);
|
||||
|
||||
if(cr->unread_count >= 0 && !msg->is_read) {
|
||||
assert(cr->unread_count > 0);
|
||||
cr->unread_count--;
|
||||
}
|
||||
/* Invalidate unread_count when we modify the database, so that next
|
||||
time we need it it will be recomputed from latest database state */
|
||||
cr->unread_count = -1;
|
||||
}
|
||||
|
||||
void linphone_chat_room_delete_history(LinphoneChatRoom *cr){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue