forked from shadowfacts/Tusker
44 lines
949 B
Swift
44 lines
949 B
Swift
// Timline+UI.swift
|
|
// Tusker
|
|
//
|
|
// Created by Shadowfacts on 6/11/19.
|
|
// Copyright © 2019 Shadowfacts. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
import Pachyderm
|
|
|
|
extension Timeline {
|
|
|
|
var title: String {
|
|
switch self {
|
|
case .home:
|
|
return "Home"
|
|
case let .public(local):
|
|
return local ? "Local" : "Federated"
|
|
case let .tag(hashtag):
|
|
return "#\(hashtag)"
|
|
case .list:
|
|
return "List"
|
|
case .direct:
|
|
return "Direct"
|
|
}
|
|
}
|
|
|
|
var tabBarImage: UIImage? {
|
|
switch self {
|
|
case .home:
|
|
return UIImage(systemName: "house.fill")
|
|
case let .public(local):
|
|
if local {
|
|
return UIImage(systemName: "person.and.person.fill")
|
|
} else {
|
|
return UIImage(systemName: "globe")
|
|
}
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
|
|
}
|