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

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

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

Loading…
Cancel
Save