feat: Enhance emote experience

This commit is contained in:
Sorunome
2020-10-03 12:31:29 +02:00
parent 090795fa77
commit cafd639c24
8 changed files with 252 additions and 70 deletions

View File

@ -237,22 +237,10 @@ class InputBar extends StatelessWidget {
}
if (insertText.isNotEmpty && startText.isNotEmpty) {
controller.text = startText + afterText;
if (startText == insertText) {
// stupid fix for now
FocusScope.of(context).requestFocus(FocusNode());
Future.delayed(Duration(milliseconds: 1)).then((res) {
focusNode.requestFocus();
controller.selection = TextSelection(
baseOffset: startText.length,
extentOffset: startText.length,
);
});
} else {
controller.selection = TextSelection(
baseOffset: startText.length,
extentOffset: startText.length,
);
}
controller.selection = TextSelection(
baseOffset: startText.length,
extentOffset: startText.length,
);
}
}