From 8d52c786f6d3f410a013b73daab7c2b07d46b09d Mon Sep 17 00:00:00 2001 From: Kiryl Kaveryn Date: Tue, 28 Nov 2023 12:45:04 +0400 Subject: [PATCH] [ios] fix: search started criteria to correctly update observers Signed-off-by: Kiryl Kaveryn --- iphone/Maps/Core/Search/MWMSearch.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iphone/Maps/Core/Search/MWMSearch.mm b/iphone/Maps/Core/Search/MWMSearch.mm index 8c4cadf252..d5b13d5316 100644 --- a/iphone/Maps/Core/Search/MWMSearch.mm +++ b/iphone/Maps/Core/Search/MWMSearch.mm @@ -267,7 +267,7 @@ using Observers = NSHashTable; - (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];