Skip to content
Snippets Groups Projects
Commit c8035c6f authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

fix: crash on deselect conversation

This patch ensure that new cells are not created when changing
conversation selections since it could lead to crash if conversation
filter was updated.

Change-Id: I28cd358deba1fe15ded7a64b06dd09f1bb43488e
parent 255d7c27
No related branches found
No related tags found
No related merge requests found
......@@ -191,6 +191,7 @@ NSInteger const REQUEST_SEG = 1;
}
[smartView reloadData];
[smartView layoutSubtreeIfNeeded];
if (!selectedUid_.empty() && convModel_ != nil) {
auto it = getConversationFromUid(selectedUid_, *convModel_);
......@@ -383,7 +384,7 @@ NSInteger const REQUEST_SEG = 1;
NSInteger rows = [smartView numberOfRows];
for (int i = 0; i< rows; i++) {
NSTableRowView* cellRowView = [smartView rowViewAtRow:i makeIfNecessary:YES];
NSTableRowView* cellRowView = [smartView rowViewAtRow:i makeIfNecessary: NO];
if (i == row) {
cellRowView.backgroundColor = [NSColor controlColor];
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment