matrix dart sdk updates

pull/1544/head
ggurdin 11 months ago
parent b2e4e93992
commit 6d59faaa89
No known key found for this signature in database
GPG Key ID: A01CB41737CBB478

@ -12,7 +12,6 @@ import 'package:url_launcher/url_launcher_string.dart';
import '../../widgets/matrix.dart';
import 'settings_homeserver.dart';
/// MERGE TODO
class SettingsHomeserverView extends StatelessWidget {
final SettingsHomeserverController controller;
@ -48,10 +47,7 @@ class SettingsHomeserverView extends StatelessWidget {
),
),
FutureBuilder(
// #Pangea
// future: client.getWellknownSupport(),
future: Future<Object?>.value(null),
// Pangea#
future: client.getWellknownSupport(),
builder: (context, snapshot) {
final error = snapshot.error;
final data = snapshot.data;
@ -74,21 +70,17 @@ class SettingsHomeserverView extends StatelessWidget {
),
);
}
// #Pangea
const supportPage = null;
const contacts = null;
// final supportPage = data.supportPage;
// final contacts = data.contacts;
// if (supportPage == null && contacts == null) {
// return ListTile(
// leading: const Icon(Icons.error_outlined),
// title: Text(
// L10n.of(context).noContactInformationProvided,
// style: const TextStyle(fontSize: 14),
// ),
// );
// }
// Pangea#
final supportPage = data.supportPage;
final contacts = data.contacts;
if (supportPage == null && contacts == null) {
return ListTile(
leading: const Icon(Icons.error_outlined),
title: Text(
L10n.of(context).noContactInformationProvided,
style: const TextStyle(fontSize: 14),
),
);
}
return Column(
mainAxisSize: MainAxisSize.min,
children: [
@ -290,15 +282,13 @@ class SettingsHomeserverView extends StatelessWidget {
}
}
// #Pangea
// extension on Role {
// String localizedString(L10n l10n) {
// switch (this) {
// case Role.mRoleAdmin:
// return l10n.contactServerAdmin;
// case Role.mRoleSecurity:
// return l10n.contactServerSecurity;
// }
// }
// }
// Pangea#
extension on Role {
String localizedString(L10n l10n) {
switch (this) {
case Role.mRoleAdmin:
return l10n.contactServerAdmin;
case Role.mRoleSecurity:
return l10n.contactServerSecurity;
}
}
}

@ -101,8 +101,6 @@ class SettingsNotificationsController extends State<SettingsNotifications> {
});
try {
await Matrix.of(context).client.setPushRuleEnabled(
// MERGE TODO: upgrade SDK and remove this first argument
'global',
item.type,
item.key,
enabled,

@ -403,7 +403,6 @@ class PangeaController {
) ??
false)) {
await matrixState.client.setPushRule(
'global',
PushRuleKind.override,
PangeaEventTypes.textToSpeechRule,
[PushRuleAction.dontNotify],

Loading…
Cancel
Save