mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 06:39:25 +01:00
refactor: Update dependencies
This commit is contained in:
parent
5d67564445
commit
1911004d05
@ -869,8 +869,11 @@ class ChatController extends State<ChatPageWithRoom> {
|
||||
setState(() => showEmojiPicker = false);
|
||||
if (emoji == null) return;
|
||||
// make sure we don't send the same emoji twice
|
||||
if (_allReactionEvents
|
||||
.any((e) => e.content['m.relates_to']['key'] == emoji.emoji)) return;
|
||||
if (_allReactionEvents.any(
|
||||
(e) => e.content.tryGetMap('m.relates_to')?['key'] == emoji.emoji,
|
||||
)) {
|
||||
return;
|
||||
}
|
||||
return sendEmojiAction(emoji.emoji);
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ class MessageReactions extends StatelessWidget {
|
||||
final evt = allReactionEvents.firstWhereOrNull(
|
||||
(e) =>
|
||||
e.senderId == e.room.client.userID &&
|
||||
e.content['m.relates_to']['key'] == r.key,
|
||||
e.content.tryGetMap('m.relates_to')?['key'] == r.key,
|
||||
);
|
||||
if (evt != null) {
|
||||
showFutureLoadingDialog(
|
||||
|
@ -52,7 +52,8 @@ class EventVideoPlayerState extends State<EventVideoPlayer> {
|
||||
final networkUri = _networkUri;
|
||||
if (kIsWeb && networkUri != null && _chewieManager == null) {
|
||||
_chewieManager ??= ChewieController(
|
||||
videoPlayerController: VideoPlayerController.network(networkUri),
|
||||
videoPlayerController:
|
||||
VideoPlayerController.networkUrl(Uri.parse(networkUri)),
|
||||
autoPlay: true,
|
||||
autoInitialize: true,
|
||||
);
|
||||
|
@ -183,12 +183,13 @@ class InputBar extends StatelessWidget {
|
||||
final state = r.getState(EventTypes.RoomCanonicalAlias);
|
||||
if ((state != null &&
|
||||
((state.content['alias'] is String &&
|
||||
state.content['alias']
|
||||
state.content
|
||||
.tryGet<String>('alias')!
|
||||
.split(':')[0]
|
||||
.toLowerCase()
|
||||
.contains(roomSearch)) ||
|
||||
(state.content['alt_aliases'] is List &&
|
||||
state.content['alt_aliases'].any(
|
||||
(state.content['alt_aliases'] as List).any(
|
||||
(l) =>
|
||||
l is String &&
|
||||
l
|
||||
|
@ -52,7 +52,7 @@ class ReactionsPicker extends StatelessWidget {
|
||||
|
||||
for (final event in allReactionEvents) {
|
||||
try {
|
||||
emojis.remove(event.content['m.relates_to']['key']);
|
||||
emojis.remove(event.content.tryGetMap('m.relates_to')!['key']);
|
||||
} catch (_) {}
|
||||
}
|
||||
return Row(
|
||||
|
@ -83,7 +83,9 @@ class ChatDetailsController extends State<ChatDetails> {
|
||||
RequestType.GET,
|
||||
'/client/unstable/org.matrix.msc2432/rooms/${Uri.encodeComponent(room.id)}/aliases',
|
||||
)
|
||||
.then((response) => List<String>.from(response['aliases'])),
|
||||
.then(
|
||||
(response) => List<String>.from(response['aliases'] as Iterable),
|
||||
),
|
||||
);
|
||||
// Switch to the stable api once it is implemented.
|
||||
|
||||
|
@ -73,8 +73,10 @@ class ChatPermissionsSettingsController extends State<ChatPermissionsSettings> {
|
||||
|
||||
void updateRoomAction(Capabilities capabilities) async {
|
||||
final room = Matrix.of(context).client.getRoomById(roomId!)!;
|
||||
final String roomVersion =
|
||||
room.getState(EventTypes.RoomCreate)!.content['room_version'] ?? '1';
|
||||
final roomVersion = room
|
||||
.getState(EventTypes.RoomCreate)!
|
||||
.content['room_version'] as String? ??
|
||||
'1';
|
||||
final newVersion = await showConfirmationDialog<String>(
|
||||
context: context,
|
||||
title: L10n.of(context)!.replaceRoomWithNewerVersion,
|
||||
|
@ -127,9 +127,9 @@ class ChatPermissionsSettingsView extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
final String roomVersion = room
|
||||
final roomVersion = room
|
||||
.getState(EventTypes.RoomCreate)!
|
||||
.content['room_version'] ??
|
||||
.content['room_version'] as String? ??
|
||||
'1';
|
||||
|
||||
return ListTile(
|
||||
|
@ -109,6 +109,10 @@ class KeyVerificationPageState extends State<KeyVerificationDialog> {
|
||||
Widget body;
|
||||
final buttons = <Widget>[];
|
||||
switch (widget.request.state) {
|
||||
case KeyVerificationState.showQRSuccess:
|
||||
case KeyVerificationState.confirmQRScan:
|
||||
case KeyVerificationState.askChoice:
|
||||
throw 'Not implemented';
|
||||
case KeyVerificationState.askSSSS:
|
||||
// prompt the user for their ssss passphrase / key
|
||||
final textEditingController = TextEditingController();
|
||||
|
@ -59,7 +59,7 @@ class NewPrivateChatView extends StatelessWidget {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
QrImage(
|
||||
QrImageView(
|
||||
data:
|
||||
'https://matrix.to/#/${Matrix.of(context).client.userID}',
|
||||
version: QrVersions.auto,
|
||||
|
@ -151,12 +151,11 @@ class EmotesSettingsController extends State<EmotesSettings> {
|
||||
|
||||
bool isGloballyActive(Client? client) =>
|
||||
room != null &&
|
||||
client!.accountData['im.ponies.emote_rooms']?.content is Map &&
|
||||
client.accountData['im.ponies.emote_rooms']!.content['rooms'] is Map &&
|
||||
client.accountData['im.ponies.emote_rooms']!.content['rooms'][room!.id]
|
||||
is Map &&
|
||||
client.accountData['im.ponies.emote_rooms']!.content['rooms'][room!.id]
|
||||
[stateKey ?? ''] is Map;
|
||||
client!.accountData['im.ponies.emote_rooms']?.content
|
||||
.tryGetMap<String, Object?>('rooms')
|
||||
?.tryGetMap<String, Object?>(room!.id)
|
||||
?.tryGetMap<String, Object?>(stateKey ?? '') !=
|
||||
null;
|
||||
|
||||
bool get readonly =>
|
||||
room == null ? false : !(room!.canSendEvent('im.ponies.room_emotes'));
|
||||
|
@ -40,16 +40,14 @@ class MultipleEmotesSettingsView extends StatelessWidget {
|
||||
itemCount: keys.length,
|
||||
itemBuilder: (BuildContext context, int i) {
|
||||
final event = packs[keys[i]];
|
||||
String? packName = keys[i].isNotEmpty ? keys[i] : 'Default Pack';
|
||||
if (event != null && event.content['pack'] is Map) {
|
||||
if (event.content['pack']['displayname'] is String) {
|
||||
packName = event.content['pack']['displayname'];
|
||||
} else if (event.content['pack']['name'] is String) {
|
||||
packName = event.content['pack']['name'];
|
||||
}
|
||||
}
|
||||
final eventPack =
|
||||
event?.content.tryGetMap<String, Object?>('pack');
|
||||
final packName = eventPack?.tryGet<String>('displayname') ??
|
||||
eventPack?.tryGet<String>('name') ??
|
||||
(keys[i].isNotEmpty ? keys[i] : 'Default Pack');
|
||||
|
||||
return ListTile(
|
||||
title: Text(packName!),
|
||||
title: Text(packName),
|
||||
onTap: () async {
|
||||
VRouter.of(context).toSegments(
|
||||
['rooms', room.id, 'details', 'emotes', keys[i]],
|
||||
|
@ -182,8 +182,12 @@ class MatrixLocals extends MatrixLocalizations {
|
||||
String get noPermission => l10n.noKeyForThisMessage;
|
||||
|
||||
@override
|
||||
String redactedAnEvent(String senderName) {
|
||||
return l10n.redactedAnEvent(senderName);
|
||||
String redactedAnEvent(Event redactedEvent) {
|
||||
return l10n.redactedAnEvent(
|
||||
redactedEvent.redactedBecause?.senderFromMemoryOrFallback
|
||||
.calcLocalizedBodyFallback(this) ??
|
||||
l10n.user,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@ -192,8 +196,10 @@ class MatrixLocals extends MatrixLocalizations {
|
||||
}
|
||||
|
||||
@override
|
||||
String removedBy(String calcDisplayname) {
|
||||
return l10n.removedBy(calcDisplayname);
|
||||
String removedBy(Event redactedEvent) {
|
||||
return l10n.removedBy(
|
||||
redactedEvent.senderFromMemoryOrFallback.calcLocalizedBodyFallback(this),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <desktop_lifecycle/desktop_lifecycle_plugin.h>
|
||||
#include <dynamic_color/dynamic_color_plugin.h>
|
||||
#include <emoji_picker_flutter/emoji_picker_flutter_plugin.h>
|
||||
#include <file_selector_linux/file_selector_plugin.h>
|
||||
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||
#include <handy_window/handy_window_plugin.h>
|
||||
@ -30,6 +31,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) emoji_picker_flutter_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "EmojiPickerFlutterPlugin");
|
||||
emoji_picker_flutter_plugin_register_with_registrar(emoji_picker_flutter_registrar);
|
||||
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
|
||||
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
|
||||
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
|
||||
|
@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
desktop_lifecycle
|
||||
dynamic_color
|
||||
emoji_picker_flutter
|
||||
file_selector_linux
|
||||
flutter_secure_storage_linux
|
||||
flutter_webrtc
|
||||
handy_window
|
||||
|
@ -12,6 +12,7 @@ import desktop_lifecycle
|
||||
import device_info_plus
|
||||
import dynamic_color
|
||||
import emoji_picker_flutter
|
||||
import file_selector_macos
|
||||
import flutter_app_badger
|
||||
import flutter_local_notifications
|
||||
import flutter_secure_storage_macos
|
||||
@ -19,15 +20,18 @@ import flutter_web_auth_2
|
||||
import flutter_webrtc
|
||||
import geolocator_apple
|
||||
import just_audio
|
||||
import macos_ui
|
||||
import macos_window_utils
|
||||
import package_info_plus
|
||||
import path_provider_foundation
|
||||
import record_macos
|
||||
import share_plus
|
||||
import shared_preferences_macos
|
||||
import shared_preferences_foundation
|
||||
import sqflite
|
||||
import url_launcher_macos
|
||||
import video_compress
|
||||
import wakelock_macos
|
||||
import wakelock_plus
|
||||
import window_to_front
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
@ -38,6 +42,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
||||
EmojiPickerFlutterPlugin.register(with: registry.registrar(forPlugin: "EmojiPickerFlutterPlugin"))
|
||||
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
|
||||
FlutterAppBadgerPlugin.register(with: registry.registrar(forPlugin: "FlutterAppBadgerPlugin"))
|
||||
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
|
||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||
@ -45,6 +50,8 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
|
||||
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
|
||||
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
|
||||
MacOSUiPlugin.register(with: registry.registrar(forPlugin: "MacOSUiPlugin"))
|
||||
MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin"))
|
||||
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
RecordMacosPlugin.register(with: registry.registrar(forPlugin: "RecordMacosPlugin"))
|
||||
@ -54,5 +61,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||
VideoCompressPlugin.register(with: registry.registrar(forPlugin: "VideoCompressPlugin"))
|
||||
WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin"))
|
||||
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
|
||||
WindowToFrontPlugin.register(with: registry.registrar(forPlugin: "WindowToFrontPlugin"))
|
||||
}
|
||||
|
592
pubspec.lock
592
pubspec.lock
File diff suppressed because it is too large
Load Diff
24
pubspec.yaml
24
pubspec.yaml
@ -14,12 +14,12 @@ dependencies:
|
||||
callkeep: ^0.3.2
|
||||
chewie: ^1.3.6
|
||||
collection: ^1.16.0
|
||||
connectivity_plus: ^3.0.2
|
||||
connectivity_plus: ^4.0.1
|
||||
cupertino_icons: any
|
||||
desktop_drop: ^0.4.0
|
||||
desktop_lifecycle: ^0.1.0
|
||||
desktop_notifications: ^0.6.3
|
||||
device_info_plus: ^8.0.0
|
||||
device_info_plus: ^9.0.2
|
||||
dynamic_color: ^1.6.0
|
||||
emoji_picker_flutter: ^1.5.1
|
||||
emoji_proposal: ^0.0.1
|
||||
@ -32,37 +32,37 @@ dependencies:
|
||||
flutter_app_lock: ^3.0.0
|
||||
flutter_blurhash: ^0.7.0
|
||||
flutter_cache_manager: ^3.3.0
|
||||
flutter_foreground_task: ^3.10.0
|
||||
flutter_foreground_task: ^6.0.0+1
|
||||
flutter_highlighter: ^0.1.1
|
||||
flutter_html: ^3.0.0-beta.2
|
||||
flutter_html_table: ^3.0.0-beta.2
|
||||
flutter_linkify: ^6.0.0
|
||||
flutter_local_notifications: ^12.0.2
|
||||
flutter_local_notifications: ^15.1.0+1
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
flutter_map: ^3.1.0
|
||||
flutter_map: ^4.0.0
|
||||
flutter_math_fork: ^0.7.1
|
||||
flutter_olm: ^1.2.0
|
||||
flutter_openssl_crypto: ^0.1.0
|
||||
flutter_ringtone_player: ^3.1.1
|
||||
flutter_secure_storage: ^7.0.1
|
||||
flutter_secure_storage: ^8.0.0
|
||||
flutter_typeahead: ^4.3.2
|
||||
flutter_web_auth_2: ^2.1.1
|
||||
flutter_webrtc: ^0.9.35
|
||||
future_loading_dialog: ^0.2.3
|
||||
geolocator: ^7.6.2
|
||||
handy_window: ^0.1.9
|
||||
handy_window: ^0.3.1
|
||||
hive: ^2.2.3
|
||||
hive_flutter: ^1.1.0
|
||||
http: ^0.13.4
|
||||
image_picker: ^0.8.4+8
|
||||
image_picker: ^1.0.0
|
||||
intl: any
|
||||
just_audio: ^0.9.30
|
||||
just_audio_mpv: ^0.1.6
|
||||
keyboard_shortcuts: ^0.1.4
|
||||
latlong2: ^0.8.1
|
||||
linkify: ^5.0.0
|
||||
matrix: ^0.20.5
|
||||
matrix: ^0.22.0
|
||||
matrix_homeserver_recommendations: ^0.3.0
|
||||
native_imaging: ^0.1.0
|
||||
package_info_plus: ^4.0.0
|
||||
@ -77,12 +77,12 @@ dependencies:
|
||||
record: ^4.4.4
|
||||
scroll_to_index: ^3.0.1
|
||||
share_plus: ^7.0.0
|
||||
shared_preferences: 2.0.15 # Pinned because https://github.com/flutter/flutter/issues/118401
|
||||
shared_preferences: ^2.2.0 # Pinned because https://github.com/flutter/flutter/issues/118401
|
||||
slugify: ^2.0.0
|
||||
swipe_to_action: ^0.2.0
|
||||
tor_detector_web: ^1.1.0
|
||||
uni_links: ^0.5.1
|
||||
unifiedpush: ^4.0.3
|
||||
unifiedpush: ^5.0.0
|
||||
universal_html: ^2.0.8
|
||||
url_launcher: ^6.0.20
|
||||
vibration: ^1.7.4-nullsafety.0
|
||||
@ -93,7 +93,7 @@ dependencies:
|
||||
webrtc_interface: ^1.0.13
|
||||
|
||||
dev_dependencies:
|
||||
dart_code_metrics: ^4.10.1
|
||||
dart_code_metrics: ^5.7.5
|
||||
flutter_lints: ^2.0.1
|
||||
flutter_native_splash: ^2.0.3+1
|
||||
flutter_test:
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <desktop_lifecycle/desktop_lifecycle_plugin.h>
|
||||
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
||||
#include <emoji_picker_flutter/emoji_picker_flutter_plugin_c_api.h>
|
||||
#include <file_selector_windows/file_selector_windows.h>
|
||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||
#include <record_windows/record_windows_plugin_c_api.h>
|
||||
@ -29,6 +30,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||
EmojiPickerFlutterPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("EmojiPickerFlutterPluginCApi"));
|
||||
FileSelectorWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
||||
FlutterWebRTCPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterWebRTCPlugin"));
|
||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||
|
@ -8,6 +8,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
desktop_lifecycle
|
||||
dynamic_color
|
||||
emoji_picker_flutter
|
||||
file_selector_windows
|
||||
flutter_webrtc
|
||||
permission_handler_windows
|
||||
record_windows
|
||||
|
Loading…
Reference in New Issue
Block a user