fix: Remove status msg not changeable from old cache

This commit is contained in:
krille-chan 2024-02-05 08:58:53 +01:00
parent f5c536878a
commit 2e67695645
No known key found for this signature in database

View file

@ -187,26 +187,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
final StreamController<Map<String, dynamic>?> onShareContentChanged =
StreamController.broadcast();
void _initWithStore() async {
try {
if (client.isLogged()) {
// TODO: Figure out how this works in multi account
final statusMsg = store.getString(SettingKeys.ownStatusMessage);
if (statusMsg?.isNotEmpty ?? false) {
Logs().v('Send cached status message: "$statusMsg"');
await client.setPresence(
client.userID!,
PresenceType.online,
statusMsg: statusMsg,
);
}
}
} catch (e, s) {
client.onLoginStateChanged.addError(e, s);
rethrow;
}
}
final onRoomKeyRequestSub = <String, StreamSubscription>{};
final onKeyVerificationRequestSub = <String, StreamSubscription>{};
final onNotification = <String, StreamSubscription>{};
@ -365,8 +345,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
}
void initMatrix() {
_initWithStore();
for (final c in widget.clients) {
_registerSubs(c.clientName);
}