Skip to content

fix: Send sync messages to wear devices and auto-refresh recording list#7

Open
drdanielbender wants to merge 1 commit into
tberghuis:masterfrom
drdanielbender:fix/sync-messages-and-auto-refresh
Open

fix: Send sync messages to wear devices and auto-refresh recording list#7
drdanielbender wants to merge 1 commit into
tberghuis:masterfrom
drdanielbender:fix/sync-messages-and-auto-refresh

Conversation

@drdanielbender

Copy link
Copy Markdown

What this PR does

Fixes two related issues:

  1. TARGET_NODE_NOT_CONNECTED error - The app was incorrectly sending sync messages to the local phone node instead of the connected watch. This caused messages to fail when trying to notify the watch that sync was complete.
  2. Recordings not appearing until app restart - After downloading recordings from the watch, users had to restart the phone app to see the new files.

Changes

  • ProcessZipWorker.kt: Use CapabilityClient to find reachable wear devices and send sync messages to them instead of the local node
  • RecordingsEvent.kt (new): Simple event bus for cross-component communication
  • MobileViewModel.kt: Listen for recording updates and auto-refresh the file list

Testing

  1. Download recordings from watch to phone
  2. Verify no "TARGET_NODE_NOT_CONNECTED" errors in logs
  3. Recordings should appear immediately with "Download complete" snackbar

- Fix TARGET_NODE_NOT_CONNECTED error by sending messages to reachable
  wear devices using CapabilityClient instead of local node
- Add RecordingsEvent to notify MobileViewModel when files are updated
- Auto-refresh recording list after download completes (no restart needed)
- Show 'Download complete' snackbar when sync finishes
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.

1 participant