* Automated update of relay data - Sun Sep 21 06:21:05 UTC 2025
* Automated update of relay data - Sun Sep 28 06:20:40 UTC 2025
* refactor: new close button like ios(but not liquid glass)
* Automated update of relay data - Sun Oct 5 06:20:09 UTC 2025
* Automated update of relay data - Sun Oct 12 06:20:12 UTC 2025
* Automated update of relay data - Sun Oct 19 06:21:51 UTC 2025
* Automated update of relay data - Sun Oct 26 06:21:31 UTC 2025
* Automated update of relay data - Sun Nov 2 06:22:16 UTC 2025
* Automated update of relay data - Sun Nov 9 06:21:43 UTC 2025
* Automated update of relay data - Sun Nov 16 06:22:37 UTC 2025
* Automated update of relay data - Sun Nov 23 06:22:51 UTC 2025
* Automated update of relay data - Sun Nov 30 06:24:08 UTC 2025
* Automated update of relay data - Sun Dec 7 06:22:59 UTC 2025
* Automated update of relay data - Sun Dec 14 06:24:33 UTC 2025
* Automated update of relay data - Sun Dec 21 06:24:49 UTC 2025
* Automated update of relay data - Sun Dec 28 06:25:38 UTC 2025
* feat: Add ZXing dependency for QR code scanning
* feat: Request camera permission for QR verification
* Add QR verification payloads and mesh wiring
* Wire verification state, system messages, and notifications
* Add verification sheets and UI affordances
* Show verified badges in sidebar and add strings
* Persist fingerprint caches for offline verification
* Handle bitchat://verify deep links
* feat: Replace zxing-android-embedded with ML Kit and CameraX
* Refactor(Verification): Replace zxing with MLKit for QR scanning
* Replace `AndroidView` with `CameraXViewfinder` for camera preview
* Refactor QR verification: Extract VerificationHandler and fix concurrency issues
* Extract and translate strings for QR verification feature
* Fix build errors: Escape ampersands in strings and restore missing methods in ChatViewModel
* return to main
* return to main 2
---------
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* wifi aware wip
* wifi aware wip
* starting to work
* werk
* dms work
* wip
* fix(wifi-aware): use bindSocket and scoped IPv6 instead of bindProcessToNetwork
* Merge branch 'upstream/main' into fix/wifi-aware-socket-binding
* Fix Wi-Fi Aware connectivity and UI integration post-merge
- Replace bindProcessToNetwork with bindSocket for VPN compatibility.
- Implement Scoped IPv6 address resolution (aware0) for mesh routing.
- Bridge Wi-Fi Aware incoming messages to AppStateStore for UI visibility.
- Fix syntax errors and variable name conflicts in Debug UI.
* Enhance Wi-Fi Aware robustness and debug UI display
- Clean up transport resources (sockets, server sockets, network callbacks) immediately on peer disconnection.
- Implement resolveScopedAddress to show scoped IPv6 (e.g., %aware0) in Debug UI.
- Fix Map type mismatch warning in ChatViewModel bridge.
- Filter self-ID from peer cleanup tables to prevent recursive self-removal.
* Share GossipSyncManager across transports to prevent redundant message synchronization
- Registered BluetoothMeshService's GossipSyncManager as a singleton in MeshServiceHolder.
- Modified WifiAwareMeshService to use the shared GossipSyncManager if available.
- Added background cleanup for peer mappings on socket disconnection.
- Fixed Kotlin type mismatch during nickname map merging.
* Restore VPN acquisition logic and improve peer cleanup
- Revert removal of NET_CAPABILITY_NOT_VPN to allow hardware handle acquisition while VPN is active.
- Refactor handlePeerDisconnection to more reliably cleanup initial and routed IDs.
- Switch cleanup logging to debug level to reduce log noise.
---------
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
Co-authored-by: aidenvalue <>
* persistence step 1
* fix build
* messages in the background work, notifications not yet
* app state store
* DM icon shows up
* notification launches when app is closed!
* keep ui updated
* lifecycle fixes
* extensive logging, maybe revert later
* send nickname in announcement
* quit in notification
* setting in about sheet
* fix quit bitchat
* lifecycle fixes
* power mode based on background state
* stats for both direciotns
* fix graph persistence
* better counting
* count per device
* only compute when debug sheet is open? untested
* fix read receipts
* fix read receipts fully
* fix unread badge if messages have been read in focus
* foreground promotion fix
* fix app kill in notification
* adjust to new tor
* nice
* about sheet design
* Automated update of relay data - Sun Sep 21 06:21:05 UTC 2025
* Automated update of relay data - Sun Sep 28 06:20:40 UTC 2025
* refactor: new close button like ios(but not liquid glass)
* Automated update of relay data - Sun Oct 5 06:20:09 UTC 2025
* Automated update of relay data - Sun Oct 12 06:20:12 UTC 2025
* Automated update of relay data - Sun Oct 19 06:21:51 UTC 2025
* Automated update of relay data - Sun Oct 26 06:21:31 UTC 2025
* Automated update of relay data - Sun Nov 2 06:22:16 UTC 2025
* Automated update of relay data - Sun Nov 9 06:21:43 UTC 2025
* Automated update of relay data - Sun Nov 16 06:22:37 UTC 2025
* Automated update of relay data - Sun Nov 23 06:22:51 UTC 2025
* Automated update of relay data - Sun Nov 30 06:24:08 UTC 2025
* Chore: Remove unused `lifecycle-livedata-ktx` dependency
This commit removes the `androidx.lifecycle:lifecycle-livedata-ktx` library from the project's dependencies.
The `[libraries]` and `[bundles]` sections in `gradle/libs.versions.toml` have been updated to reflect this removal, as the dependency is no longer in use.
* Refactor: Remove unused `runtime-livedata` dependency
* Refactor: Migrate `LocationChannelManager` and `GeohashBookmarksStore` to StateFlow
This commit refactors `LocationChannelManager` and `GeohashBookmarksStore` to use `StateFlow` instead of `LiveData` for managing and exposing their state. This change aligns with modern Android development practices and improves testability.
**Key Changes:**
- **`LocationChannelManager`**:
- All `MutableLiveData` properties (`permissionState`, `availableChannels`, `selectedChannel`, etc.) have been replaced with `MutableStateFlow`.
- Consumers now access these properties as `StateFlow`.
- State updates have been changed from `postValue()` to direct `.value` assignments, simplifying thread management within the manager which already uses a dedicated coroutine scope.
- **`GeohashBookmarksStore`**:
- `bookmarks` and `bookmarkNames` are now exposed as `StateFlow` instead of `LiveData`.
- State updates similarly use `.value` assignment.
- **Nullability**:
- The non-nullable nature of `StateFlow`'s value reduces the need for null-checks in both the manager classes and their consumers, leading to safer code.
* Refactor: Migrate from LiveData to StateFlow for Nostr components
This commit replaces `LiveData` with `StateFlow` across core Nostr-related classes to align with modern Android architecture and improve state management. This change affects `NostrClient`, `NostrRelayManager`, `LocationNotesManager`, and `GeohashRepository`.
**Key Changes:**
- **`NostrClient`**:
- `isInitialized` and `currentNpub` are now `StateFlow` instead of `LiveData`.
- `relayConnectionStatus` and `relayInfo` now return `StateFlow` from `NostrRelayManager`.
- **`NostrRelayManager`**:
- Public properties `relays` and `isConnected` are migrated from `MutableLiveData` to `MutableStateFlow`.
- Updates are now pushed using `.value` instead of `.postValue()`.
- **`LocationNotesManager`**:
- All public `LiveData` properties (`notes`, `geohash`, `initialLoadComplete`, `state`, `errorMessage`) are converted to `StateFlow`.
- The class documentation is updated to reflect the use of `StateFlow`.
- **`GeohashRepository`**:
- Methods `updateGeohashPeople` and `updateReactiveParticipantCounts` now call `set...` methods on the `state` object instead of `post...`, reflecting the removal of `LiveData` from the underlying state management.
* Refactor: Migrate ChatState from LiveData to StateFlow
This commit refactors the `ChatState`, `ChatViewModel`, and `GeohashViewModel` to use `StateFlow` instead of `LiveData` for managing and exposing UI state. This migration improves state management by leveraging modern coroutine-based flows.
**Key Changes:**
- **`ChatState.kt`**:
- Replaced all `MutableLiveData` instances with `MutableStateFlow`.
- Exposed state properties as `StateFlow` instead of `LiveData`.
- Removed `MediatorLiveData` for computed properties (`hasUnreadChannels`, `hasUnreadPrivateMessages`) and replaced them with `Flow.combine` to create derivative `StateFlows`.
- Simplified non-nullable `getters` to directly return the `.value` of the `StateFlows`.
- Removed `postValue` helpers that are no longer necessary.
- **`ChatViewModel.kt`**:
- Updated all state properties to be `StateFlow`, reflecting the changes in `ChatState`.
- **`GeohashViewModel.kt`**:
- Changed state properties (`geohashPeople`, `geohashParticipantCounts`, etc.) from `LiveData` to `StateFlow`.
- Replaced `observeForever` on `LiveData` from `LocationChannelManager` with `viewModelScope.launch` blocks that `.collect()` from the underlying flows.
* Refactor: Migrate UI from LiveData to StateFlow
This commit replaces `LiveData.observeAsState()` with `StateFlow.collectAsState()` across various UI components. This change aligns the codebase with modern Android development practices, using Kotlin Flows for reactive UI state management.
No functional changes are intended. The primary goal is to remove the dependency on `androidx.lifecycle.livedata` from the composable functions.
**Affected Components:**
- `ChatScreen`
- `SidebarComponents`
- `ChatHeader`
- `LocationChannelsSheet`
- `LocationNotesSheet`
- `LocationNotesButton`
- `GeohashPeopleList`
- `LocationNotesSheetPresenter`
* Refactor: Use `collectAsStateWithLifecycle` for UI state collection
* Refactor: move CloseButton to core/ui/component
* Refactor: remove AI generated comments
* Refactor: fix combine to map and use WhileSubscribed
* Refactor: Pass CoroutineScope to ChatState
This commit refactors the `ChatState` class to accept a `CoroutineScope` in its constructor instead of creating its own.
**Key Changes:**
- **`ChatState.kt`**: The constructor now requires a `CoroutineScope`. This scope is used for the `stateIn` operators that convert `Flows` into `StateFlows` (`hasUnreadChannels`, `hasUnreadPrivateMessages`), ensuring they operate within the lifecycle of the provided scope.
- **`ChatViewModel.kt`**: The `viewModelScope` is now passed to the `ChatState` constructor during its instantiation. This ties the lifecycle of the state's coroutines directly to the `ViewModel`'s lifecycle.
* Test: Use `TestScope` for coroutines in `CommandProcessorTest`
This commit refactors `CommandProcessorTest` to use a `TestScope` and `UnconfinedTestDispatcher` for managing coroutines.
This ensures that coroutine-based operations within the test are executed in a controlled and predictable manner, improving test reliability. The `coroutineScope` for `CommandProcessor` and the `scope` for `ChatState` are now both configured to use this test-specific scope.
---------
Co-authored-by: GitHub Action <action@github.com>
* try 1
* works
* equalize UI with ios
* ui cleanup
* geohash chats: no building
* load notes in background
* insta
* simplify and tor icon change
* icons nice
* refactor
* unify location enabled / disabled
* cooler
* simplify, doesnt subscribe right away
* load when clicked
* plus minus location notes
* load when tor is available
* translations
* fix transalations
* implement review comments
* english done
* de
* more extraction
* wip strings en
* translations work
* remove unneeded translations
* remove notification message
* add languages
* new languages
* 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
* 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.
* 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
* 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
* 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
* 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
* 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
* 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
- 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.
- 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.