fluffychat merge - resolve conflicts

pull/1384/head
ggurdin 1 year ago
commit 4fccd5fed0
No known key found for this signature in database
GPG Key ID: A01CB41737CBB478

@ -4181,5 +4181,13 @@
"changeTheCanonicalRoomAlias": "Change the main public chat address",
"sendRoomNotifications": "Send a @room notifications",
"changeTheDescriptionOfTheGroup": "Change the description of the chat",
"chatPermissionsDescription": "Define which power level is necessary for certain actions in this chat. The power levels 0, 50 and 100 are usually representing users, moderators and admins, but any gradation is possible."
"chatPermissionsDescription": "Define which power level is necessary for certain actions in this chat. The power levels 0, 50 and 100 are usually representing users, moderators and admins, but any gradation is possible.",
"updateInstalled": "🎉 Update {version} installed!",
"@updateInstalled": {
"type": "text",
"placeholders": {
"version": {}
}
},
"changelog": "Changelog"
}

@ -56,6 +56,8 @@ abstract class AppConfig {
static const String supportUrl = 'https://www.pangeachat.com/faqs';
static const String termsOfServiceUrl =
'https://www.pangeachat.com/terms-of-service';
// static const String changelogUrl =
// 'https://github.com/krille-chan/fluffychat/blob/main/CHANGELOG.md';
//Pangea#
static final Uri newIssueUrl = Uri(
scheme: 'https',

@ -78,9 +78,6 @@ abstract class FluffyThemes {
? Typography.material2018().black.merge(fallbackTextTheme)
: Typography.material2018().white.merge(fallbackTextTheme)
: null,
snackBarTheme: const SnackBarThemeData(
behavior: SnackBarBehavior.floating,
),
dividerColor: brightness == Brightness.light
? Colors.blueGrey.shade50
: Colors.blueGrey.shade900,

@ -15,6 +15,7 @@ import 'package:fluffychat/pangea/widgets/subscription/subscription_snackbar.dar
import 'package:fluffychat/utils/localized_exception_extension.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/utils/show_update_snackbar.dart';
import 'package:fluffychat/utils/tor_stub.dart'
if (dart.library.html) 'package:tor_detector_web/tor_detector_web.dart';
import 'package:fluffychat/widgets/avatar.dart';
@ -541,6 +542,7 @@ class ChatListController extends State<ChatList>
searchServer =
Matrix.of(context).store.getString(_serverStoreNamespace);
Matrix.of(context).backgroundPush?.setupPush();
UpdateNotifier.showUpdateSnackBar(context);
}
// Workaround for system UI overlay style not applied on app start

@ -32,16 +32,6 @@ class ClientChooserButton extends StatelessWidget {
// Pangea#
return <PopupMenuEntry<Object>>[
// #Pangea
// PopupMenuItem(
// value: SettingsAction.newGroup,
// child: Row(
// children: [
// const Icon(Icons.group_add_outlined),
// const SizedBox(width: 18),
// Text(L10n.of(context)!.createGroup),
// ],
// ),
// ),
PopupMenuItem(
value: SettingsAction.joinWithClassCode,
child: Row(
@ -52,21 +42,6 @@ class ClientChooserButton extends StatelessWidget {
],
),
),
// PopupMenuItem(
// enabled: matrix.client.rooms.any(
// (room) =>
// room.isSpace &&
// room.ownPowerLevel >= ClassDefaultValues.powerLevelOfAdmin,
// ),
// value: SettingsAction.spaceAnalytics,
// child: Row(
// children: [
// const Icon(Icons.analytics_outlined),
// const SizedBox(width: 18),
// Expanded(child: Text(L10n.of(context)!.spaceAnalytics)),
// ],
// ),
// ),
PopupMenuItem(
enabled: matrix.client.rooms.any(
(room) => !room.isSpace && !room.isArchived && !room.isAnalyticsRoom,
@ -80,37 +55,31 @@ class ClientChooserButton extends StatelessWidget {
],
),
),
// PopupMenuItem(
// value: SettingsAction.newGroup,
// child: Row(
// children: [
// const Icon(Icons.group_add_outlined),
// const SizedBox(width: 18),
// Text(L10n.of(context)!.createGroup),
// ],
// ),
// ),
// Pangea#
PopupMenuItem(
value: SettingsAction.newClass,
value: SettingsAction.newSpace,
child: Row(
children: [
const Icon(Icons.school),
const Icon(Icons.workspaces_outlined),
const SizedBox(width: 18),
// #Pangea
Expanded(child: Text(L10n.of(context)!.createNewSpace)),
// Text(L10n.of(context)!.createNewSpace),
// Pangea#
],
),
),
// PopupMenuItem(
// value: SettingsAction.newSpace,
// child: Row(
// children: [
// const Icon(Icons.workspaces_outlined),
// const SizedBox(width: 18),
// Text(L10n.of(context)!.createNewSpace),
// ],
// ),
// ),
// if (controller.pangeaController.permissionsController.isUser18())
// PopupMenuItem(
// value: SettingsAction.findAConversationPartner,
// child: Row(
// children: [
// const Icon(Icons.add_circle_outline),
// const SizedBox(width: 18),
// Expanded(child: Text(L10n.of(context)!.findALanguagePartner)),
// ],
// ),
// ),
// #Pangea
// PopupMenuItem(
// value: SettingsAction.setStatus,
// child: Row(
@ -132,19 +101,18 @@ class ClientChooserButton extends StatelessWidget {
// ),
// ),
// Pangea#
PopupMenuItem(
// Currently disabled because of:
// https://github.com/matrix-org/matrix-react-sdk/pull/12286
/*PopupMenuItem(
value: SettingsAction.archive,
child: Row(
children: [
const Icon(Icons.archive_outlined),
const SizedBox(width: 18),
// #Pangea
// Text(L10n.of(context)!.archive),
Expanded(child: Text(L10n.of(context)!.viewArchive)),
// Pangea#
Text(L10n.of(context)!.archive),
],
),
),
),*/
// #Pangea
PopupMenuItem(
value: SettingsAction.learning,

@ -222,8 +222,6 @@ class SettingsController extends State<Settings> {
final client = Matrix.of(context).client;
profileFuture ??= client.getProfileFromUserId(
client.userID!,
cache: !profileUpdated,
getFromRooms: !profileUpdated,
);
return SettingsView(this);
}

@ -0,0 +1,49 @@
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:shared_preferences/shared_preferences.dart';
abstract class UpdateNotifier {
static const String versionStoreKey = 'last_known_version';
static void showUpdateSnackBar(BuildContext context) async {
final scaffoldMessenger = ScaffoldMessenger.of(context);
final currentVersion = await PlatformInfos.getVersion();
final store = await SharedPreferences.getInstance();
// final storedVersion = store.getString(versionStoreKey);
const storedVersion = "0.0.0";
if (currentVersion != storedVersion) {
ScaffoldFeatureController? controller;
controller = scaffoldMessenger.showSnackBar(
SnackBar(
duration: const Duration(seconds: 30),
content: Row(
children: [
IconButton(
icon: Icon(
Icons.close_outlined,
size: 20,
color: Theme.of(context).colorScheme.onPrimary,
),
onPressed: () => controller?.close(),
),
Expanded(
child: Text(
L10n.of(context)!.updateInstalled(currentVersion),
),
),
],
),
// #Pangea
// action: SnackBarAction(
// label: L10n.of(context)!.changelog,
// onPressed: () => launchUrlString(AppConfig.changelogUrl),
// ),
// Pangea#
),
);
await store.setString(versionStoreKey, currentVersion);
}
}
}

@ -75,7 +75,7 @@ dependencies:
git:
url: https://github.com/pangeachat/matrix-dart-sdk.git # repo
ref: main # branch
# matrix: ^0.30.0
# matrix: ^0.31.0
# Pangea#
native_imaging: ^0.1.1
package_info_plus: ^6.0.0

Loading…
Cancel
Save