mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-22 23:58:36 +01:00
Add account type check for Twitter deprecation
This commit is contained in:
parent
b2a2c5f5b9
commit
d5c039b80f
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user