Files
GitHawk/Classes/Notifications/SegmentedControlModel+Notifications.swift
Weyert de Boer 1ffda90eae Renamed Strings.swift to Constants.swift (#517)
* Renamed `Strings.swift` to `Constants.swift`, fixes #498
Added the product urls to `Constants.swift`, partly fixes #494

* Wrapped the strings in a `Strings`-enum

* Really shouldn't manually retype things

* Update project.pbxproj
2017-10-14 11:06:25 -04:00

22 lines
487 B
Swift

//
// SegmentedControlModel+Notifications.swift
// Freetime
//
// Created by Ryan Nystrom on 7/6/17.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import Foundation
extension SegmentedControlModel {
static func forNotifications() -> SegmentedControlModel {
return SegmentedControlModel(items: [Constants.Strings.unread, Constants.Strings.all])
}
var unreadSelected: Bool {
return items[selectedIndex] == Constants.Strings.unread
}
}