chore: Update dependencies
This commit is contained in:
parent
da7e433ea3
commit
7a74a8a93f
52 changed files with 163 additions and 175 deletions
|
|
@ -18,10 +18,10 @@ class InviteStoryPage extends StatefulWidget {
|
|||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_InviteStoryPageState createState() => _InviteStoryPageState();
|
||||
InviteStoryPageState createState() => InviteStoryPageState();
|
||||
}
|
||||
|
||||
class _InviteStoryPageState extends State<InviteStoryPage> {
|
||||
class InviteStoryPageState extends State<InviteStoryPage> {
|
||||
Set<String> _undecided = {};
|
||||
final Set<String> _invite = {};
|
||||
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ class BootstrapDialog extends StatefulWidget {
|
|||
);
|
||||
|
||||
@override
|
||||
_BootstrapDialogState createState() => _BootstrapDialogState();
|
||||
BootstrapDialogState createState() => BootstrapDialogState();
|
||||
}
|
||||
|
||||
class _BootstrapDialogState extends State<BootstrapDialog> {
|
||||
class BootstrapDialogState extends State<BootstrapDialog> {
|
||||
final TextEditingController _recoveryKeyTextEditingController =
|
||||
TextEditingController();
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,13 @@ class ChatInputRow extends StatelessWidget {
|
|||
]
|
||||
: <Widget>[
|
||||
KeyBoardShortcuts(
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.altLeft,
|
||||
LogicalKeyboardKey.keyA
|
||||
},
|
||||
onKeysPressed: () =>
|
||||
controller.onAddPopupMenuButtonSelected('file'),
|
||||
helpLabel: L10n.of(context)!.sendFile,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
height: 56,
|
||||
|
|
@ -168,18 +175,17 @@ class ChatInputRow extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.altLeft,
|
||||
LogicalKeyboardKey.keyA
|
||||
},
|
||||
onKeysPressed: () =>
|
||||
controller.onAddPopupMenuButtonSelected('file'),
|
||||
helpLabel: L10n.of(context)!.sendFile,
|
||||
),
|
||||
Container(
|
||||
height: 56,
|
||||
alignment: Alignment.center,
|
||||
child: KeyBoardShortcuts(
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.altLeft,
|
||||
LogicalKeyboardKey.keyE
|
||||
},
|
||||
onKeysPressed: controller.emojiPickerAction,
|
||||
helpLabel: L10n.of(context)!.emojis,
|
||||
child: IconButton(
|
||||
tooltip: L10n.of(context)!.emojis,
|
||||
icon: PageTransitionSwitcher(
|
||||
|
|
@ -192,8 +198,8 @@ class ChatInputRow extends StatelessWidget {
|
|||
animation: primaryAnimation,
|
||||
secondaryAnimation: secondaryAnimation,
|
||||
transitionType: SharedAxisTransitionType.scaled,
|
||||
child: child,
|
||||
fillColor: Colors.transparent,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
child: Icon(
|
||||
|
|
@ -205,12 +211,6 @@ class ChatInputRow extends StatelessWidget {
|
|||
),
|
||||
onPressed: controller.emojiPickerAction,
|
||||
),
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.altLeft,
|
||||
LogicalKeyboardKey.keyE
|
||||
},
|
||||
onKeysPressed: controller.emojiPickerAction,
|
||||
helpLabel: L10n.of(context)!.emojis,
|
||||
),
|
||||
),
|
||||
if (controller.matrix!.isMultiAccount &&
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ class CupertinoWidgetsBottomSheet extends StatelessWidget {
|
|||
(widget) => Link(
|
||||
builder: (context, callback) {
|
||||
return CupertinoActionSheetAction(
|
||||
child: Text(widget.name ?? widget.url),
|
||||
onPressed: callback ?? () {},
|
||||
child: Text(widget.name ?? widget.url),
|
||||
);
|
||||
},
|
||||
target: LinkTarget.blank,
|
||||
|
|
@ -41,8 +41,8 @@ class CupertinoWidgetsBottomSheet extends StatelessWidget {
|
|||
},
|
||||
),
|
||||
CupertinoActionSheetAction(
|
||||
child: Text(L10n.of(context)!.cancel),
|
||||
onPressed: Navigator.of(context).pop,
|
||||
child: Text(L10n.of(context)!.cancel),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ class EncryptionButton extends StatefulWidget {
|
|||
final Room room;
|
||||
const EncryptionButton(this.room, {Key? key}) : super(key: key);
|
||||
@override
|
||||
_EncryptionButtonState createState() => _EncryptionButtonState();
|
||||
EncryptionButtonState createState() => EncryptionButtonState();
|
||||
}
|
||||
|
||||
class _EncryptionButtonState extends State<EncryptionButton> {
|
||||
class EncryptionButtonState extends State<EncryptionButton> {
|
||||
StreamSubscription? _onSyncSub;
|
||||
|
||||
void _enableEncryptionAction() async {
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@ class AudioPlayerWidget extends StatefulWidget {
|
|||
: super(key: key);
|
||||
|
||||
@override
|
||||
_AudioPlayerState createState() => _AudioPlayerState();
|
||||
AudioPlayerState createState() => AudioPlayerState();
|
||||
}
|
||||
|
||||
enum AudioPlayerStatus { notDownloaded, downloading, downloaded }
|
||||
|
||||
class _AudioPlayerState extends State<AudioPlayerWidget> {
|
||||
class AudioPlayerState extends State<AudioPlayerWidget> {
|
||||
AudioPlayerStatus status = AudioPlayerStatus.notDownloaded;
|
||||
final AudioPlayer audioPlayer = AudioPlayer();
|
||||
|
||||
|
|
|
|||
|
|
@ -87,10 +87,7 @@ class ReplyContent extends StatelessWidget {
|
|||
future: displayEvent.fetchSenderUser(),
|
||||
builder: (context, snapshot) {
|
||||
return Text(
|
||||
(snapshot.data?.calcDisplayname() ??
|
||||
displayEvent.senderFromMemoryOrFallback
|
||||
.calcDisplayname()) +
|
||||
':',
|
||||
'${snapshot.data?.calcDisplayname() ?? displayEvent.senderFromMemoryOrFallback.calcDisplayname()}:',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ class Sticker extends StatefulWidget {
|
|||
const Sticker(this.event, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_StickerState createState() => _StickerState();
|
||||
StickerState createState() => StickerState();
|
||||
}
|
||||
|
||||
class _StickerState extends State<Sticker> {
|
||||
class StickerState extends State<Sticker> {
|
||||
bool? animated;
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ class EventVideoPlayer extends StatefulWidget {
|
|||
const EventVideoPlayer(this.event, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_EventVideoPlayerState createState() => _EventVideoPlayerState();
|
||||
EventVideoPlayerState createState() => EventVideoPlayerState();
|
||||
}
|
||||
|
||||
class _EventVideoPlayerState extends State<EventVideoPlayer> {
|
||||
class EventVideoPlayerState extends State<EventVideoPlayer> {
|
||||
ChewieController? _chewieManager;
|
||||
bool _isDownloading = false;
|
||||
String? _networkUri;
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ class InputBar extends StatelessWidget {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('/' + command,
|
||||
Text('/$command',
|
||||
style: const TextStyle(fontFamily: 'monospace')),
|
||||
Text(
|
||||
hint,
|
||||
|
|
@ -319,14 +319,14 @@ class InputBar extends StatelessWidget {
|
|||
: controller!.text.substring(controller!.selection.baseOffset + 1);
|
||||
var insertText = '';
|
||||
if (suggestion['type'] == 'command') {
|
||||
insertText = suggestion['name']! + ' ';
|
||||
insertText = '${suggestion['name']!} ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'^(/\w*)$'),
|
||||
(Match m) => '/' + insertText,
|
||||
(Match m) => '/$insertText',
|
||||
);
|
||||
}
|
||||
if (suggestion['type'] == 'emoji') {
|
||||
insertText = suggestion['emoji']! + ' ';
|
||||
insertText = '${suggestion['emoji']!} ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
suggestion['current_word']!,
|
||||
(Match m) => insertText,
|
||||
|
|
@ -351,21 +351,21 @@ class InputBar extends StatelessWidget {
|
|||
break;
|
||||
}
|
||||
}
|
||||
insertText = ':${isUnique ? '' : insertPack! + '~'}$insertEmote: ';
|
||||
insertText = ':${isUnique ? '' : '${insertPack!}~'}$insertEmote: ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'(\s|^)(:(?:[-\w]+~)?[-\w]+)$'),
|
||||
(Match m) => '${m[1]}$insertText',
|
||||
);
|
||||
}
|
||||
if (suggestion['type'] == 'user') {
|
||||
insertText = suggestion['mention']! + ' ';
|
||||
insertText = '${suggestion['mention']!} ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'(\s|^)(@[-\w]+)$'),
|
||||
(Match m) => '${m[1]}$insertText',
|
||||
);
|
||||
}
|
||||
if (suggestion['type'] == 'room') {
|
||||
insertText = suggestion['mxid']! + ' ';
|
||||
insertText = '${suggestion['mxid']!} ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'(\s|^)(#[-\w]+)$'),
|
||||
(Match m) => '${m[1]}$insertText',
|
||||
|
|
@ -401,9 +401,7 @@ class InputBar extends StatelessWidget {
|
|||
final val = controller!.value;
|
||||
final selection = val.selection.start;
|
||||
final messageWithoutNewLine =
|
||||
controller!.text.substring(0, val.selection.start) +
|
||||
'\n' +
|
||||
controller!.text.substring(val.selection.end);
|
||||
'${controller!.text.substring(0, val.selection.start)}\n${controller!.text.substring(val.selection.end)}';
|
||||
controller!.value = TextEditingValue(
|
||||
text: messageWithoutNewLine,
|
||||
selection: TextSelection.fromPosition(
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ class RecordingDialog extends StatefulWidget {
|
|||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_RecordingDialogState createState() => _RecordingDialogState();
|
||||
RecordingDialogState createState() => RecordingDialogState();
|
||||
}
|
||||
|
||||
class _RecordingDialogState extends State<RecordingDialog> {
|
||||
class RecordingDialogState extends State<RecordingDialog> {
|
||||
Timer? _recorderSubscription;
|
||||
Duration _duration = Duration.zero;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ class SendFileDialog extends StatefulWidget {
|
|||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_SendFileDialogState createState() => _SendFileDialogState();
|
||||
SendFileDialogState createState() => SendFileDialogState();
|
||||
}
|
||||
|
||||
class _SendFileDialogState extends State<SendFileDialog> {
|
||||
class SendFileDialogState extends State<SendFileDialog> {
|
||||
bool origImage = false;
|
||||
|
||||
/// Images smaller than 20kb don't need compression.
|
||||
|
|
@ -92,7 +92,7 @@ class _SendFileDialogState extends State<SendFileDialog> {
|
|||
),
|
||||
InkWell(
|
||||
onTap: () => setState(() => origImage = !origImage),
|
||||
child: Text(L10n.of(context)!.sendOriginal + ' ($sizeString)'),
|
||||
child: Text('${L10n.of(context)!.sendOriginal} ($sizeString)'),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ class SendLocationDialog extends StatefulWidget {
|
|||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_SendLocationDialogState createState() => _SendLocationDialogState();
|
||||
SendLocationDialogState createState() => SendLocationDialogState();
|
||||
}
|
||||
|
||||
class _SendLocationDialogState extends State<SendLocationDialog> {
|
||||
class SendLocationDialogState extends State<SendLocationDialog> {
|
||||
bool disabled = false;
|
||||
bool denied = false;
|
||||
bool isSending = false;
|
||||
|
|
@ -54,19 +54,19 @@ class _SendLocationDialogState extends State<SendLocationDialog> {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
Position _position;
|
||||
Position position;
|
||||
try {
|
||||
_position = await Geolocator.getCurrentPosition(
|
||||
position = await Geolocator.getCurrentPosition(
|
||||
desiredAccuracy: LocationAccuracy.best,
|
||||
timeLimit: const Duration(seconds: 30),
|
||||
);
|
||||
} on TimeoutException {
|
||||
_position = await Geolocator.getCurrentPosition(
|
||||
position = await Geolocator.getCurrentPosition(
|
||||
desiredAccuracy: LocationAccuracy.medium,
|
||||
timeLimit: const Duration(seconds: 30),
|
||||
);
|
||||
}
|
||||
setState(() => position = _position);
|
||||
setState(() => position = position);
|
||||
} catch (e) {
|
||||
setState(() => error = e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class StickerPickerDialogState extends State<StickerPickerDialog> {
|
|||
final packSlugs = stickerPacks.keys.toList();
|
||||
|
||||
// ignore: prefer_function_declarations_over_variables
|
||||
final _packBuilder = (BuildContext context, int packIndex) {
|
||||
final packBuilder = (BuildContext context, int packIndex) {
|
||||
final pack = stickerPacks[packSlugs[packIndex]]!;
|
||||
final filteredImagePackImageEntried = pack.images.entries.toList();
|
||||
if (searchFilter?.isNotEmpty ?? false) {
|
||||
|
|
@ -128,7 +128,7 @@ class StickerPickerDialogState extends State<StickerPickerDialog> {
|
|||
),
|
||||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
_packBuilder,
|
||||
packBuilder,
|
||||
childCount: packSlugs.length,
|
||||
)),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ class ChatDetailsController extends State<ChatDetails> {
|
|||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () =>
|
||||
room.client.setRoomAlias('#' + input.single + ':' + domain!, room.id),
|
||||
room.client.setRoomAlias('#${input.single}:${domain!}', room.id),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,9 +52,8 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
|||
builder: (BuildContext context, snapshot) {
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(L10n.of(context)!.oopsSomethingWentWrong +
|
||||
': ' +
|
||||
snapshot.error.toString()),
|
||||
child: Text(
|
||||
'${L10n.of(context)!.oopsSomethingWentWrong}: ${snapshot.error}'),
|
||||
);
|
||||
}
|
||||
if (!snapshot.hasData) {
|
||||
|
|
|
|||
|
|
@ -160,11 +160,11 @@ class _ChatListViewBodyState extends State<ChatListViewBody> {
|
|||
child: ListTile(
|
||||
leading: CircleAvatar(
|
||||
radius: Avatar.defaultSize / 2,
|
||||
child: const Icon(Icons.enhanced_encryption_outlined),
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.surfaceVariant,
|
||||
foregroundColor:
|
||||
Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
child: const Icon(Icons.enhanced_encryption_outlined),
|
||||
),
|
||||
title: Text(
|
||||
(Matrix.of(context)
|
||||
|
|
@ -402,6 +402,7 @@ class _SpaceRoomListTopBarState extends State<SpaceRoomListTopBar> {
|
|||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: LinkText(
|
||||
text: (widget.controller.activeSpacesEntry as SpaceSpacesEntry)
|
||||
.space
|
||||
|
|
@ -414,7 +415,6 @@ class _SpaceRoomListTopBarState extends State<SpaceRoomListTopBar> {
|
|||
),
|
||||
onLinkTap: (url) => UrlLauncher(context, url).launchUrl(),
|
||||
),
|
||||
padding: const EdgeInsets.all(8),
|
||||
),
|
||||
const Divider(),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import 'package:adaptive_dialog/adaptive_dialog.dart';
|
|||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:pedantic/pedantic.dart';
|
||||
import 'package:vrouter/vrouter.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
|
|
@ -108,7 +107,7 @@ class ChatListItem extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
} else {
|
||||
unawaited(room.sendEvent(Matrix.of(context).shareContent!));
|
||||
room.sendEvent(Matrix.of(context).shareContent!);
|
||||
}
|
||||
Matrix.of(context).shareContent = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ class ChatListView extends StatelessWidget {
|
|||
bottomNavigationBar: const ConnectionStatusHeader(),
|
||||
floatingActionButton: selectMode == SelectMode.normal
|
||||
? KeyBoardShortcuts(
|
||||
child:
|
||||
StartChatFloatingActionButton(controller: controller),
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.controlLeft,
|
||||
LogicalKeyboardKey.keyN
|
||||
|
|
@ -46,6 +44,8 @@ class ChatListView extends StatelessWidget {
|
|||
onKeysPressed: () =>
|
||||
VRouter.of(context).to('/newprivatechat'),
|
||||
helpLabel: L10n.of(context)!.newChat,
|
||||
child:
|
||||
StartChatFloatingActionButton(controller: controller),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -107,23 +107,22 @@ class ClientChooserButton extends StatelessWidget {
|
|||
...List.generate(
|
||||
clientCount,
|
||||
(index) => KeyBoardShortcuts(
|
||||
child: Container(),
|
||||
keysToPress: _buildKeyboardShortcut(index + 1),
|
||||
helpLabel: L10n.of(context)!.switchToAccount(index + 1),
|
||||
onKeysPressed: () => _handleKeyboardShortcut(matrix, index),
|
||||
child: Container(),
|
||||
),
|
||||
),
|
||||
KeyBoardShortcuts(
|
||||
child: Container(),
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.controlLeft,
|
||||
LogicalKeyboardKey.tab
|
||||
},
|
||||
helpLabel: L10n.of(context)!.nextAccount,
|
||||
onKeysPressed: () => _nextAccount(matrix),
|
||||
child: Container(),
|
||||
),
|
||||
KeyBoardShortcuts(
|
||||
child: Container(),
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.controlLeft,
|
||||
LogicalKeyboardKey.shiftLeft,
|
||||
|
|
@ -131,8 +130,11 @@ class ClientChooserButton extends StatelessWidget {
|
|||
},
|
||||
helpLabel: L10n.of(context)!.previousAccount,
|
||||
onKeysPressed: () => _previousAccount(matrix),
|
||||
child: Container(),
|
||||
),
|
||||
PopupMenuButton<Object>(
|
||||
onSelected: _clientSelected,
|
||||
itemBuilder: _bundleMenuItems,
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(99),
|
||||
|
|
@ -144,8 +146,6 @@ class ClientChooserButton extends StatelessWidget {
|
|||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
onSelected: _clientSelected,
|
||||
itemBuilder: _bundleMenuItems,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ class RecommendedRoomListItem extends StatelessWidget {
|
|||
TextSpan(children: [
|
||||
WidgetSpan(
|
||||
child: Tooltip(
|
||||
message: L10n.of(context)!
|
||||
.numberRoomMembers(room.numJoinedMembers),
|
||||
child: const Icon(
|
||||
Icons.people_outlined,
|
||||
size: 20,
|
||||
),
|
||||
message: L10n.of(context)!
|
||||
.numberRoomMembers(room.numJoinedMembers),
|
||||
),
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
baseline: TextBaseline.alphabetic),
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ class SpacesDrawerEntry extends StatelessWidget {
|
|||
final active = controller.activeSpacesEntry == entry.spacesEntry;
|
||||
final leading = room == null
|
||||
? CircleAvatar(
|
||||
child: space.getIcon(active),
|
||||
radius: Avatar.defaultSize / 2,
|
||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||
foregroundColor: Theme.of(context).colorScheme.onSecondary,
|
||||
child: space.getIcon(active),
|
||||
)
|
||||
: Avatar(
|
||||
mxContent: room.avatar,
|
||||
|
|
|
|||
|
|
@ -133,8 +133,8 @@ class _SpacesHierarchyProposalsState extends State<SpacesHierarchyProposals> {
|
|||
animation: primaryAnimation,
|
||||
secondaryAnimation: secondaryAnimation,
|
||||
transitionType: SharedAxisTransitionType.scaled,
|
||||
child: child,
|
||||
fillColor: Colors.transparent,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
layoutBuilder: (children) => Stack(
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ class StartChatFloatingActionButton extends StatelessWidget {
|
|||
animation: primaryAnimation,
|
||||
secondaryAnimation: secondaryAnimation,
|
||||
transitionType: SharedAxisTransitionType.horizontal,
|
||||
child: child,
|
||||
fillColor: Colors.transparent,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
layoutBuilder: (children) => Stack(
|
||||
|
|
|
|||
|
|
@ -131,8 +131,8 @@ class ConnectPageController extends State<ConnectPage> {
|
|||
|
||||
void ssoLoginAction(String id) async {
|
||||
final redirectUrl = kIsWeb
|
||||
? html.window.origin! + '/web/auth.html'
|
||||
: AppConfig.appOpenUrlScheme.toLowerCase() + '://login';
|
||||
? '${html.window.origin!}/web/auth.html'
|
||||
: '${AppConfig.appOpenUrlScheme.toLowerCase()}://login';
|
||||
final url =
|
||||
'${Matrix.of(context).getLoginClient().homeserver?.toString()}/_matrix/client/r0/login/sso/redirect/${Uri.encodeComponent(id)}?redirectUrl=${Uri.encodeQueryComponent(redirectUrl)}';
|
||||
final urlScheme = Uri.parse(redirectUrl).scheme;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_webrtc/flutter_webrtc.dart';
|
||||
import 'package:just_audio/just_audio.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:pedantic/pedantic.dart';
|
||||
import 'package:wakelock/wakelock.dart';
|
||||
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
|
|
@ -121,10 +120,10 @@ class Calling extends StatefulWidget {
|
|||
: super(key: key);
|
||||
|
||||
@override
|
||||
_MyCallingPage createState() => _MyCallingPage();
|
||||
MyCallingPage createState() => MyCallingPage();
|
||||
}
|
||||
|
||||
class _MyCallingPage extends State<Calling> {
|
||||
class MyCallingPage extends State<Calling> {
|
||||
Room? get room => call?.room;
|
||||
|
||||
String get displayName => call?.displayName ?? '';
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ class KeyVerificationDialog extends StatefulWidget {
|
|||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_KeyVerificationPageState createState() => _KeyVerificationPageState();
|
||||
KeyVerificationPageState createState() => KeyVerificationPageState();
|
||||
}
|
||||
|
||||
class _KeyVerificationPageState extends State<KeyVerificationDialog> {
|
||||
class KeyVerificationPageState extends State<KeyVerificationDialog> {
|
||||
void Function()? originalOnUpdate;
|
||||
late final List<dynamic> sasEmoji;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ class QrScannerModal extends StatefulWidget {
|
|||
const QrScannerModal({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_QrScannerModalState createState() => _QrScannerModalState();
|
||||
QrScannerModalState createState() => QrScannerModalState();
|
||||
}
|
||||
|
||||
class _QrScannerModalState extends State<QrScannerModal> {
|
||||
class QrScannerModalState extends State<QrScannerModal> {
|
||||
final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');
|
||||
QRViewController? controller;
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ class StoryPageController extends State<StoryPage> {
|
|||
final tmpDirectory = await getTemporaryDirectory();
|
||||
final fileName =
|
||||
event.content.tryGet<String>('filename') ?? 'unknown_story_video.mp4';
|
||||
final file = File(tmpDirectory.path + '/' + fileName);
|
||||
final file = File('${tmpDirectory.path}/$fileName');
|
||||
await file.writeAsBytes(matrixFile.bytes);
|
||||
if (!mounted) return null;
|
||||
final videoPlayerController =
|
||||
|
|
|
|||
|
|
@ -29,15 +29,14 @@ class UserBottomSheet extends StatefulWidget {
|
|||
class UserBottomSheetController extends State<UserBottomSheet> {
|
||||
void participantAction(String action) async {
|
||||
// ignore: prefer_function_declarations_over_variables
|
||||
final Function _askConfirmation =
|
||||
() async => (await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context)!.areYouSure,
|
||||
okLabel: L10n.of(context)!.yes,
|
||||
cancelLabel: L10n.of(context)!.no,
|
||||
) ==
|
||||
OkCancelResult.ok);
|
||||
final Function askConfirmation = () async => (await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context)!.areYouSure,
|
||||
okLabel: L10n.of(context)!.yes,
|
||||
cancelLabel: L10n.of(context)!.no,
|
||||
) ==
|
||||
OkCancelResult.ok);
|
||||
switch (action) {
|
||||
case 'report':
|
||||
final event = widget.user;
|
||||
|
|
@ -88,7 +87,7 @@ class UserBottomSheetController extends State<UserBottomSheet> {
|
|||
widget.onMention!();
|
||||
break;
|
||||
case 'ban':
|
||||
if (await _askConfirmation()) {
|
||||
if (await askConfirmation()) {
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => widget.user.ban(),
|
||||
|
|
@ -97,7 +96,7 @@ class UserBottomSheetController extends State<UserBottomSheet> {
|
|||
}
|
||||
break;
|
||||
case 'unban':
|
||||
if (await _askConfirmation()) {
|
||||
if (await askConfirmation()) {
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => widget.user.unban(),
|
||||
|
|
@ -106,7 +105,7 @@ class UserBottomSheetController extends State<UserBottomSheet> {
|
|||
}
|
||||
break;
|
||||
case 'kick':
|
||||
if (await _askConfirmation()) {
|
||||
if (await askConfirmation()) {
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => widget.user.kick(),
|
||||
|
|
@ -120,7 +119,7 @@ class UserBottomSheetController extends State<UserBottomSheet> {
|
|||
currentLevel: widget.user.powerLevel,
|
||||
);
|
||||
if (newPermission != null) {
|
||||
if (newPermission == 100 && await _askConfirmation() == false) break;
|
||||
if (newPermission == 100 && await askConfirmation() == false) break;
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => widget.user.setPower(newPermission),
|
||||
|
|
@ -139,7 +138,7 @@ class UserBottomSheetController extends State<UserBottomSheet> {
|
|||
Navigator.of(context, rootNavigator: false).pop();
|
||||
break;
|
||||
case 'ignore':
|
||||
if (await _askConfirmation()) {
|
||||
if (await askConfirmation()) {
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue