Live updates over WebSocket + clickable links
- Connect to the server's /ws multiplexed socket (chat/notifications/board) for the whole authenticated session. Auth rides the existing cookie jar; no server changes needed (the server allows clients that send no Origin header). - Chat now updates live: ConversationViewModel merges messages pushed over the socket for the open conversation (no more leaving/re-entering to see replies). - Notifications are now real-time in-app (bell updates instantly); when the app is backgrounded, incoming alerts and messages raise a system notification via the same socket. The 15-min WorkManager poll remains as a catch-up safety net. - Links are now clickable in chat messages, task comments, and descriptions via a new RichText component (handles <a> anchors and bare http/www URLs). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -57,4 +57,14 @@ class MainActivity : ComponentActivity() {
|
||||
val container = (application as BountyBoardApp).container
|
||||
intent.getStringExtra(PushNotifier.EXTRA_ROUTE)?.let { container.setDeepLink(it) }
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
(application as BountyBoardApp).container.appForeground = true
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
(application as BountyBoardApp).container.appForeground = false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user