commit 532eaa35bfc975d68eda62771c070b6fe0bb5255
parent b532dc48e1b5ba09c0c9578d6aa982ad649e1561
Author: William Casarin <jb55@jb55.com>
Date: Thu, 6 Apr 2023 08:27:04 -0700
pointless refactors
Diffstat:
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/damus/Components/TranslateView.swift b/damus/Components/TranslateView.swift
@@ -102,10 +102,10 @@ struct TranslateView: View {
}
}
- if let translated = translated_note {
+ if let translated_note {
// Render translated note.
- let translatedBlocks = event.get_blocks(content: translated)
- translated_artifacts = render_blocks(blocks: translatedBlocks, profiles: damus_state.profiles, privkey: damus_state.keypair.privkey)
+ let translated_blocks = event.get_blocks(content: translated_note)
+ translated_artifacts = render_blocks(blocks: translated_blocks, profiles: damus_state.profiles, privkey: damus_state.keypair.privkey)
}
checkingTranslationStatus = false
diff --git a/damus/Views/EventView.swift b/damus/Views/EventView.swift
@@ -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 {