mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Adds account type check for Twitter deprecation alert
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user