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