Skip to content

Commit

Permalink
Remove ReaderTopicType
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Nov 8, 2024
1 parent 02b5316 commit acc85a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,38 +243,6 @@ struct ReaderNotificationKeys {
Blog.lookup(withID: siteID, in: ContextManager.sharedInstance().mainContext)?.isAdmin ?? false
}

// convenience method that returns the topic type
class func topicType(_ topic: ReaderAbstractTopic?) -> ReaderTopicType {
guard let topic = topic else {
return .noTopic
}
if topicIsDiscover(topic) {
return .discover
}
if topicIsFollowing(topic) {
return .following
}
if topicIsLiked(topic) {
return .likes
}
if isTopicList(topic) {
return .list
}
if isTopicSearchTopic(topic) {
return .search
}
if isTopicSite(topic) {
return .site
}
if isTopicTag(topic) {
return .tag
}
if topic is ReaderTeamTopic {
return .organization
}
return .noTopic
}

// MARK: Logged in helper

@objc open class func isLoggedIn() -> Bool {
Expand Down Expand Up @@ -510,19 +478,6 @@ struct ReaderNotificationKeys {
}
}

/// Typed topic type
enum ReaderTopicType {
case discover
case following
case likes
case list
case search
case site
case tag
case organization
case noTopic
}

@objc enum SiteOrganizationType: Int {
// site does not belong to an organization
case none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ enum ReaderStaticScreen: String, CaseIterable, Identifiable, Hashable {
}
}

var topicType: ReaderTopicType? {
switch self {
case .recent: .following
case .discover: .discover
case .saved: nil
case .likes: .likes
case .search: nil
}
}

var accessibilityIdentifier: String {
"reader_sidebar_\(rawValue)"
}
Expand Down

0 comments on commit acc85a4

Please sign in to comment.