Add the ability to unlike posts

Changelog-Added: Add ability to unlike posts
Closes: #580
This commit is contained in:
Oleg Gordiichuk
2023-02-12 22:45:47 +01:00
committed by William Casarin
parent 4f86361b63
commit 237c939639
5 changed files with 59 additions and 7 deletions

View File

@@ -387,6 +387,12 @@ struct ContentView: View {
}
.onReceive(handle_notify(.like)) { like in
}
.onReceive(handle_notify(.delete)) { delete in
guard let ev = delete.object as? NostrEvent else {
return
}
self.home.handle_unlike_event(ev)
}
.onReceive(handle_notify(.deleted_account)) { notif in
self.is_deleted_account = true
}