Disable Twitter Extension Point for Developer Build.
This commit is contained in:
parent
7b37f51f59
commit
0ac5a6dbca
@ -16,6 +16,7 @@ import RSCore
|
||||
protocol ExtensionPoint {
|
||||
|
||||
static var isSinglton: Bool { get }
|
||||
static var isDeveloperBuildRestricted: Bool { get }
|
||||
static var title: String { get }
|
||||
static var templateImage: RSImage { get }
|
||||
static var description: NSAttributedString { get }
|
||||
|
@ -26,12 +26,14 @@ final class ExtensionPointManager: FeedProviderManagerDelegate {
|
||||
let activeExtensionPointTypes = activeExtensionPoints.keys.compactMap({ ObjectIdentifier($0.extensionPointType) })
|
||||
var available = [ExtensionPoint.Type]()
|
||||
for possibleExtensionPointType in possibleExtensionPointTypes {
|
||||
if possibleExtensionPointType.isSinglton {
|
||||
if !activeExtensionPointTypes.contains(ObjectIdentifier(possibleExtensionPointType)) {
|
||||
if !(AppDefaults.isDeveloperBuild && possibleExtensionPointType.isDeveloperBuildRestricted) {
|
||||
if possibleExtensionPointType.isSinglton {
|
||||
if !activeExtensionPointTypes.contains(ObjectIdentifier(possibleExtensionPointType)) {
|
||||
available.append(possibleExtensionPointType)
|
||||
}
|
||||
} else {
|
||||
available.append(possibleExtensionPointType)
|
||||
}
|
||||
} else {
|
||||
available.append(possibleExtensionPointType)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ import Articles
|
||||
final class SendToMarsEditCommand: ExtensionPoint, SendToCommand {
|
||||
|
||||
static var isSinglton = true
|
||||
static var isDeveloperBuildRestricted = false
|
||||
static var title = NSLocalizedString("MarsEdit", comment: "MarsEdit")
|
||||
static var templateImage = AppAssets.extensionPointMarsEdit
|
||||
static var description: NSAttributedString = {
|
||||
|
@ -14,7 +14,8 @@ import RSCore
|
||||
|
||||
final class SendToMicroBlogCommand: ExtensionPoint, SendToCommand {
|
||||
|
||||
static var isSinglton: Bool = true
|
||||
static var isSinglton = true
|
||||
static var isDeveloperBuildRestricted = false
|
||||
static var title: String = NSLocalizedString("Micro.blog", comment: "Micro.blog")
|
||||
static var templateImage = AppAssets.extensionPointMicroblog
|
||||
static var description: NSAttributedString = {
|
||||
|
@ -12,6 +12,7 @@ import Account
|
||||
extension TwitterFeedProvider: ExtensionPoint {
|
||||
|
||||
static var isSinglton = false
|
||||
static var isDeveloperBuildRestricted = true
|
||||
static var title = NSLocalizedString("Twitter", comment: "Twitter")
|
||||
static var templateImage = AppAssets.extensionPointTwitter
|
||||
static var description: NSAttributedString = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user