Files
GitHawk/Classes/Notifications/NotificationType.swift
Rizwan Mohamed Ibrahim bd10b4e032 Add Bookmarks tab (#601)
* [ADD] Bookmarks for repo, issues and pull request

* [FIX] Bookmark model decoding from archive

* [ADD] Clear all option for bookmarks

* [ADD] Search bookmarks with search bar

* [ADD] Swipe to delete for bookmarks (only when search bar is not active)

* [ADD] Bookmark cell accessible and some cleanup

* [ADD] Incorporate review comments

* [ADD] Reuse notification type instead of bookmark type

* [ADD] Incorporate review comments
- Enum over struct on bookmark model
- Github bookmark tab icon
- Smooth deselection, Single tap to scroll to top, cleanup
-
2017-10-22 14:00:50 -04:00

30 lines
711 B
Swift

//
// NotificationType.swift
// Freetime
//
// Created by Ryan Nystrom on 5/13/17.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import Foundation
// https://github.com/octokit/octokit.objc/blob/master/OctoKit/OCTNotification.m#L63-L65
enum NotificationType: String {
case issue = "Issue"
case pullRequest = "PullRequest"
case commit = "Commit"
case repo = "Repository"
}
extension NotificationType {
var localizedString: String {
switch self {
case .issue, .commit, .repo:
return NSLocalizedString(self.rawValue, comment: "")
case .pullRequest:
return NSLocalizedString("Pull request", comment: "")
}
}
}