From b83345a47f8a21db97b5c254fd47adf8424dfef8 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sun, 5 Feb 2023 21:30:44 +0800 Subject: [PATCH] Adds account type check for Twitter deprecation alert --- Mac/AppDelegate.swift | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index c355555b3..e337d1a29 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -965,16 +965,18 @@ internal extension AppDelegate { var twitterIsActive: Bool = false AccountManager.shared.accounts.forEach({ account in - account.flattenedWebFeeds().forEach({ webfeed in - guard let components = URLComponents(string: webfeed.url), - let host = components.host else { - return - } - if host == "twitter.com" { - twitterIsActive = true - return - } - }) + if account.type == .cloudKit || account.type == .onMyMac { + account.flattenedWebFeeds().forEach({ webfeed in + guard let components = URLComponents(string: webfeed.url), + let host = components.host else { + return + } + if host == "twitter.com" { + twitterIsActive = true + return + } + }) + } }) if twitterIsActive { showTwitterDeprecationAlert()