2020-05-03 02:38:57 +02:00
//
// R e d d i t F e e d P r o v i d e r - E x t e n s i o n s . s w i f t
// N e t N e w s W i r e
//
// C r e a t e d b y M a u r i c e P a r k e r o n 5 / 2 / 2 0 .
// C o p y r i g h t © 2 0 2 0 R a n c h e r o S o f t w a r e . A l l r i g h t s r e s e r v e d .
//
import Foundation
import Account
extension RedditFeedProvider : ExtensionPoint {
static var isSinglton = false
static var isDeveloperBuildRestricted = true
static var title = NSLocalizedString ( " Reddit " , comment : " Reddit " )
2020-10-30 21:42:45 +01:00
static var image = AppAssets . extensionPointReddit
2020-05-03 02:38:57 +02:00
static var description : NSAttributedString = {
return RedditFeedProvider . makeAttrString ( " This extension enables you to subscribe to Reddit URL's as if they were RSS feeds. It only works with \( Account . defaultLocalAccountName ) or iCloud accounts. " )
} ( )
var extensionPointID : ExtensionPointIdentifer {
2020-05-03 20:23:36 +02:00
guard let username = username else {
fatalError ( )
}
2020-05-03 02:38:57 +02:00
return ExtensionPointIdentifer . reddit ( username )
}
var title : String {
2020-05-03 20:23:36 +02:00
guard let username = username else {
fatalError ( )
}
2020-05-10 18:44:30 +02:00
return " u/ \( username ) "
2020-05-03 02:38:57 +02:00
}
}