")
- }
-
- return html
- } else {
- return displayText
- }
- }
-
- func renderAsTweetHTML(_ status: TwitterStatus, topLevel: Bool) -> String {
- var html = "\(status.displayHTML ?? "")
"
-
- if !topLevel, let createdAt = status.createdAt, let url = status.url {
- let dateFormatter = DateFormatter()
- dateFormatter.dateStyle = .medium
- dateFormatter.timeStyle = .short
- html += ""
- }
-
- return html
- }
-
- func renderAsOriginalHTML(topLevel: Bool) -> String {
- var html = renderAsTweetHTML(self, topLevel: topLevel)
- html += extendedEntities?.renderAsHTML() ?? ""
- return html
- }
-
- func renderAsRetweetHTML(_ status: TwitterStatus) -> String {
- var html = ""
- if let userHTML = status.user?.renderAsHTML() {
- html += userHTML
- }
- html += status.renderAsHTML(topLevel: false)
- html += "
"
- return html
- }
-
- func renderAsQuoteHTML(_ quotedStatus: TwitterStatus, topLevel: Bool) -> String {
- var html = String()
- html += renderAsTweetHTML(self, topLevel: topLevel)
- html += extendedEntities?.renderAsHTML() ?? ""
- html += ""
- if let userHTML = quotedStatus.user?.renderAsHTML() {
- html += userHTML
- }
- html += quotedStatus.renderAsHTML(topLevel: false)
- html += "
"
- return html
- }
-
-}
diff --git a/Account/Sources/Account/FeedProvider/Twitter/TwitterSymbol.swift b/Account/Sources/Account/FeedProvider/Twitter/TwitterSymbol.swift
deleted file mode 100644
index 9b1119743..000000000
--- a/Account/Sources/Account/FeedProvider/Twitter/TwitterSymbol.swift
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-// TwitterSymbol.swift
-// Account
-//
-// Created by Maurice Parker on 4/18/20.
-// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
-//
-
-import Foundation
-
-struct TwitterSymbol: Codable, TwitterEntity {
-
- let text: String?
- let indices: [Int]?
-
- enum CodingKeys: String, CodingKey {
- case text = "text"
- case indices = "indices"
- }
-
- func renderAsHTML() -> String {
- var html = String()
- if let text = text {
- html += "$\(text)"
- }
- return html
- }
-
-}
diff --git a/Account/Sources/Account/FeedProvider/Twitter/TwitterURL.swift b/Account/Sources/Account/FeedProvider/Twitter/TwitterURL.swift
deleted file mode 100644
index d7f80c6b6..000000000
--- a/Account/Sources/Account/FeedProvider/Twitter/TwitterURL.swift
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// TwitterURL.swift
-// Account
-//
-// Created by Maurice Parker on 4/18/20.
-// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
-//
-
-import Foundation
-
-struct TwitterURL: Codable, TwitterEntity {
-
- let url: String?
- let indices: [Int]?
- let displayURL: String?
- let expandedURL: String?
-
- enum CodingKeys: String, CodingKey {
- case url = "url"
- case indices = "indices"
- case displayURL = "display_url"
- case expandedURL = "expanded_url"
- }
-
- func renderAsHTML() -> String {
- var html = String()
- if let expandedURL = expandedURL, let displayURL = displayURL {
- html += "\(displayURL)"
- }
- return html
- }
-
-}
diff --git a/Account/Sources/Account/FeedProvider/Twitter/TwitterUser.swift b/Account/Sources/Account/FeedProvider/Twitter/TwitterUser.swift
deleted file mode 100644
index e87b21bcb..000000000
--- a/Account/Sources/Account/FeedProvider/Twitter/TwitterUser.swift
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// TwitterUser.swift
-// Account
-//
-// Created by Maurice Parker on 4/16/20.
-// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
-//
-
-import Foundation
-
-struct TwitterUser: Codable {
-
- let name: String?
- let screenName: String?
- let avatarURL: String?
-
- enum CodingKeys: String, CodingKey {
- case name = "name"
- case screenName = "screen_name"
- case avatarURL = "profile_image_url_https"
- }
-
- var url: String {
- return "https://twitter.com/\(screenName ?? "")"
- }
-
- func renderAsHTML() -> String? {
- var html = String()
- html += ""
- return html
- }
-
-}
diff --git a/Account/Sources/Account/FeedProvider/Twitter/TwitterVideo.swift b/Account/Sources/Account/FeedProvider/Twitter/TwitterVideo.swift
deleted file mode 100644
index a6df96292..000000000
--- a/Account/Sources/Account/FeedProvider/Twitter/TwitterVideo.swift
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// TwitterVideoInfo.swift
-// Account
-//
-// Created by Maurice Parker on 4/18/20.
-// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
-//
-
-import Foundation
-
-
-struct TwitterVideo: Codable {
-
- let variants: [Variant]?
-
- enum CodingKeys: String, CodingKey {
- case variants = "variants"
- }
-
- struct Variant: Codable {
-
- let bitrate: Int?
- let contentType: String?
- let url: String?
-
- enum CodingKeys: String, CodingKey {
- case bitrate = "bitrate"
- case contentType = "content_type"
- case url = "url"
- }
-
- }
-
-}
diff --git a/Account/Sources/Account/WebFeed.swift b/Account/Sources/Account/WebFeed.swift
index d3a2604fe..3b4bda23c 100644
--- a/Account/Sources/Account/WebFeed.swift
+++ b/Account/Sources/Account/WebFeed.swift
@@ -244,17 +244,13 @@ public final class WebFeed: Feed, Renamable, Hashable {
// MARK: - NotificationDisplayName
public var notificationDisplayName: String {
#if os(macOS)
- if self.url.contains("twitter.com") {
- return NSLocalizedString("Show notifications for new tweets", comment: "notifyNameDisplay / Twitter")
- } else if self.url.contains("www.reddit.com") {
+ if self.url.contains("www.reddit.com") {
return NSLocalizedString("Show notifications for new posts", comment: "notifyNameDisplay / Reddit")
} else {
return NSLocalizedString("Show notifications for new articles", comment: "notifyNameDisplay / Default")
}
#else
- if self.url.contains("twitter.com") {
- return NSLocalizedString("Notify about new tweets", comment: "notifyNameDisplay / Twitter")
- } else if self.url.contains("www.reddit.com") {
+ if self.url.contains("www.reddit.com") {
return NSLocalizedString("Notify about new posts", comment: "notifyNameDisplay / Reddit")
} else {
return NSLocalizedString("Notify about new articles", comment: "notifyNameDisplay / Default")
diff --git a/Account/Tests/AccountTests/Feedly/FeedlyTestSecrets.swift b/Account/Tests/AccountTests/Feedly/FeedlyTestSecrets.swift
index 065e916fe..d5f36d5a5 100644
--- a/Account/Tests/AccountTests/Feedly/FeedlyTestSecrets.swift
+++ b/Account/Tests/AccountTests/Feedly/FeedlyTestSecrets.swift
@@ -14,8 +14,6 @@ struct FeedlyTestSecrets: SecretsProvider {
var mercuryClientSecret = ""
var feedlyClientId = ""
var feedlyClientSecret = ""
- var twitterConsumerKey = ""
- var twitterConsumerSecret = ""
var redditConsumerKey = ""
var inoreaderAppId = ""
var inoreaderAppKey = ""
diff --git a/Mac/AppAssets.swift b/Mac/AppAssets.swift
index 74c69df40..0c38ecd6d 100644
--- a/Mac/AppAssets.swift
+++ b/Mac/AppAssets.swift
@@ -91,10 +91,6 @@ struct AppAssets {
return RSImage(named: "extensionPointReddit")!
}()
- static var extensionPointTwitter: RSImage = {
- return RSImage(named: "extensionPointTwitter")!
- }()
-
static var faviconTemplateImage: RSImage = {
return RSImage(named: "faviconTemplateImage")!
}()
diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift
index 42c8d9729..b3a278556 100644
--- a/Mac/AppDelegate.swift
+++ b/Mac/AppDelegate.swift
@@ -478,13 +478,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
return ExtensionPointManager.shared.isRedditEnabled
}
- if item.action == #selector(showAddTwitterFeedWindow(_:)) {
- guard !isDisplayingSheet && isSpecialAccountAvailable && ExtensionPointManager.shared.isTwitterEnabled else {
- return false
- }
- return ExtensionPointManager.shared.isTwitterEnabled
- }
-
#if !MAC_APP_STORE
if item.action == #selector(toggleWebInspectorEnabled(_:)) {
(item as! NSMenuItem).state = AppDefaults.shared.webInspectorEnabled ? .on : .off
@@ -564,12 +557,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
addFeedController?.showAddFeedSheet(.redditFeed)
}
- @IBAction func showAddTwitterFeedWindow(_ sender: Any?) {
- createAndShowMainWindowIfNecessary()
- addFeedController = AddFeedController(hostWindow: mainWindowController!.window!)
- addFeedController?.showAddFeedSheet(.twitterFeed)
- }
-
@IBAction func showAddFolderWindow(_ sender: Any?) {
createAndShowMainWindowIfNecessary()
showAddFolderSheetOnWindow(mainWindowController!.window!)
diff --git a/Mac/Base.lproj/AddTwitterFeedSheet.xib b/Mac/Base.lproj/AddTwitterFeedSheet.xib
deleted file mode 100644
index d449a42eb..000000000
--- a/Mac/Base.lproj/AddTwitterFeedSheet.xib
+++ /dev/null
@@ -1,200 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Mac/Base.lproj/Main.storyboard b/Mac/Base.lproj/Main.storyboard
index d7e35cf17..57ca26329 100644
--- a/Mac/Base.lproj/Main.storyboard
+++ b/Mac/Base.lproj/Main.storyboard
@@ -1,8 +1,8 @@
-
+
-
+
@@ -80,12 +80,6 @@
-