Add account type check for Twitter deprecation

This commit is contained in:
Stuart Breckenridge 2023-02-05 21:29:19 +08:00
parent b2a2c5f5b9
commit d5c039b80f
No known key found for this signature in database
GPG Key ID: 64DCE361D27B805B

View File

@ -725,16 +725,18 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
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()