This commit is contained in:
parent
eda9cc0d10
commit
a88c08f610
|
|
@ -273,8 +273,7 @@ class ChatController extends State<ChatPageWithRoom>
|
||||||
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');
|
||||||
|
|
@ -743,10 +746,10 @@ 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