Fehlerkorrekturen und Erweiterungen

This commit is contained in:
Sven committed 2025-02-24 09:21:29 +01:00
1 parent 3fd8b0f9d4
commit 777876bc8d
8 files changed
+70 -45

No files matched your search

+15 -11
View File
@@ -36,6 +36,8 @@ Future<void> main() async {
runZonedGuarded(() async {
WidgetsFlutterBinding.ensureInitialized();
await Util.init();
MQClient.initialize();
MQClient.instance.declareQueue(Constants.messageTopicRemoveJob);
MQClient.instance.declareQueue(Constants.messageTopicPublishPayload);
@@ -349,19 +351,21 @@ class _MainState extends State<Main> with SingleTickerProviderStateMixin, Produc
var job = await MyApp.isarInstance.jobs.where().filter().idEqualTo(removeJobMessage.id).findFirst();
await MyApp.isarInstance.writeTxn(() async {
await MyApp.isarInstance.jobs.where().filter().idEqualTo(removeJobMessage.id).deleteAll();
});
if (job != null) {
await MyApp.isarInstance.writeTxn(() async {
await MyApp.isarInstance.jobs.where().filter().idEqualTo(removeJobMessage.id).deleteAll();
});
sendMessage(
routingKey: Constants.messageTopicJobDeleted,
payload: JobDeletedMessage(job: job!),
);
sendMessage(
routingKey: Constants.messageTopicJobDeleted,
payload: JobDeletedMessage(job: job!),
);
sendMessage(
routingKey: Constants.messageTopicUpdateBadges,
payload: RefreshBadgesMessage,
);
sendMessage(
routingKey: Constants.messageTopicUpdateBadges,
payload: RefreshBadgesMessage,
);
}
},
);