diff --git a/Reader/AppDelegate.swift b/Reader/AppDelegate.swift index d4e25c2..ed0cd87 100644 --- a/Reader/AppDelegate.swift +++ b/Reader/AppDelegate.swift @@ -34,7 +34,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { override func buildMenu(with builder: UIMenuBuilder) { if builder.system == .main { - var children: [UIMenuElement] = LocalData.accounts.map { account in + + + var children = [UIMenuElement]() + let accounts: [UIMenuElement] = LocalData.accounts.map { account in var title = account.instanceURL.host! if let port = account.instanceURL.port, port != 80 && port != 443 { title += ":\(port)" @@ -56,6 +59,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { UIApplication.shared.requestSceneSessionActivation(nil, userActivity: activity, options: options, errorHandler: nil) } } + children.append(UIMenu(options: .displayInline, children: accounts)) children.append(UIAction(title: "Add Account...", handler: { _ in let activity = NSUserActivity.addAccount() let options = UIScene.ActivationRequestOptions()