forked from cwtch.im/cwtch-ui
Improve Message Draft Clearing Logic
This commit is contained in:
parent
d75420e72f
commit
9d963b3134
|
@ -101,8 +101,7 @@ class ContactInfoState extends ChangeNotifier {
|
|||
keys = Map<String, GlobalKey<MessageRowState>>();
|
||||
}
|
||||
|
||||
String get nickname => this._nickname + (this._messageDraft.isNotEmpty() ? "*" : "");
|
||||
|
||||
String get nickname => this._nickname + (this._messageDraft.isEmpty() ? "" : "*");
|
||||
String get savePeerHistory => this._savePeerHistory;
|
||||
|
||||
String? get acnCircuit => this._acnCircuit;
|
||||
|
|
|
@ -11,8 +11,8 @@ class MessageDraft extends ChangeNotifier {
|
|||
return MessageDraft();
|
||||
}
|
||||
|
||||
bool isNotEmpty() {
|
||||
return this._messageText != null || this._quotedReference != null;
|
||||
bool isEmpty() {
|
||||
return (this._messageText == null && this._quotedReference == null) || (this._messageText != null && this._messageText!.isEmpty);
|
||||
}
|
||||
|
||||
String? get messageText => _messageText;
|
||||
|
|
Loading…
Reference in New Issue