NetNewsWire/Shared/ExtensionPoints/RedditFeedProvider-Extensio...

37 lines
986 B
Swift
Raw Normal View History

//
// RedditFeedProvider-Extensions.swift
// NetNewsWire
//
// Created by Maurice Parker on 5/2/20.
// Copyright © 2020 Ranchero Software. All rights reserved.
//
import Foundation
import Account
extension RedditFeedProvider: ExtensionPoint {
static var isSinglton = false
static var isDeveloperBuildRestricted = true
static var title = NSLocalizedString("Reddit", comment: "Reddit")
static var templateImage = AppAssets.extensionPointReddit
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()
}
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)"
}
}