From 8568b1afa6d982368fa31002aebb41c0c1704e19 Mon Sep 17 00:00:00 2001 From: fmodf Date: Mon, 22 Jul 2024 20:36:31 +0200 Subject: [PATCH] wip --- ConversationsClassic/AppCore/AppStore.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ConversationsClassic/AppCore/AppStore.swift b/ConversationsClassic/AppCore/AppStore.swift index 7cce2c7..761d9e3 100644 --- a/ConversationsClassic/AppCore/AppStore.swift +++ b/ConversationsClassic/AppCore/AppStore.swift @@ -42,6 +42,9 @@ final class Store: ObservableObject { // Run reducers/middlewares func dispatch(_ action: Action) { + if !Thread.isMainThread { + print("❌WARNING!: AppStore.dispatch should be called from the main thread") + } serialQueue.sync { [weak self] in guard let wSelf = self else { return } let newState = wSelf.dispatch(wSelf.state, action)