This commit is contained in:
parent
eda9cc0d10
commit
a88c08f610
|
|
@ -270,11 +270,10 @@ class ChatController extends State<ChatPageWithRoom>
|
||||||
showAdaptiveDialog(
|
showAdaptiveDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (c) => SendFileDialog(
|
builder: (c) => SendFileDialog(
|
||||||
files: files,
|
files: files,
|
||||||
room: room,
|
room: room,
|
||||||
outerContext: context,
|
outerContext: context,
|
||||||
replyEvent: replyEvent
|
replyEvent: replyEvent),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -501,6 +500,10 @@ class ChatController extends State<ChatPageWithRoom>
|
||||||
|
|
||||||
Future<void> send() async {
|
Future<void> send() async {
|
||||||
if (sendController.text.trim().isEmpty) return;
|
if (sendController.text.trim().isEmpty) return;
|
||||||
|
if (inputFocus.hasFocus) {
|
||||||
|
inputFocus.unfocus();
|
||||||
|
}
|
||||||
|
FocusScope.of(context).requestFocus(inputFocus);
|
||||||
_storeInputTimeoutTimer?.cancel();
|
_storeInputTimeoutTimer?.cancel();
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs = await SharedPreferences.getInstance();
|
||||||
prefs.remove('draft_$roomId');
|
prefs.remove('draft_$roomId');
|
||||||
|
|
@ -558,7 +561,7 @@ class ChatController extends State<ChatPageWithRoom>
|
||||||
replyEvent: replyEvent,
|
replyEvent: replyEvent,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
replyEvent = null;
|
replyEvent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendImageFromClipBoard(Uint8List? image) async {
|
void sendImageFromClipBoard(Uint8List? image) async {
|
||||||
|
|
@ -742,11 +745,11 @@ class ChatController extends State<ChatPageWithRoom>
|
||||||
}
|
}
|
||||||
|
|
||||||
Navigator.of(context).push(new MaterialPageRoute(
|
Navigator.of(context).push(new MaterialPageRoute(
|
||||||
builder: (BuildContext ctx) {
|
builder: (BuildContext ctx) {
|
||||||
return RecoveredEventDialog(event: recoveredEvent!, timeline: timeline!);
|
return RecoveredEventDialog(
|
||||||
},
|
event: recoveredEvent!, timeline: timeline!);
|
||||||
fullscreenDialog: true
|
},
|
||||||
));
|
fullscreenDialog: true));
|
||||||
}
|
}
|
||||||
|
|
||||||
void reportEventAction() async {
|
void reportEventAction() async {
|
||||||
|
|
@ -1155,8 +1158,6 @@ class ChatController extends State<ChatPageWithRoom>
|
||||||
|
|
||||||
void onInputBarSubmitted(_) {
|
void onInputBarSubmitted(_) {
|
||||||
send();
|
send();
|
||||||
FocusScope.of(context).unfocus();
|
|
||||||
FocusScope.of(context).requestFocus(inputFocus);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onAddPopupMenuButtonSelected(String choice) {
|
void onAddPopupMenuButtonSelected(String choice) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue