From 6a1539bb3dbe2ca55c5c90786cd8aada9ca236f8 Mon Sep 17 00:00:00 2001 From: Mark Jerde Date: Sat, 15 Jan 2022 06:40:16 -0600 Subject: [PATCH] Fix main thread bug --- Flycut-iOS/ViewController.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Flycut-iOS/ViewController.swift b/Flycut-iOS/ViewController.swift index 8cdbe3f..96eb4b7 100644 --- a/Flycut-iOS/ViewController.swift +++ b/Flycut-iOS/ViewController.swift @@ -445,8 +445,9 @@ class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour } func notifyCKAccountStatusNoAccount() { - if ( !self.ignoreCKAccountStatusNoAccount ) - { + DispatchQueue.main.async { + guard !self.ignoreCKAccountStatusNoAccount else { return } + let alert = UIAlertController(title: "No iCloud Account", message: "An iCloud account with iCloud Drive enabled is required for iCloud sync.", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "Preferences", style: .default, handler: { (_) in if #available(iOS 10.0, *)