Commit Graph
37 Commits
Author SHA1 Message Date
callebtcandGitHub 633a506753 Media transfers (#440)
* tor voice wip

* worky BLE a bit

* can send sound

* remove tor

* ui cleanup

* recording time

* progress bar color

* nicknames for audio

* onboarding permissions no microphone

* may work

* fix destionation

* extend

* refactor voice input component

* fix keyboard collapse issue

* send images

* wip image open

* image sending works

* wip waveforms

* better

* better animation

* fix cursor for sending audio

* image sending animation

* image sending animation

* full screen image viewer

* gossip sync for fragments too

* reduce delays

* fix keyboard focus

* use v2 for file transfers

* do not sync fragments

* scrollable image viewer

* ui

* ui adjustments

* nicer animation

* seek through audio

* add spec

* add more details to documentation

* File sharing E2E:
- Add TLV BitchatFilePacket, FileSharingManager
- Implement sendFileNote in ChatViewModel
- File receive path: save to files/incoming and render [file] messages with FileMessageItem or FileSendingAnimation during transfer
- SAF FilePickerButton and dispatcher wiring; image/file choice to follow in MediaPickerOptions
- Add FileViewerDialog with system open/save, FileProvider and file_paths
- Hook transfer progress to file sending UI
- Manifest: READ_MEDIA_* and FileProvider
- Fix MessageHandler saving and prefix for non-image payloads
- Add helper utils (FileUtils)

* kinda wip

* fix buttons

* files half working

* wip file transfer

* file packet has 2-byte TLV and chunks. it wokrs but it sucks

* clean

* remove gossip sync for fragments

* fix audio and image rendering

* adjust FILE_SIZE TLV size too

* cleanup

* haptic

* private messages media

* read receipts for media

* use enum for message type not string

* delivery ack checks dont push content

* check

* animation fix

* refactor

* ui adjustments

* comments

* refactor

* fix crash on send and receive of the same file

* refactor notifications

* tests
2025-09-19 22:46:14 +02:00
779717217f feat: geohash bookmarks (iOS parity) (#410)
* Geohash bookmarks (iOS parity):
- Add GeohashBookmarksStore (persist bookmarks + friendly names)
- Integrate bookmark toggle into LocationChannelsSheet (nearby + bookmarked sections)
- Add header toggle for current geohash bookmark
- Sample counts for union of nearby + bookmarks while sheet open
- Add Geohash.decodeToBounds() to support friendly name resolution
- Fix coroutine usage and Gson type inference issues

* fix UI

* clear bookmarks on triple tap

* adjust icons

---------

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2025-09-14 03:46:37 +02:00
callebtcandGitHub 998ee606b1 Nostr refactor simplify (#390)
* fix bug

* geoDM receive works, send doesnt, and incoming message doesnt make sender appear in peer list

* fix nostr dm

* geohash dms work

* Geohash DM UI: stop mixing Nostr DM temp chats into mesh offline list; ensure geohash DM senders are added to geohash people list only. Removed nostr_* sidebar append in PeopleSection; kept 64-hex mesh offline favorites. Verified build.

* refactor

* nice

* works

* merging nostr -> mesh works

* tripple click to delete all

* fix sidebar icon

* remove hash

* dms have correct recipient

* works

* wip unread badge

* geohash dms wip

* dms work
2025-09-08 13:46:15 +02:00
callebtcandGitHub ba518269b4 fix geohash livedata wiring (#389) 2025-09-07 09:04:21 +02:00
lollerfirstandGitHub 4b81b7f97a fix: action message routing and duplicate local echo in geohash channels (#374)
* fix: send action messages to correct chat

* fix(action): avoid double local echo for action messages in geohash channels

When sending /hug or /slap in a location (geohash) channel, CommandProcessor
was adding a local echo and then routing to NostrGeohashService, which also
adds a local echo. This resulted in duplicate action messages on the sender’s
screen.

Change: detect when the selectedLocationChannel is a Location and, in that
case, skip adding the local echo in CommandProcessor and only call the
onSendMessage transport callback (NostrGeohashService will add the echo with
proper metadata). Private and mesh (non-location) behavior is unchanged.
2025-09-05 15:41:02 +02:00
callebtcandGitHub f47819a31e Debug button (#377)
* feat(debug): add DebugSettingsManager + DebugSettingsSheet scaffold and AboutSheet entry; groundwork for verbose logging, GATT controls, relay stats, device/scan views

* fix(debug): wire debug sheet launch via onShowDebug in AboutSheet from ChatScreen; add public start/stop server/client methods}

* fix(about): remove misplaced debug item block inside PoW section; keep debug launcher managed by ChatScreen only

* feat(debug): wire DebugSettingsSheet role switches to explicit startServer/stopServer and startClient/stopClient; expose role controls + disconnectAll on BluetoothConnectionManager; fix syntax error; build passes

* feat(debug): add connect/disconnect helpers; wire DebugSettingsSheet connect/disconnect actions to BluetoothConnectionManager

* feat(debug): add debug settings button at bottom of AboutSheet; wire onShowDebug callback to open DebugSettingsSheet from ChatScreen

* feat(debug): wire verbose logging into chat view via DebugSettingsManager; add rolling relay stats; push connected devices and scan results; ensure GATT role stop closes connections; log incoming packets and relay events; add UI polling for devices; build passes

* chore(debug-branch): remove unrelated files that were mistakenly added in first commit; keep only intended debug settings changes

* fix(chat): prevent mesh→geohash leak

Root cause:
- DebugSettingsManager→chat bridge appended system logs to the global timeline regardless of active channel
- MeshDelegateHandler added public mesh messages to UI unconditionally

Fixes:
- Only inject debug system messages when selected location channel is Mesh
- Only add public mesh messages to UI when Mesh is selected (still send notifications)

Build: ./gradlew assembleDebug
}

* fix(timeline): restore message persistence across channel switches

Root cause:
- NostrGeohashService.switchLocationChannel() called messageManager.clearMessages()
  which wiped ALL messages (mesh + debug + geohash) from main timeline
- Geohash events were adding to main timeline, causing cross-contamination

Fixes:
- Remove messageManager.clearMessages() from channel switching
- ChatScreen displayMessages now routes to separate storage:
  - Mesh: messages (main timeline, includes debug logs when Mesh selected)
  - Geohash: viewModel.getGeohashMessages(geohash) from separate history
  - Private: privateChats[peerID]
  - Channels: channelMessages[channel]
- Geohash events no longer add to main timeline, only to geohash history
- Mesh messages always stored to preserve history when switching away

Result: Each chat type has persistent separate storage, no message loss

* Debug/relay logs: use MessageType names; include device route in verbose packet logs.

* Verbose device-peer assignment and connection/disconnection logs with peerId, deviceId, nickname; packet relay log uses MessageType names.}

* Debug logs API: include nickname and deviceId for incoming/relay; update callers.}

* Fix compile: import MessageType; correct debug manager API usage and remove stray insertion; build.}

* Respect relay toggle; helper to log relay with deviceId.}

* PacketRelayManager: add relay toggle and unified logging helper; clean file header comments; build fixes.}

* changes

* Geohash local echo: do not add to mesh timeline; rely on geohash history and ChatScreen display for location channels.

* persisting

* persist debug settings

* gitignore

* gatt server / client controls

* debugger

* max connection settings and graph

* more graph

* better logging

* refactor logging
2025-09-05 15:40:39 +02:00
callebtcandGitHub 8b3dc71dc6 Refactors cleanup (#372)
* cleanup peermanager

* cleanup geohash code

* direct connections fix

* pow display

* track disconnects too

* display pow only if enabled

* display pow only if enabled

* direct connection tracking
2025-09-02 22:09:44 +02:00
callebtcandGitHub 550520795f UI geohash notifications (#325)
* location name in notifications

* remove tests

* panic nostr

* mentions with hashes, otherwise none

* fix timestamps

* parse geohashes in messages

* works

* fix country name

* mention notifications work
2025-08-28 17:47:47 +02:00
MinhandGitHub 02d5466812 Add active peer notification (#273)
* adding notification for active peers + tests

* adding a recently seen peer set to track if we've seen that peer before

* changing back to notificationManager naming

* fixing some weird formatting that occurred during merge conflict fix
2025-08-28 09:17:41 +02:00
callebtcandGitHub 6fe6e049ad Nip17 dms to extend the mesh (#313)
* favorite each other

* show favorites as system messsages

* wip show glove when offline but mayb edoesnt work

* send and receive works

* wip kinda works but no

* getting there

* kinda

* show offline peers in peer list

* kinda wonky but almost works

* fixes

* nostr user goes offline works

* nostr -> mesh works

* handoff works

* background message processing

* read works

* seen message store was missing
2025-08-25 18:38:10 +02:00
callebtcandGitHub f13f3063c9 Geohash notifications (#288)
* mention notifications

* notifications

* warning
2025-08-23 01:35:46 +02:00
callebtcandGitHub 49c42ba169 user bottom sheet (#285)
* wip sheet

* longpress

* block wip

* blocking works
2025-08-23 00:26:18 +02:00
callebtcandGitHub 7243d841a3 Nostr geohash (#276)
* first nostr build

* add test file

* internet access

* fix relay manager

* fix serialization

* demo service - remove later

* fix nostr

* event dedupe

* dedupe

* ui wip

* can send messages

* subscription works

* works

* favs

* works

* delete chat on change

* fix mentions

* remove autojoin channels

* styling

* adjust colors

* ui changes

* live updates working

* use local timestamp

* message history in background

* robust

* fixes

* nicknames refresh optimization

* nostr service

* refactor nostr

* style

* geohash works

* centralize colors

* refactoring

* disable DMs for now: click on peer nickname doesnt open chat list in geohash mode

* use local time

* less logging

* robustness

* scroll nickname

* adjust some text
2025-08-22 19:09:18 +02:00
callebtcandGitHub 9795e2ce8a Changes bitchat protocol (#265)
* create payload

* compiles and can send messages

* identityannouncement

* DMs work, read receipt not sent yet

* works

* delete old code

* simplify

* working

* fragment wip

* compression wip

* use zlib compression

* clean

* nice

* mesh

* remove comments
2025-08-18 21:16:27 +02:00
TairandGitHub b86a6bf4d1 Fix favorite icon not updating on first Sidebar open (#237) 2025-08-07 15:07:45 +03:00
callebtcandGitHub 67c91b0559 remove system messages for connect / disconnect (#241)
* remove system messages for connect / disconnect

* fix tests
2025-08-07 11:58:06 +03:00
TairandGitHub 8bf2220cea Make Sidebar react to the nickname and RSSI changes. (#228) 2025-08-06 00:06:47 +02:00
Francisco HolaandGitHub 325ce1730d Feature/mentions (#197)
* mention initial implementation

* Message conservation
2025-08-05 23:32:16 +02:00
callebtcandGitHub 4cb5932fd0 improve identity announcements (#198)
* improve identity announcements

* touches

* signing noise id

* panic mode delete signing key
2025-07-31 06:26:41 +02:00
callebtcandGitHub 4b1d6f8c04 UI improvements (#192)
* bitchat logo

* improve ui
2025-07-25 20:02:59 +02:00
callebtcandGitHub c9aba00478 Dm header icons reactive (#190)
* header reactive to noise session

* favorite button reactive

* icon change

* nice
2025-07-25 19:50:40 +02:00
callebtcandGitHub 271df2e720 on focus (#189) 2025-07-25 19:17:36 +02:00
callebtcandGitHub 34b3d8dd82 Init handshake on dm (#187)
* kinda working

* establish handshake if not done yet

* add handshakerequest packet

* read receipt
2025-07-25 19:11:45 +02:00
callebtcandGitHub 534be7e613 Refactor fingerprint manager (#185)
* centralized fingerprint manager

* centralized fingerprintmanager

* update fingerprint only if no collision
2025-07-25 15:43:19 +02:00
alpermelkeli eb575182c6 refactor: remove context attribute at ChatViewModel.kt 2025-07-16 18:30:26 +03:00
callebtc d490393de6 back gesture works 2025-07-12 17:32:08 +02:00
callebtc ea25b71d6f fix favorites 2025-07-12 16:55:50 +02:00
callebtc 035273011f fix startup 2025-07-12 15:42:37 +02:00
callebtc e58cf4fd0d fix null pointer 2025-07-12 12:53:01 +02:00
callebtc 37d605b934 fix notifications 2025-07-10 12:48:04 +02:00
callebtc 8b5c19ace7 notifications 2025-07-10 12:08:22 +02:00
callebtc abe6246c3e faving? 2025-07-10 00:34:41 +02:00
callebtc dd8aa083b9 power saving 2025-07-09 15:47:54 +02:00
callebtc 1d7bb8beab REFACTOR STEP 2: Extract mesh delegate handling to separate class
- Created MeshDelegateHandler.kt to handle all BluetoothMeshDelegate callbacks
- Created ChatViewModelUtils.kt for utility functions like haptic feedback
- ChatViewModel now delegates all mesh events to MeshDelegateHandler
- Final ChatViewModel size: 337 lines (down from 1000+ original)

This completes the refactoring while maintaining 100% functionality.
2025-07-09 00:44:53 +02:00
callebtc 56824b6594 REFACTOR: Break ChatViewModel into smaller specialized files
- Created ChatState.kt for centralized state management
- Created DataManager.kt for persistence operations
- Created MessageManager.kt for message handling and deduplication
- Created ChannelManager.kt for channel operations and encryption
- Created PrivateChatManager.kt for private chat functionality
- Created CommandProcessor.kt for IRC-style command processing

ChatViewModel.kt reduced from 1000+ lines to ~300 lines while maintaining 100% functionality.
All existing functionality preserved, just better organized.
2025-07-09 00:42:43 +02:00
callebtc d40e2cbda8 deduplicate messages 2025-07-08 23:02:03 +02:00
callebtc d6a4e122b4 init 2025-07-08 20:37:46 +02:00