mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-19 10:39:26 +01:00
fix: Minor bugs
This commit is contained in:
parent
3283a2e1ce
commit
9fbfca6e04
@ -71,12 +71,12 @@ class _PermissionSliderDialogState extends State<PermissionSliderDialog> {
|
|||||||
);
|
);
|
||||||
final buttons = [
|
final buttons = [
|
||||||
AdaptiveFlatButton(
|
AdaptiveFlatButton(
|
||||||
label: L10n.of(context).cancel,
|
label: L10n.of(context).cancel,
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
Navigator.of(context, rootNavigator: false).pop<int>(null),
|
Navigator.of(context, rootNavigator: false).pop<int>(null),
|
||||||
),
|
),
|
||||||
AdaptiveFlatButton(
|
AdaptiveFlatButton(
|
||||||
label: L10n.of(context).confirm,
|
label: L10n.of(context).confirm,
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
Navigator.of(context, rootNavigator: false).pop<int>(_permission),
|
Navigator.of(context, rootNavigator: false).pop<int>(_permission),
|
||||||
),
|
),
|
||||||
|
@ -12,7 +12,6 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
|
|||||||
|
|
||||||
import '../utils/presence_extension.dart';
|
import '../utils/presence_extension.dart';
|
||||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||||
import 'dialogs/key_verification_dialog.dart';
|
|
||||||
|
|
||||||
class UserBottomSheet extends StatelessWidget {
|
class UserBottomSheet extends StatelessWidget {
|
||||||
final User user;
|
final User user;
|
||||||
@ -87,17 +86,10 @@ class UserBottomSheet extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _verifyAction(BuildContext context) async {
|
|
||||||
final client = user.room.client;
|
|
||||||
final req = await client.userDeviceKeys[user.id].startVerification();
|
|
||||||
await KeyVerificationDialog(request: req).show(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final client = user.room.client;
|
final client = user.room.client;
|
||||||
final presence = client.presences[user.id];
|
final presence = client.presences[user.id];
|
||||||
final verificationStatus = client.userDeviceKeys[user.id]?.verified;
|
|
||||||
var items = <PopupMenuEntry<String>>[];
|
var items = <PopupMenuEntry<String>>[];
|
||||||
|
|
||||||
if (onMention != null) {
|
if (onMention != null) {
|
||||||
|
@ -259,17 +259,24 @@ class _ChatListState extends State<ChatList> {
|
|||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.search_outlined),
|
icon: Icon(Icons.search_outlined),
|
||||||
tooltip: L10n.of(context).search,
|
tooltip: L10n.of(context).search,
|
||||||
onPressed: () async {
|
onPressed: Matrix.of(context)
|
||||||
await _scrollController.animateTo(
|
.client
|
||||||
_scrollController.position.minScrollExtent,
|
.rooms
|
||||||
duration: Duration(milliseconds: 200),
|
.isEmpty
|
||||||
curve: Curves.ease,
|
? null
|
||||||
);
|
: () async {
|
||||||
WidgetsBinding.instance.addPostFrameCallback(
|
await _scrollController.animateTo(
|
||||||
(_) => _searchFieldKey.currentState
|
_scrollController
|
||||||
.requestFocus(),
|
.position.minScrollExtent,
|
||||||
);
|
duration: Duration(milliseconds: 200),
|
||||||
},
|
curve: Curves.ease,
|
||||||
|
);
|
||||||
|
WidgetsBinding.instance
|
||||||
|
.addPostFrameCallback(
|
||||||
|
(_) => _searchFieldKey.currentState
|
||||||
|
.requestFocus(),
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
title: Text(selectMode == SelectMode.share
|
title: Text(selectMode == SelectMode.share
|
||||||
|
Loading…
Reference in New Issue
Block a user