forked from cwtch.im/cwtch-ui
More small fixes / remove extra logging
This commit is contained in:
parent
7ded7a2d49
commit
d4e9ed51dd
|
@ -59,8 +59,6 @@ class CwtchNotifier {
|
|||
}
|
||||
|
||||
void handleMessage(String type, dynamic data) {
|
||||
EnvironmentConfig.debugLog("Handing Message $type ${data.toString()}");
|
||||
|
||||
//EnvironmentConfig.debugLog("NewEvent $type $data");
|
||||
switch (type) {
|
||||
case "CwtchStarted":
|
||||
|
|
|
@ -267,7 +267,7 @@ class ContactInfoState extends ChangeNotifier {
|
|||
bool canSend() {
|
||||
if (this.isGroup == true) {
|
||||
// We now have an out of sync warning so we will mark these as online...
|
||||
return this.status == "Synced";
|
||||
return this.status == "Synced" && this.antispamTickets > 0;
|
||||
} else {
|
||||
return this.isOnline();
|
||||
}
|
||||
|
|
|
@ -129,7 +129,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
return DropdownMenuItem<String>(
|
||||
value: value.toString(),
|
||||
child: Text(
|
||||
key: Key("dropdownLanguage" + value.languageCode), getLanguageFull(context, value.languageCode, value.countryCode), style: settings.scaleFonts(defaultDropDownMenuItemTextStyle)),
|
||||
key: Key("dropdownLanguage" + value.languageCode),
|
||||
getLanguageFull(context, value.languageCode, value.countryCode),
|
||||
style: settings.scaleFonts(defaultDropDownMenuItemTextStyle)),
|
||||
);
|
||||
}).toList()))),
|
||||
SwitchListTile(
|
||||
|
|
|
@ -319,9 +319,8 @@ class _MessageViewState extends State<MessageView> {
|
|||
void _sendMessage([String? ignoredParam]) {
|
||||
// Do this after we trim to preserve enter-behaviour...
|
||||
bool cannotSend = Provider.of<ContactInfoState>(context, listen: false).canSend() == false;
|
||||
bool performingAntiSpam = Provider.of<ContactInfoState>(context, listen: false).antispamTickets == 0;
|
||||
bool isGroup = Provider.of<ContactInfoState>(context, listen: false).isGroup;
|
||||
if (cannotSend || (isGroup && performingAntiSpam)) {
|
||||
if (cannotSend) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue