chore: Update Matrix SDK and refactor
This commit is contained in:
parent
ea874b3e43
commit
d343c71703
17 changed files with 91 additions and 50 deletions
|
|
@ -1,8 +1,11 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
||||
|
||||
extension ClientStoriesExtension on Client {
|
||||
static const String storiesRoomType = 'msc3588.stories.stories-room';
|
||||
static const String storiesBlockListType = 'msc3588.stories.block-list';
|
||||
|
|
@ -85,7 +88,11 @@ extension ClientStoriesExtension on Client {
|
|||
context: context,
|
||||
actions: candidates
|
||||
.map(
|
||||
(room) => SheetAction(label: room.displayname, key: room),
|
||||
(room) => SheetAction(
|
||||
label: room.getLocalizedDisplayname(
|
||||
MatrixLocals(L10n.of(context)!),
|
||||
),
|
||||
key: room),
|
||||
)
|
||||
.toList());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,7 +200,9 @@ Future<void> _tryPushHelper(
|
|||
styleInformation: messagingStyleInformation ??
|
||||
MessagingStyleInformation(
|
||||
Person(name: event.room.client.userID),
|
||||
conversationTitle: event.room.displayname,
|
||||
conversationTitle: event.room.getLocalizedDisplayname(
|
||||
MatrixLocals(l10n),
|
||||
),
|
||||
groupConversation: !event.room.isDirectChat,
|
||||
messages: [newMessage],
|
||||
),
|
||||
|
|
@ -217,7 +219,9 @@ Future<void> _tryPushHelper(
|
|||
|
||||
await flutterLocalNotificationsPlugin.show(
|
||||
id,
|
||||
event.room.displayname,
|
||||
event.room.getLocalizedDisplayname(
|
||||
MatrixLocals(l10n),
|
||||
),
|
||||
body,
|
||||
platformChannelSpecifics,
|
||||
payload: event.roomId,
|
||||
|
|
|
|||
|
|
@ -222,8 +222,9 @@ class CallKeepManager {
|
|||
addCall(call.callId, callKeeper);
|
||||
await _callKeep.displayIncomingCall(
|
||||
call.callId,
|
||||
'${call.displayName!} (FluffyChat)',
|
||||
localizedCallerName: '${call.displayName!} (FluffyChat)',
|
||||
'${call.room.getLocalizedDisplayname()} (FluffyChat)',
|
||||
localizedCallerName:
|
||||
'${call.room.getLocalizedDisplayname()} (FluffyChat)',
|
||||
handleType: 'number',
|
||||
hasVideo: call.type == CallType.kVideo,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue