commit d04f1c68670a028e0689e2385d0efd3bc1df6b93
parent 5c87dd5bbb9c23dc94baf6e0cbfe87f2db52938d
Author: William Casarin <jb55@jb55.com>
Date: Mon, 17 Jul 2023 11:30:09 -0700
login: allow user to login to deleted profile
If they every change their mind.
Changelog-Fixed: Allow user to login to deleted profile
Diffstat:
2 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/damus/ContentView.swift b/damus/ContentView.swift
@@ -81,7 +81,6 @@ struct ContentView: View {
@State var active_sheet: Sheets? = nil
@State var damus_state: DamusState? = nil
@SceneStorage("ContentView.selected_timeline") var selected_timeline: Timeline = .home
- @State var is_deleted_account: Bool = false
@State var muting: String? = nil
@State var confirm_mute: Bool = false
@State var user_muted_confirm: Bool = false
@@ -349,9 +348,6 @@ struct ContentView: View {
.onReceive(timer) { n in
self.damus_state?.postbox.try_flushing_events()
}
- .onReceive(handle_notify(.deleted_account)) { notif in
- self.is_deleted_account = true
- }
.onReceive(handle_notify(.report)) { notif in
let target = notif.object as! ReportTarget
self.active_sheet = .report(target)
@@ -512,12 +508,6 @@ struct ContentView: View {
let profile_ev = make_metadata_event(keypair: keypair, metadata: profile)
damus_state.postbox.send(profile_ev)
}
- .alert(NSLocalizedString("Deleted Account", comment: "Alert message to indicate this is a deleted account"), isPresented: $is_deleted_account) {
- Button(NSLocalizedString("Logout", comment: "Button to close the alert that informs that the current account has been deleted.")) {
- is_deleted_account = false
- notify(.logout, ())
- }
- }
.alert(NSLocalizedString("User muted", comment: "Alert message to indicate the user has been muted"), isPresented: $user_muted_confirm, actions: {
Button(NSLocalizedString("Thanks!", comment: "Button to close out of alert that informs that the action to muted a user was successful.")) {
user_muted_confirm = false
diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift
@@ -783,11 +783,6 @@ func print_filters(relay_id: String?, filters groups: [[NostrFilter]]) {
}
func process_metadata_profile(our_pubkey: String, profiles: Profiles, profile: Profile, ev: NostrEvent) {
- if our_pubkey == ev.pubkey && (profile.deleted ?? false) {
- notify(.deleted_account, ())
- return
- }
-
var old_nip05: String? = nil
let mprof = profiles.lookup_with_timestamp(id: ev.pubkey)