This commit is contained in:
Sven committed 2024-03-07 12:26:33 +01:00
1 parent d7b49e2b66
commit e003c508f3
5 files changed
+181 -138

No files matched your search

+3 -9
View File
@@ -196,9 +196,7 @@ class MqttCore {
break;
case 'job_del':
if (!kDebugMode) {
_jobDeleteReceived(payloadData);
}
_jobDeleteReceived(payloadData);
break;
case 'sync_request':
@@ -291,12 +289,8 @@ class MqttCore {
}
}
void _jobDeleteReceived(List<dynamic> payloadData) async {
Map<String, dynamic> map = {};
map["jobDel"] = payloadData;
var jobDelMessage = JobDelMessage.fromJson(map);
for(var jobId in jobDelMessage.jobDel) {
void _jobDeleteReceived(payloadData) async {
for(var jobId in payloadData) {
await MyApp.isarInstance.writeTxn(() async {
await MyApp.isarInstance.jobs.delete(jobId);
});
+6 -2
View File
@@ -72,12 +72,16 @@ class Util {
return currentUuid;
}
static _printLongText(String text) {
final pattern = RegExp('.{1,800}'); // 800 is the size of each chunk
pattern.allMatches(text).forEach((match) => debugPrint(match.group(0)));
}
static logInfo(String message) {
debugPrint(message);
_printLongText(message);
}
static logException(String message) {
debugPrint('Exception: $message');
_printLongText(message);
}
static int fastHash(String string) {