Skip to content

Feature/delete location note - #686

Open
AleksPlekhov wants to merge 7 commits into
permissionlesstech:mainfrom
AleksPlekhov:feature/delete_location_note
Open

Feature/delete location note#686
AleksPlekhov wants to merge 7 commits into
permissionlesstech:mainfrom
AleksPlekhov:feature/delete_location_note

Conversation

@AleksPlekhov

@AleksPlekhov AleksPlekhov commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

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

Screenshot 2026-03-19 at 6 51 22 PM Screenshot 2026-03-19 at 6 52 55 PM

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread app/src/main/java/com/bitchat/android/nostr/LocationNotesManager.kt Outdated
Comment thread app/src/main/java/com/bitchat/android/nostr/LocationNotesManager.kt
@callebtc

Copy link
Copy Markdown
Collaborator

thank you great PR

@AleksPlekhov
AleksPlekhov force-pushed the feature/delete_location_note branch from bade354 to 1c5bc89 Compare July 24, 2026 02:08
@AleksPlekhov

AleksPlekhov commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@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
@callebtc

callebtc commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Android UI verification

Code-level review identifies visible location-notes UI changes.

Before After
Screenshot capture unavailable in this environment. Screenshot capture unavailable in this environment.

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 adb are unavailable, so no before/after pixels could be captured or verified.

@AleksPlekhov

AleksPlekhov commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

@callebtc Do you expect any changes from my side regarding last comment with Android UI verification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants