Better websocket reconnection and maintainer

This commit is contained in:
2024-05-13 22:12:37 +08:00
parent b9461e5019
commit f43f9e91f6
7 changed files with 36 additions and 34 deletions

View File

@ -38,7 +38,6 @@ class _ChatMemberScreenState extends State<ChatMemberScreen> {
_selfId = prof['id'];
var uri = getRequestUri('messaging', '/api/channels/${widget.realm}/${widget.channel.alias}/members');
print(uri);
var res = await auth.client!.get(uri);
if (res.statusCode == 200) {

View File

@ -162,7 +162,7 @@ class _ChatWidgetState extends State<ChatWidget> {
Future.delayed(Duration.zero, () async {
final auth = context.read<AuthProvider>();
if (!_chat.isOpened) await _chat.connect(auth);
await _chat.connect(auth);
_chat.fetchOngoingCall(widget.alias, widget.realm);
_chat.fetchChannel(context, auth, widget.alias, widget.realm).then((result) {