[ios] add assert on second LoadBookmarks call

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn 2024-05-24 17:57:57 +04:00 committed by Roman Tsisyk
parent fbb27efe12
commit 35be2a37d7
2 changed files with 4 additions and 2 deletions

View file

@ -1990,10 +1990,11 @@ BookmarkManager::KMLDataCollectionPtr BookmarkManager::LoadBookmarks(
void BookmarkManager::LoadBookmarks()
{
CHECK_THREAD_CHECKER(m_threadChecker, ());
ClearCategories();
CHECK(!m_loadBookmarksCalled, ("LoadBookmarks should be called only once."));
m_loadBookmarksCalled = true;
LoadMetadata();
m_loadBookmarksFinished = false;
NotifyAboutStartAsyncLoading();
GetPlatform().RunTask(Platform::Thread::File, [this]()
{

View file

@ -740,6 +740,7 @@ private:
AsyncLoadingCallbacks m_asyncLoadingCallbacks;
std::atomic<bool> m_needTeardown;
size_t m_openedEditSessionsCount = 0;
bool m_loadBookmarksCalled = false;
bool m_loadBookmarksFinished = false;
bool m_firstDrapeNotification = false;
bool m_notificationsEnabled = true;