many updates

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-04-25 08:28:07 -07:00
parent cb463c6da9
commit ce989450f4
14 changed files with 185 additions and 74 deletions

View File

@@ -12,12 +12,20 @@ enum Highlight {
case none
case main
case reply
case custom(Color, Float)
var is_none: Bool {
switch self {
case .none: return true
default: return false
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 {
@@ -40,6 +48,9 @@ struct EventView: View {
HStack {
VStack {
ProfilePicView(picture: profile?.picture, size: PFP_SIZE!, highlight: highlight)
.onTapGesture {
NotificationCenter.default.post(name: .click_profile_pic, object: event.pubkey)
}
Spacer()
}