service: Make [XmppState] and [PreferencesState] migratable

This commit is contained in:
2022-04-06 14:46:08 +02:00
parent cf353ce5ce
commit 75811d7dee
9 changed files with 402 additions and 184 deletions

View File

@@ -194,10 +194,9 @@ void onStart() {
]);
GetIt.I.registerSingleton<XmppConnection>(connection);
final account = await xmpp.getAccountData();
final settings = await xmpp.getConnectionSettings();
if (account!= null && settings != null) {
if (settings != null && settings.jid != null && settings.password != null) {
xmpp.connect(settings, false);
}
})();