chore: Try out new matrix dart sdk

This commit is contained in:
Krille 2025-01-08 09:07:57 +01:00
commit 55eb23f14d
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
4 changed files with 18 additions and 28 deletions

View file

@ -305,15 +305,8 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
if (PlatformInfos.isWeb || PlatformInfos.isLinux) {
c.onSync.stream.first.then((s) {
html.Notification.requestPermission();
onNotification[name] ??= c.onEvent.stream
.where(
(e) =>
e.type == EventUpdateType.timeline &&
[EventTypes.Message, EventTypes.Sticker, EventTypes.Encrypted]
.contains(e.content['type']) &&
e.content['sender'] != c.userID,
)
.listen(showLocalNotification);
onNotification[name] ??=
c.onNotification.stream.listen(showLocalNotification);
});
}
}