Feature/delete location note - #686
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a3ca26451
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
thank you great PR |
bade354 to
1c5bc89
Compare
|
@callebtc, I kindly ask you to consider merging this PR to prevent future conflicts. I appreciate it. |
# Conflicts: # app/src/main/java/com/bitchat/android/nostr/LocationNotesManager.kt # app/src/main/java/com/bitchat/android/ui/LocationNotesSheet.kt # app/src/main/res/values-he/strings.xml # app/src/main/res/values-ms/strings.xml # app/src/main/res/values-pl/strings.xml # app/src/main/res/values-ta/strings.xml # app/src/main/res/values-uk/strings.xml # app/src/main/res/values-zh-rCN/strings.xml # app/src/main/res/values-zh-rTW/strings.xml
# Conflicts: # app/src/main/java/com/bitchat/android/ui/LocationNotesSheet.kt # app/src/main/res/values/strings.xml
# Conflicts: # app/src/main/res/values-he/strings.xml # app/src/main/res/values-ms/strings.xml # app/src/main/res/values-pl/strings.xml # app/src/main/res/values-ta/strings.xml # app/src/main/res/values-uk/strings.xml # app/src/main/res/values-zh-rCN/strings.xml # app/src/main/res/values-zh-rTW/strings.xml
Android UI verificationCode-level review identifies visible location-notes UI changes.
Expected comparison: the location-note action and displayed note state before and after removal behavior changes. Limitation: the required Java runtime, Android SDK, emulator, and |
|
@callebtc Do you expect any changes from my side regarding last comment with Android UI verification? |
Description
Implements the ability for users to delete their own location notes via a long-press gesture.
Closes: #639
User flow:
User long-presses a note in the Location Notes sheet → haptic feedback fires + a bottom action drawer appears
Only notes authored by the local user show the "delete note" action (ownership check via pubkey)
Tapping "delete note" sends a NIP-09 kind:5 deletion event to geo-specific relays and removes the note from the local list immediately (optimistic UI)
Remote deletion events received from relays are also processed, keeping the list consistent across devices
Changes:
NostrKind.DELETION = 5 constant (NIP-09)
NostrProtocol.createDeletionEvent() — builds and signs a kind:5 event
LocationNotesManager — deleteNote(), localPubkey StateFlow, subscription filter extended to include kind:5 for real-time remote deletion sync
LocationNotesSheet — long-press with detectTapGestures + HapticFeedbackType.LongPress, NoteActionsSheet bottom drawer
LocationNotesSheetPresenter — ownership-gated NoteActionsSheet rendering
Checklist
[x] I have read the contribution guidelines
[x] I have performed a self-review of my code
[x] I have mentioned the corresponding issue and the relevant keyword (e.g., "Closes: #xy") in the description
[x] If it is a core feature, I have added automated tests