mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-03 16:41:26 +01:00
fix(ios): await the engine before stopping a crawl
NativeRuntime.engine() is async and throws on iOS, so the bare call in stopCrawl failed the simulator build. Run it in a Task, as Android runs it in a coroutine.
This commit is contained in:
1 parent
04fc1f04fe
commit
fb3a97b408
1 file changed
+1
-1
@@ -166,7 +166,7 @@ final class AppModel {
|
||||
/// the one being read keeps what it had.
|
||||
func stopCrawl() {
|
||||
crawlStopped = true
|
||||
NativeRuntime.engine().stopCrawl()
|
||||
Task { try? await NativeRuntime.engine().stopCrawl() }
|
||||
}
|
||||
|
||||
/// The crawl itself, for pull to refresh, which holds its spinner until
|
||||
|
||||
Reference in new issue
Block a user