From f8dc9f42dd49171998260dcb2aabcca6f5a6fe89 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 26 Dec 2022 07:37:42 -0800 Subject: [PATCH 01/13] Fix profile and event loading in global view Changelog-Fixed: Fix profile and event loading in global view --- damus/Nostr/RelayPool.swift | 17 +++++++++++++---- damus/Views/SearchHomeView.swift | 2 -- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/damus/Nostr/RelayPool.swift b/damus/Nostr/RelayPool.swift index f38a2a9d..aa797142 100644 --- a/damus/Nostr/RelayPool.swift +++ b/damus/Nostr/RelayPool.swift @@ -41,12 +41,19 @@ class RelayPool { } func remove_handler(sub_id: String) { - handlers = handlers.filter { $0.sub_id != sub_id } + self.handlers = handlers.filter { $0.sub_id != sub_id } + print("removing \(sub_id) handler, current: \(handlers.count)") } func register_handler(sub_id: String, handler: @escaping (String, NostrConnectionEvent) -> ()) { - + for handler in handlers { + // don't add duplicate handlers + if handler.sub_id == sub_id { + return + } + } self.handlers.append(RelayHandler(sub_id: sub_id, callback: handler)) + print("registering \(sub_id) handler, current: \(self.handlers.count)") } func remove_relay(_ relay_id: String) { @@ -125,8 +132,10 @@ class RelayPool { } func unsubscribe(sub_id: String, to: [String]? = nil) { - self.remove_handler(sub_id: sub_id) - self.send(.unsubscribe(sub_id)) + if to == nil { + self.remove_handler(sub_id: sub_id) + } + self.send(.unsubscribe(sub_id), to: to) } func subscribe(sub_id: String, filters: [NostrFilter], handler: @escaping (String, NostrConnectionEvent) -> ()) { diff --git a/damus/Views/SearchHomeView.swift b/damus/Views/SearchHomeView.swift index 27fae882..71c3bfda 100644 --- a/damus/Views/SearchHomeView.swift +++ b/damus/Views/SearchHomeView.swift @@ -85,8 +85,6 @@ struct SearchHomeView: View { print("search change 1") } .onAppear { - // TODO: This will always be empty when switching between tabs - // We'll need to store these in if model.events.isEmpty { model.subscribe() } From a4d62d295c79686c0989854bec89c0846f7cb006 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 26 Dec 2022 07:38:19 -0800 Subject: [PATCH 02/13] Only reload global view on pulldown refresh Changelog-Changed: Only reload global view on pulldown refresh --- damus/ContentView.swift | 5 ++++- damus/Models/SearchHomeModel.swift | 9 +++++---- damus/Views/SearchHomeView.swift | 7 +++++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/damus/ContentView.swift b/damus/ContentView.swift index 9b05b382..4f772e88 100644 --- a/damus/ContentView.swift +++ b/damus/ContentView.swift @@ -68,6 +68,8 @@ struct ContentView: View { @State var thread_open: Bool = false @State var search_open: Bool = false @State var filter_state : FilterState = .posts_and_replies + + @StateObject var search: SearchHomeModel = SearchHomeModel() @StateObject var home: HomeModel = HomeModel() // connect retry timer @@ -133,7 +135,7 @@ struct ContentView: View { } switch selected_timeline { case .search: - SearchHomeView(damus_state: damus_state!, model: SearchHomeModel(damus_state: damus_state!)) + SearchHomeView(damus_state: damus_state!, model: search) case .home: PostingTimelineView @@ -403,6 +405,7 @@ struct ContentView: View { dms: home.dms ) home.damus_state = self.damus_state! + search.damus_state = self.damus_state! pool.connect() } diff --git a/damus/Models/SearchHomeModel.swift b/damus/Models/SearchHomeModel.swift index 9783c5cf..7ce9825b 100644 --- a/damus/Models/SearchHomeModel.swift +++ b/damus/Models/SearchHomeModel.swift @@ -10,17 +10,18 @@ import Foundation /// The data model for the SearchHome view, typically something global-like class SearchHomeModel: ObservableObject { - @Published var events: [NostrEvent] = [] + @Published var events: [NostrEvent] @Published var loading: Bool = false var seen_pubkey: Set = Set() - let damus_state: DamusState + var damus_state: DamusState let base_subid = UUID().description let profiles_subid = UUID().description let limit: UInt32 = 250 - init(damus_state: DamusState) { - self.damus_state = damus_state + init() { + self.events = [] + self.damus_state = .empty } func get_base_filter() -> NostrFilter { diff --git a/damus/Views/SearchHomeView.swift b/damus/Views/SearchHomeView.swift index 71c3bfda..c14b1bc6 100644 --- a/damus/Views/SearchHomeView.swift +++ b/damus/Views/SearchHomeView.swift @@ -10,7 +10,7 @@ import CryptoKit struct SearchHomeView: View { let damus_state: DamusState - @StateObject var model: SearchHomeModel + @ObservedObject var model: SearchHomeModel @State var search: String = "" var SearchInput: some View { @@ -95,12 +95,15 @@ struct SearchHomeView: View { } } +/* struct SearchHomeView_Previews: PreviewProvider { static var previews: some View { let state = test_damus_state() SearchHomeView( damus_state: state, - model: SearchHomeModel(damus_state: state) + model: SearchHomeModel() ) } } + +*/ From 1d1e0c553b3d0796e6fcbdf2692e00cf73cdff30 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 26 Dec 2022 07:54:40 -0800 Subject: [PATCH 03/13] nip05: fix identifier format in profile editor Changelog-Fixed: Fixed nip05 identifier format in profile editor --- damus/Views/EditMetadataView.swift | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/damus/Views/EditMetadataView.swift b/damus/Views/EditMetadataView.swift index f5e9f735..71b65d3a 100644 --- a/damus/Views/EditMetadataView.swift +++ b/damus/Views/EditMetadataView.swift @@ -15,6 +15,11 @@ func isHttpsUrl(_ string: String) -> Bool { return urlTest.evaluate(with: string) } +struct NIP05 { + let username: String + let host: String +} + func isImage(_ urlString: String) -> Bool { let imageTypes = ["image/jpg", "image/jpeg", "image/png", "image/gif", "image/tiff", "image/bmp", "image/webp"] @@ -95,6 +100,14 @@ struct EditMetadataView: View { } } + var nip05_parts: NIP05? { + let parts = nip05.split(separator: "@") + guard parts.count == 2 else { + return nil + } + return NIP05(username: String(parts[0]), host: String(parts[1])) + } + var body: some View { VStack(alignment: .leading) { HStack { @@ -149,13 +162,17 @@ struct EditMetadataView: View { } Section(content: { - TextField("example.com", text: $nip05) + TextField("jb55@jb55.com", text: $nip05) .autocorrectionDisabled(true) .textInputAutocapitalization(.never) }, header: { Text("NIP-05 Verification") }, footer: { - Text("\(name)@\(nip05) will be used for verification") + if let parts = nip05_parts { + Text("'\(parts.username)' at '\(parts.host)' will be used for verification") + } else { + Text("'\(nip05)' is an invalid nip05 identifier. It should look like an email.") + } }) Button("Save") { From 9770e61d9dc3d1bd67cb38bdd99db4f76b1a569e Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 26 Dec 2022 08:02:36 -0800 Subject: [PATCH 04/13] Fix bug where typing the first character in the search box defocuses Changelog-Fixed: Fix bug where typing the first character in the search box defocuses --- damus/Views/SearchHomeView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/damus/Views/SearchHomeView.swift b/damus/Views/SearchHomeView.swift index c14b1bc6..822d9606 100644 --- a/damus/Views/SearchHomeView.swift +++ b/damus/Views/SearchHomeView.swift @@ -70,7 +70,9 @@ struct SearchHomeView: View { @Environment(\.colorScheme) var colorScheme var body: some View { - MainContent + VStack { + MainContent + } .safeAreaInset(edge: .top) { VStack(spacing: 0) { SearchInput From 8de1a3a97233d8e73aa4da2b8d8db834601d5141 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 26 Dec 2022 08:17:54 -0800 Subject: [PATCH 05/13] v0.1.8 (4) --- CHANGELOG.md | 29 ++++++++++++++++++++++++++++- damus.xcodeproj/project.pbxproj | 6 +++--- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa869323..ffeef3e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ +## [0.1.8-4] - 2022-12-26 -## [0.1.9] - 2022-12-23 +### Added + + - Long press lightning tip button to copy lnurl + + +### Changed + + - Only reload global view on pulldown refresh + - Save privkey in keychain instead of user defaults + - Also show inline images from friend-of-friends + - Show rounded corners on inline images + + +### Fixed + + - Fix bug where typing the first character in the search box defocuses + - Fixed nip05 identifier format in profile editor + - Fix profile and event loading in global view + - Fix lightning tip button sometimes not working + - Make about me multi-line in profile editor + + +[0.1.8-4]: https://github.com/damus-io/damus/releases/tag/v0.1.8-4 + +## [0.1.8-3] - 2022-12-23 ### Added @@ -138,3 +163,5 @@ [0.1.2]: https://github.com/damus-io/damus/releases/tag/v0.1.2 + + diff --git a/damus.xcodeproj/project.pbxproj b/damus.xcodeproj/project.pbxproj index a388fa75..cacd12b5 100644 --- a/damus.xcodeproj/project.pbxproj +++ b/damus.xcodeproj/project.pbxproj @@ -129,8 +129,8 @@ 4CEE2AF7280B2DEA00AB5EEF /* ProfileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CEE2AF6280B2DEA00AB5EEF /* ProfileName.swift */; }; 4CEE2AF9280B2EAC00AB5EEF /* PowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CEE2AF8280B2EAC00AB5EEF /* PowView.swift */; }; 4CEE2B02280B39E800AB5EEF /* EventActionBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CEE2B01280B39E800AB5EEF /* EventActionBar.swift */; }; - E990020F2955F837003BBC5A /* EditMetadataView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E990020E2955F837003BBC5A /* EditMetadataView.swift */; }; 6C7DE41F2955169800E66263 /* Vault in Frameworks */ = {isa = PBXBuildFile; productRef = 6C7DE41E2955169800E66263 /* Vault */; }; + E990020F2955F837003BBC5A /* EditMetadataView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E990020E2955F837003BBC5A /* EditMetadataView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -1027,7 +1027,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = damus/damus.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_ASSET_PATHS = "\"damus/Preview Content\""; DEVELOPMENT_TEAM = XK7H4JAB3D; ENABLE_PREVIEWS = YES; @@ -1066,7 +1066,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = damus/damus.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_ASSET_PATHS = "\"damus/Preview Content\""; DEVELOPMENT_TEAM = XK7H4JAB3D; ENABLE_PREVIEWS = YES; From 90bbd90a31933433a36d2e5fcb5383a2420af279 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 26 Dec 2022 10:30:07 -0800 Subject: [PATCH 06/13] event-context: Rename "Copy Note" to "Copy Note JSON" Changelog-Changed: Rename "Copy Note" to "Copy Note JSON" --- damus/Views/EventView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/damus/Views/EventView.swift b/damus/Views/EventView.swift index a17e3635..e5721e0b 100644 --- a/damus/Views/EventView.swift +++ b/damus/Views/EventView.swift @@ -214,7 +214,7 @@ extension View { Button { UIPasteboard.general.string = event_to_json(ev: event) } label: { - Label("Copy Note", systemImage: "note") + Label("Copy Note JSON", systemImage: "note") } Button { From d84320bb2cf36f9c702ce6f9fde4e0bacebdf0ac Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 26 Dec 2022 10:31:01 -0800 Subject: [PATCH 07/13] Fix bug where booster's names are not displayed Changelog-Fixed: Fixed bug where booster's names are not displayed --- damus/Views/EventView.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/damus/Views/EventView.swift b/damus/Views/EventView.swift index e5721e0b..f21b7b62 100644 --- a/damus/Views/EventView.swift +++ b/damus/Views/EventView.swift @@ -79,6 +79,7 @@ struct EventView: View { VStack(alignment: .leading) { let prof_model = ProfileModel(pubkey: event.pubkey, damus: damus) let follow_model = FollowersModel(damus_state: damus, target: event.pubkey) + let prof = damus.profiles.lookup(id: event.pubkey) let booster_profile = ProfileView(damus_state: damus, profile: prof_model, followers: follow_model) NavigationLink(destination: booster_profile) { @@ -86,11 +87,9 @@ struct EventView: View { Image(systemName: "arrow.2.squarepath") .font(.footnote.weight(.bold)) .foregroundColor(Color.gray) - if let prof = damus.profiles.lookup(id: event.pubkey) { - Text(Profile.displayName(profile: prof, pubkey: event.pubkey)) + ProfileName(pubkey: event.pubkey, profile: prof, contacts: damus.contacts, show_friend_confirmed: true) .font(.footnote.weight(.bold)) .foregroundColor(Color.gray) - } Text("Boosted") .font(.footnote.weight(.bold)) .foregroundColor(Color.gray) From fae626b6c7ff0934b45a13848cd854c037386bbd Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 26 Dec 2022 19:01:53 -0800 Subject: [PATCH 08/13] Revert "Only reload global view on pulldown refresh" This reverts commit a4d62d295c79686c0989854bec89c0846f7cb006. --- damus/ContentView.swift | 5 +---- damus/Models/SearchHomeModel.swift | 9 ++++----- damus/Views/SearchHomeView.swift | 7 ++----- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/damus/ContentView.swift b/damus/ContentView.swift index 4f772e88..9b05b382 100644 --- a/damus/ContentView.swift +++ b/damus/ContentView.swift @@ -68,8 +68,6 @@ struct ContentView: View { @State var thread_open: Bool = false @State var search_open: Bool = false @State var filter_state : FilterState = .posts_and_replies - - @StateObject var search: SearchHomeModel = SearchHomeModel() @StateObject var home: HomeModel = HomeModel() // connect retry timer @@ -135,7 +133,7 @@ struct ContentView: View { } switch selected_timeline { case .search: - SearchHomeView(damus_state: damus_state!, model: search) + SearchHomeView(damus_state: damus_state!, model: SearchHomeModel(damus_state: damus_state!)) case .home: PostingTimelineView @@ -405,7 +403,6 @@ struct ContentView: View { dms: home.dms ) home.damus_state = self.damus_state! - search.damus_state = self.damus_state! pool.connect() } diff --git a/damus/Models/SearchHomeModel.swift b/damus/Models/SearchHomeModel.swift index 7ce9825b..9783c5cf 100644 --- a/damus/Models/SearchHomeModel.swift +++ b/damus/Models/SearchHomeModel.swift @@ -10,18 +10,17 @@ import Foundation /// The data model for the SearchHome view, typically something global-like class SearchHomeModel: ObservableObject { - @Published var events: [NostrEvent] + @Published var events: [NostrEvent] = [] @Published var loading: Bool = false var seen_pubkey: Set = Set() - var damus_state: DamusState + let damus_state: DamusState let base_subid = UUID().description let profiles_subid = UUID().description let limit: UInt32 = 250 - init() { - self.events = [] - self.damus_state = .empty + init(damus_state: DamusState) { + self.damus_state = damus_state } func get_base_filter() -> NostrFilter { diff --git a/damus/Views/SearchHomeView.swift b/damus/Views/SearchHomeView.swift index 822d9606..6d783c45 100644 --- a/damus/Views/SearchHomeView.swift +++ b/damus/Views/SearchHomeView.swift @@ -10,7 +10,7 @@ import CryptoKit struct SearchHomeView: View { let damus_state: DamusState - @ObservedObject var model: SearchHomeModel + @StateObject var model: SearchHomeModel @State var search: String = "" var SearchInput: some View { @@ -97,15 +97,12 @@ struct SearchHomeView: View { } } -/* struct SearchHomeView_Previews: PreviewProvider { static var previews: some View { let state = test_damus_state() SearchHomeView( damus_state: state, - model: SearchHomeModel() + model: SearchHomeModel(damus_state: state) ) } } - -*/ From 9f48fcb6401eb0d6879dc80252adbe04477a3275 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 26 Dec 2022 19:12:50 -0800 Subject: [PATCH 09/13] keypair: don't calculate bech32_{priv,pub}key each time --- damus/Util/Keys.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/damus/Util/Keys.swift b/damus/Util/Keys.swift index 6f797f83..e7b00093 100644 --- a/damus/Util/Keys.swift +++ b/damus/Util/Keys.swift @@ -15,13 +15,14 @@ let PRIVKEY_HRP = "nsec" struct Keypair { let pubkey: String let privkey: String? + let pubkey_bech32: String + let privkey_bech32: String? - var pubkey_bech32: String { - return bech32_pubkey(pubkey)! - } - - var privkey_bech32: String? { - return privkey.flatMap { bech32_privkey($0) } + init(pubkey: String, privkey: String?) { + self.pubkey = pubkey + self.privkey = privkey + self.pubkey_bech32 = bech32_pubkey(pubkey) ?? pubkey + self.privkey_bech32 = privkey.flatMap { bech32_privkey($0) } } } From 380f51a9ce85a3b30080a4a66d01aa05a1dd90cb Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Mon, 26 Dec 2022 23:17:02 -0400 Subject: [PATCH 10/13] Swap order of Boost and Cancel alert buttons To conform to Apple's Human Interface Guidelines Closes: #155 Changelog-Changed: Swap order of Boost and Cancel alert buttons --- damus/Views/EventActionBar.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/damus/Views/EventActionBar.swift b/damus/Views/EventActionBar.swift index 4bcfe8e4..3e5c76ac 100644 --- a/damus/Views/EventActionBar.swift +++ b/damus/Views/EventActionBar.swift @@ -88,12 +88,12 @@ struct EventActionBar: View { } .padding(.top, 1) .alert("Boost", isPresented: $confirm_boost) { - Button("Boost") { - send_boost() - } Button("Cancel") { confirm_boost = false } + Button("Boost") { + send_boost() + } } message: { Text("Are you sure you want to boost this post?") } From 86be185d2f05a559cada68a096f3f9ea47ad1be1 Mon Sep 17 00:00:00 2001 From: Suhail Saqan Date: Mon, 26 Dec 2022 16:29:21 -0600 Subject: [PATCH 11/13] Added search placeholder and larger cancel button Closes: #153 Changelog-Changed: Added search placeholder and larger cancel button --- damus/Views/SearchHomeView.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/damus/Views/SearchHomeView.swift b/damus/Views/SearchHomeView.swift index 6d783c45..44fd29de 100644 --- a/damus/Views/SearchHomeView.swift +++ b/damus/Views/SearchHomeView.swift @@ -16,12 +16,13 @@ struct SearchHomeView: View { var SearchInput: some View { ZStack(alignment: .leading) { HStack{ - TextField("", text: $search) + TextField("Search...", text: $search) .padding(8) .padding(.leading, 35) .autocorrectionDisabled(true) .textInputAutocapitalization(.never) - Label("", systemImage: "xmark.square") + Text("Cancel") + .foregroundColor(.blue) .padding(EdgeInsets(top: 0.0, leading: 0.0, bottom: 0.0, trailing: 10.0)) .opacity((search == "") ? 0.0 : 1.0) .onTapGesture { From 95555a801154347178cca35e38d6a65badcb99d0 Mon Sep 17 00:00:00 2001 From: Nitesh Balusu Date: Mon, 26 Dec 2022 11:43:49 -0500 Subject: [PATCH 12/13] Added ability to zoom profile pic Closes: #149 Changelog-Added: Added the ability to zoom profile pic on profile page --- damus/Views/ProfilePicView.swift | 9 ++++----- damus/Views/ProfileView.swift | 8 ++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/damus/Views/ProfilePicView.swift b/damus/Views/ProfilePicView.swift index d6bc33bd..c6317672 100644 --- a/damus/Views/ProfilePicView.swift +++ b/damus/Views/ProfilePicView.swift @@ -34,16 +34,16 @@ func pfp_line_width(_ h: Highlight) -> CGFloat { struct InnerProfilePicView: View { @Environment(\.redactionReasons) private var reasons - + let url: URL? let pubkey: String let size: CGFloat let highlight: Highlight - + var PlaceholderColor: Color { return id_to_color(pubkey) } - + var Placeholder: some View { PlaceholderColor .frame(width: size, height: size) @@ -51,7 +51,7 @@ struct InnerProfilePicView: View { .overlay(Circle().stroke(highlight_color(highlight), lineWidth: pfp_line_width(highlight))) .padding(2) } - + var body: some View { Group { if reasons.isEmpty { @@ -74,7 +74,6 @@ struct InnerProfilePicView: View { .clipShape(Circle()) .overlay(Circle().stroke(highlight_color(highlight), lineWidth: pfp_line_width(highlight))) } - } struct ProfilePicView: View { diff --git a/damus/Views/ProfileView.swift b/damus/Views/ProfileView.swift index c5be608e..1fde3367 100644 --- a/damus/Views/ProfileView.swift +++ b/damus/Views/ProfileView.swift @@ -113,11 +113,13 @@ struct EditButton: View { struct ProfileView: View { let damus_state: DamusState + let zoom_size: CGFloat = 350 @State private var selected_tab: ProfileTab = .posts @StateObject var profile: ProfileModel @StateObject var followers: FollowersModel @State private var showingEditProfile = false + @State var is_zoomed: Bool = false @Environment(\.dismiss) var dismiss @Environment(\.colorScheme) var colorScheme @@ -160,6 +162,12 @@ struct ProfileView: View { HStack(alignment: .center) { ProfilePicView(pubkey: profile.pubkey, size: PFP_SIZE, highlight: .custom(Color.black, 2), profiles: damus_state.profiles) + .onTapGesture { + is_zoomed.toggle() + } + .sheet(isPresented: $is_zoomed) { + ProfilePicView(pubkey: profile.pubkey, size: zoom_size, highlight: .custom(Color.black, 2), profiles: damus_state.profiles) + } Spacer() From aea271182e7ac7395db49f2b7547d04848015273 Mon Sep 17 00:00:00 2001 From: Swift <120697811+scoder1747@users.noreply.github.com> Date: Mon, 26 Dec 2022 10:26:08 -0500 Subject: [PATCH 13/13] update-pfp-info --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8275fffd..993a208c 100644 --- a/README.md +++ b/README.md @@ -69,13 +69,11 @@ damus implements the following [Nostr Implementation Possibilities][nips] - All your notifications except 💬 DMs #### 👤 Change Your Profile (PFP) and Bio -- Currently you can't change your pfp on the Damus app (coming soon!). Here's how to do it on other clients (do at your own risk) -1. Get the [Alby](https://getalby.com/) (Chrome, Brave, Firefox) or [nos2x](https://chrome.google.com/webstore/detail/nos2x/kpgefcfmnafjgpblomihpgmejjdanjjp) browser extension (Chrome, Brave) -2. Go to https://damus.io/key to convert your nsec key (secret key in ⚙️ Settings) into a hex version - i. For Alby, right-click the extension, select Options and scroll to the Nostr section to enter your secret hex key - ii. For nos2x, right-click the extension, select Options, then and add the relay `wss://relay.damus.io` and select both read and write, click Save, then enter your secret hex key and click save -3. Visit https://metadata.nostr.com and your profile data should auto-populate from the extension. If not click the extension or refresh the page -4. Add your image using a hosting site like imgbb.com +1. Go to your Profile Page on Damus app +2. Tap on Edit button at the top +3. You will see text fields to update your information and bio +4. For PFP, insert a URL containing your image (support video: https://cdn.jb55.com/vid/pfp-editor.mp4) +5. Save #### ⚡️ Request Sats (Sats or Satoshis are the smallest denomination of bitcoin)