Location Status eingebaut

Ranking wieder teilaktivert.
This commit is contained in:
Sven committed 2024-04-10 15:37:27 +02:00
1 parent 276b337b62
commit cfbc0cf765
12 files changed
+566 -862

No files matched your search

+4 -4
View File
@@ -13,7 +13,7 @@ import 'package:stadtbote/content_views/utils/header_info.dart';
import 'package:stadtbote/model/job.dart';
import 'package:stadtbote/model/message.dart';
import 'package:stadtbote/model/session_status.dart';
import 'package:stadtbote/model/status.dart';
import 'package:stadtbote/model/location_status.dart';
import 'package:stadtbote/popups/infos_popup.dart';
import 'package:stadtbote/protocoll_messages/logout_message.dart';
import 'package:stadtbote/tools/message_service.dart';
@@ -265,7 +265,7 @@ class _MainPageState extends State<MainPage> {
widget.sidValueNotifier.value = sessionStatusInfoUpdateMessage.status.sid;
});
MessageService().subscribe<StatusInfoUpdate>(Constants.messageTopicStatusInfoUpdated, this, (statusInfoUpdateMessage) {
MessageService().subscribe<LocationStatusUpdate>(Constants.messageTopicLocationStatusUpdated, this, (statusInfoUpdateMessage) {
_updateHeader();
});
@@ -303,11 +303,11 @@ class _MainPageState extends State<MainPage> {
}
void _updateHeader() async {
var status = await MyApp.isarInstance.status.where().findFirst();
var status = await MyApp.isarInstance.locationStatus.where().findFirst();
var sessionStatus = await MyApp.isarInstance.sessionStatus.where().findFirst();
if (status != null) {
widget._zipValueNotifier.value = '${status.pos.zip} (${status.pos.zipReal})';
widget._zipValueNotifier.value = '${status.zip} (${status.zipReal})';
} else if (sessionStatus != null) {
widget._zipValueNotifier.value = sessionStatus.locZip;
} else {