[ios] fix: search started criteria to correctly update observers

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn 2023-11-28 12:45:04 +04:00 committed by Alexander Borsuk
parent 6a1321fddc
commit 8d52c786f6

View file

@ -267,7 +267,7 @@ using Observers = NSHashTable<Observer>;
- (void)setSearchCount:(NSInteger)searchCount {
NSAssert((searchCount >= 0) && ((_searchCount == searchCount - 1) || (_searchCount == searchCount + 1)),
@"Invalid search count update");
if (_searchCount == 0)
if (searchCount > 0)
[self onSearchStarted];
else if (searchCount == 0)
[self onSearchCompleted];