hotfix: login
This commit is contained in:
parent
2f8491b41b
commit
0209a69722
|
@ -87,13 +87,16 @@ class MatrixState extends State<Matrix> {
|
||||||
try {
|
try {
|
||||||
client.database = await getDatabase(client);
|
client.database = await getDatabase(client);
|
||||||
await client.connect();
|
await client.connect();
|
||||||
if (await initLoginState == LoginState.logged && PlatformInfos.isMobile) {
|
final firstLoginState = await initLoginState;
|
||||||
|
if (firstLoginState == LoginState.logged) {
|
||||||
|
_cleanUpUserStatus(userStatuses);
|
||||||
|
if (PlatformInfos.isMobile) {
|
||||||
await FirebaseController.setupFirebase(
|
await FirebaseController.setupFirebase(
|
||||||
this,
|
this,
|
||||||
widget.clientName,
|
widget.clientName,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
_cleanUpUserStatus(userStatuses);
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
client.onLoginStateChanged.sink.addError(e, s);
|
client.onLoginStateChanged.sink.addError(e, s);
|
||||||
captureException(e, s);
|
captureException(e, s);
|
||||||
|
|
|
@ -19,10 +19,10 @@ import 'views/chat_list.dart';
|
||||||
final sentry = SentryClient(dsn: '8591d0d863b646feb4f3dda7e5dcab38');
|
final sentry = SentryClient(dsn: '8591d0d863b646feb4f3dda7e5dcab38');
|
||||||
|
|
||||||
void captureException(error, stackTrace) async {
|
void captureException(error, stackTrace) async {
|
||||||
final storage = LocalStorage('LocalStorage');
|
|
||||||
await storage.ready;
|
|
||||||
debugPrint(error.toString());
|
debugPrint(error.toString());
|
||||||
debugPrint(stackTrace.toString());
|
debugPrint(stackTrace.toString());
|
||||||
|
final storage = LocalStorage('LocalStorage');
|
||||||
|
await storage.ready;
|
||||||
if (storage.getItem('sentry') == true) {
|
if (storage.getItem('sentry') == true) {
|
||||||
await sentry.captureException(
|
await sentry.captureException(
|
||||||
exception: error,
|
exception: error,
|
||||||
|
|
Loading…
Reference in a new issue