mirror of
https://github.com/block/buzz.git
synced 2026-10-28 13:01:10 +00:00
Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1fgdl5qqnh3k3f2xkqrvt7cujalhm623x4s7fdjdj5yrtp5fzjl9qrjpucw <4a1bfa0013bc6d14a8d600d8bf6392efefbd2a26ac3c96c9b2a106b0d12297ca@sprout-oss.stage.blox.sqprod.co>
17 lines
548 B
TypeScript
17 lines
548 B
TypeScript
import { RelayClient } from "@/shared/api/relayClientSession";
|
|
|
|
export const relayClient = new RelayClient();
|
|
|
|
/**
|
|
* Notify the relay client which channel is currently visible in the UI.
|
|
*
|
|
* On reconnect, subscriptions for the visible channel are sent in the first
|
|
* replay batch so the user sees their active channel recover before others
|
|
* on degraded networks.
|
|
*
|
|
* Call with `null` when the user navigates away from a channel view.
|
|
*/
|
|
export function setVisibleChannel(id: string | null): void {
|
|
relayClient.setVisibleChannelId(id);
|
|
}
|