hotfix: login

onboarding
Christian Pauly 5 years ago
parent a7a762015d
commit 837b1a3b94

@ -87,13 +87,16 @@ class MatrixState extends State<Matrix> {
try {
client.database = await getDatabase(client);
await client.connect();
if (await initLoginState == LoginState.logged && PlatformInfos.isMobile) {
await FirebaseController.setupFirebase(
this,
widget.clientName,
);
final firstLoginState = await initLoginState;
if (firstLoginState == LoginState.logged) {
_cleanUpUserStatus(userStatuses);
if (PlatformInfos.isMobile) {
await FirebaseController.setupFirebase(
this,
widget.clientName,
);
}
}
_cleanUpUserStatus(userStatuses);
} catch (e, s) {
client.onLoginStateChanged.sink.addError(e, s);
captureException(e, s);

@ -19,10 +19,10 @@ import 'views/chat_list.dart';
final sentry = SentryClient(dsn: '8591d0d863b646feb4f3dda7e5dcab38');
void captureException(error, stackTrace) async {
final storage = LocalStorage('LocalStorage');
await storage.ready;
debugPrint(error.toString());
debugPrint(stackTrace.toString());
final storage = LocalStorage('LocalStorage');
await storage.ready;
if (storage.getItem('sentry') == true) {
await sentry.captureException(
exception: error,

Loading…
Cancel
Save