Merge branch 'dart3' into 'main'
migrate to dart 3.0/flutter 3.10 Closes #1203 See merge request famedly/fluffychat!1114
This commit is contained in:
commit
540cbb499e
8 changed files with 106 additions and 106 deletions
|
|
@ -375,7 +375,7 @@ class _Emoji extends StatelessWidget {
|
|||
sasEmoji[emoji.number]['translated_descriptions'],
|
||||
);
|
||||
translations['en'] = emoji.name;
|
||||
for (final locale in window.locales) {
|
||||
for (final locale in PlatformDispatcher.instance.locales) {
|
||||
final wantLocaleParts = locale.toString().split('_');
|
||||
final wantLanguage = wantLocaleParts.removeAt(0);
|
||||
for (final haveLocale in translations.keys) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class BackgroundPush {
|
|||
Future<void> loadLocale() async {
|
||||
// inspired by _lookupL10n in .dart_tool/flutter_gen/gen_l10n/l10n.dart
|
||||
l10n ??= (context != null ? L10n.of(context!) : null) ??
|
||||
(await L10n.delegate.load(window.locale));
|
||||
(await L10n.delegate.load(PlatformDispatcher.instance.locale));
|
||||
}
|
||||
|
||||
final pendingTests = <String, Completer<void>>{};
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ Future<void> _tryPushHelper(
|
|||
if (!isBackgroundMessage &&
|
||||
activeRoomId == notification.roomId &&
|
||||
activeRoomId != null &&
|
||||
client?.syncPresence == null) {
|
||||
client.syncPresence == null) {
|
||||
Logs().v('Room is in foreground. Stop push helper here.');
|
||||
return;
|
||||
}
|
||||
|
|
@ -144,7 +144,7 @@ Future<void> _tryPushHelper(
|
|||
return;
|
||||
}
|
||||
|
||||
l10n ??= await L10n.delegate.load(window.locale);
|
||||
l10n ??= await L10n.delegate.load(PlatformDispatcher.instance.locale);
|
||||
final matrixLocals = MatrixLocals(l10n);
|
||||
|
||||
// Calculate the body
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ extension UiaRequestManager on MatrixState {
|
|||
),
|
||||
);
|
||||
case AuthenticationTypes.emailIdentity:
|
||||
final currentThreepidCreds = this.currentThreepidCreds;
|
||||
if (currentThreepidCreds == null) {
|
||||
return uiaRequest.cancel(
|
||||
UiaException(L10n.of(widget.context)!.serverRequiresEmail),
|
||||
|
|
@ -57,7 +56,7 @@ extension UiaRequestManager on MatrixState {
|
|||
session: uiaRequest.session,
|
||||
type: AuthenticationTypes.emailIdentity,
|
||||
threepidCreds: ThreepidCreds(
|
||||
sid: currentThreepidCreds.sid,
|
||||
sid: currentThreepidCreds!.sid,
|
||||
clientSecret: currentClientSecret,
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue