More small fixes / remove extra logging

This commit is contained in:
Sarah Jamie Lewis 2023-05-18 14:40:55 -07:00 committed by Gitea
parent ea22864341
commit a2a09966e6
4 changed files with 5 additions and 6 deletions

View File

@ -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":

View File

@ -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();
}

View File

@ -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(

View File

@ -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;
}