diff --git a/lib/content_views/task_list_page.dart b/lib/content_views/task_list_page.dart index f2b8176..4a4fa92 100644 --- a/lib/content_views/task_list_page.dart +++ b/lib/content_views/task_list_page.dart @@ -213,6 +213,8 @@ class _TaskListPageState extends State { } void _processTask(TaskInfo taskInfo) { + Util.logInfo("Process of Task \"${taskInfo.task.sId} started"); + switch(taskInfo.task.type) { case 2: _processSignature(taskInfo); @@ -390,6 +392,8 @@ class _TaskListPageState extends State { } _finishTaskProcessing(TaskInfo taskInfo) async { + Util.logInfo('Task ${taskInfo.task.sId} finished'); + await MyApp.isarInstance.writeTxn(() async { await MyApp.isarInstance.taskInfos.put(taskInfo); }); diff --git a/lib/popups/infos_popup.dart b/lib/popups/infos_popup.dart index d714117..5bcff4a 100644 --- a/lib/popups/infos_popup.dart +++ b/lib/popups/infos_popup.dart @@ -5,7 +5,7 @@ import 'package:stadtbote/tools/mqtt_core.dart'; import 'package:stadtbote/tools/util.dart'; void showInfosPopup(BuildContext context, SessionStatus? status) async { - var text = "Versionsnummer: a208\n"; + var text = "Versionsnummer: a209\n"; text += "Verbindungsstatus: ${MqttCore.instance.connectionState == ConnectionStateEnum.connected ? "Verbunden" : "NICHT verbunden"}\n"; text += "GPS-Status: ${MyApp.currentPosition != null ? MyApp.currentPosition!.timestamp.toString() : "Unbekannt"}\n"; text += "\n"; diff --git a/lib/popups/tasks_popups/signature_popup.dart b/lib/popups/tasks_popups/signature_popup.dart index 6e3f5c0..d0ceff8 100644 --- a/lib/popups/tasks_popups/signature_popup.dart +++ b/lib/popups/tasks_popups/signature_popup.dart @@ -72,9 +72,9 @@ showSignaturePopup(BuildContext context, TaskInfo taskInfo, Function(String?) on ), ), getDefaultButton('Übernehmen', buttonHeight: 50, () => { - Navigator.of(context).pop(), - if (controller.points.length > 50) { + Navigator.of(context).pop(), + onFinished(convertPoints(controller.points)) } else { showAlertDialog(context, "Fehler", "Die Unterschrift ist zu kurz.") diff --git a/lib/tools/mqtt_core.dart b/lib/tools/mqtt_core.dart index 1a8065b..9aff244 100644 --- a/lib/tools/mqtt_core.dart +++ b/lib/tools/mqtt_core.dart @@ -168,7 +168,7 @@ class MqttCore { Util.logInfo('message received'); Util.logInfo('topic: $topic'); - Util.logInfo('payload: $payload'); + Util.logInfo('message: $payload'); Map messageData = jsonDecode(payload); diff --git a/lib/tools/util.dart b/lib/tools/util.dart index 400fc1e..2772345 100644 --- a/lib/tools/util.dart +++ b/lib/tools/util.dart @@ -196,7 +196,11 @@ Widget getDefaultButton(String text, Function() onPressed, {Image? image, double Radius.circular(15), ), ), - onPressed: onPressed, + onPressed: () { + Util.logInfo("Button \"$text\" clicked"); + + onPressed(); + }, child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [