fix: Use single-isolate push
This commit is contained in:
parent
5e728a3319
commit
353b1c8378
18 changed files with 1051 additions and 599 deletions
|
|
@ -185,7 +185,7 @@ class _ChatState extends State<Chat> {
|
|||
void dispose() {
|
||||
timeline?.cancelSubscriptions();
|
||||
timeline = null;
|
||||
matrix.activeRoomId = '';
|
||||
matrix.client.activeRoomId = '';
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
|
@ -509,7 +509,7 @@ class _ChatState extends State<Chat> {
|
|||
),
|
||||
);
|
||||
}
|
||||
matrix.activeRoomId = widget.id;
|
||||
matrix.client.activeRoomId = widget.id;
|
||||
|
||||
if (room.membership == Membership.invite) {
|
||||
showFutureLoadingDialog(context: context, future: () => room.join());
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class _HomeserverPickerState extends State<HomeserverPicker> {
|
|||
type: AuthenticationTypes.token,
|
||||
userIdentifierType: null,
|
||||
token: token,
|
||||
initialDeviceDisplayName: Matrix.of(context).clientName,
|
||||
initialDeviceDisplayName: PlatformInfos.clientName,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import 'package:fluffychat/components/matrix.dart';
|
|||
import 'package:flushbar/flushbar_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import '../utils/platform_infos.dart';
|
||||
|
||||
import '../app_config.dart';
|
||||
|
||||
|
|
@ -46,7 +47,7 @@ class _LoginState extends State<Login> {
|
|||
await matrix.client.login(
|
||||
user: usernameController.text,
|
||||
password: passwordController.text,
|
||||
initialDeviceDisplayName: matrix.clientName);
|
||||
initialDeviceDisplayName: PlatformInfos.clientName);
|
||||
} on MatrixException catch (exception) {
|
||||
setState(() => passwordError = exception.errorMessage);
|
||||
return setState(() => loading = false);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import 'package:fluffychat/components/matrix.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../utils/platform_infos.dart';
|
||||
|
||||
import '../app_config.dart';
|
||||
|
||||
|
|
@ -45,7 +46,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
|||
await matrix.client.register(
|
||||
username: widget.username,
|
||||
password: passwordController.text,
|
||||
initialDeviceDisplayName: matrix.clientName,
|
||||
initialDeviceDisplayName: PlatformInfos.clientName,
|
||||
auth: auth,
|
||||
);
|
||||
await waitForLogin;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue