pointless refactors
This commit is contained in:
@@ -14,28 +14,6 @@ enum EventViewKind {
|
||||
case selected
|
||||
}
|
||||
|
||||
func eventviewsize_to_font(_ size: EventViewKind) -> Font {
|
||||
switch size {
|
||||
case .small:
|
||||
return .body
|
||||
case .normal:
|
||||
return .body
|
||||
case .selected:
|
||||
return .custom("selected", size: 21.0)
|
||||
}
|
||||
}
|
||||
|
||||
func eventviewsize_to_uifont(_ size: EventViewKind) -> UIFont {
|
||||
switch size {
|
||||
case .small:
|
||||
return .preferredFont(forTextStyle: .body)
|
||||
case .normal:
|
||||
return .preferredFont(forTextStyle: .body)
|
||||
case .selected:
|
||||
return .preferredFont(forTextStyle: .title2)
|
||||
}
|
||||
}
|
||||
|
||||
struct EventView: View {
|
||||
let event: NostrEvent
|
||||
let options: EventViewOptions
|
||||
@@ -156,6 +134,28 @@ func make_actionbar_model(ev: String, damus: DamusState) -> ActionBarModel {
|
||||
return model
|
||||
}
|
||||
|
||||
func eventviewsize_to_font(_ size: EventViewKind) -> Font {
|
||||
switch size {
|
||||
case .small:
|
||||
return .body
|
||||
case .normal:
|
||||
return .body
|
||||
case .selected:
|
||||
return .custom("selected", size: 21.0)
|
||||
}
|
||||
}
|
||||
|
||||
func eventviewsize_to_uifont(_ size: EventViewKind) -> UIFont {
|
||||
switch size {
|
||||
case .small:
|
||||
return .preferredFont(forTextStyle: .body)
|
||||
case .normal:
|
||||
return .preferredFont(forTextStyle: .body)
|
||||
case .selected:
|
||||
return .preferredFont(forTextStyle: .title2)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct EventView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
|
||||
Reference in New Issue
Block a user