refactor: move Highlight to its own file

This commit is contained in:
William Casarin
2023-01-23 10:38:53 -08:00
parent 0ead583bda
commit 7e1daf7816
3 changed files with 43 additions and 28 deletions

View File

@@ -0,0 +1,39 @@
//
// Highlight.swift
// damus
//
// Created by William Casarin on 2023-01-23.
//
import Foundation
import SwiftUI
enum Highlight {
case none
case main
case reply
case custom(Color, Float)
var is_main: Bool {
if case .main = self {
return true
}
return false
}
var is_none: Bool {
if case .none = self {
return true
}
return false
}
var is_replied_to: Bool {
switch self {
case .reply: return true
default: return false
}
}
}