Erweiterungen

This commit is contained in:
Sven committed 2024-03-06 11:44:23 +01:00
1 parent 8c906d6bc2
commit eb2ffab6cd
5 files changed
+13 -5

No files matched your search

+4
View File
@@ -213,6 +213,8 @@ class _TaskListPageState extends State<TaskListPage> {
}
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<TaskListPage> {
}
_finishTaskProcessing(TaskInfo taskInfo) async {
Util.logInfo('Task ${taskInfo.task.sId} finished');
await MyApp.isarInstance.writeTxn(() async {
await MyApp.isarInstance.taskInfos.put(taskInfo);
});
+1 -1
View File
@@ -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";
+2 -2
View File
@@ -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.")
+1 -1
View File
@@ -168,7 +168,7 @@ class MqttCore {
Util.logInfo('message received');
Util.logInfo('topic: $topic');
Util.logInfo('payload: $payload');
Util.logInfo('message: $payload');
Map<String, dynamic> messageData = jsonDecode(payload);
+5 -1
View File
@@ -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: <Widget>[