Merge pull request #4937 from pangeachat/4923-treat-whitespace-only-message-like-empty-message
chore: prevent running IGC on empty message
This commit is contained in:
commit
6795bc698b
2 changed files with 3 additions and 3 deletions
|
|
@ -183,8 +183,8 @@ class Choreographer extends ChangeNotifier {
|
|||
}
|
||||
// update assistance state from no message => not fetched and vice versa
|
||||
if (_lastChecked == null ||
|
||||
_lastChecked!.isEmpty ||
|
||||
textController.text.isEmpty) {
|
||||
_lastChecked!.trim().isEmpty ||
|
||||
textController.text.trim().isEmpty) {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ extension ChoregrapherStateExtension on Choreographer {
|
|||
final isSubscribed =
|
||||
MatrixState.pangeaController.subscriptionController.isSubscribed;
|
||||
if (isSubscribed == false) return AssistanceStateEnum.noSub;
|
||||
if (currentText.isEmpty && itController.sourceText.value == null) {
|
||||
if (currentText.trim().isEmpty && itController.sourceText.value == null) {
|
||||
return AssistanceStateEnum.noMessage;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue