This commit is contained in:
1 parent
f89ca690c8
commit
96544ca924
22 files changed
+1026
-381
No files matched your search
@@ -12,12 +12,12 @@ class Constants {
|
||||
static const String messageTopicRankingUpdated = "ranking_updated";
|
||||
static const String messageTopicJobReceived = "job_received";
|
||||
static const String messageTopicJobDeleted = "job_deleted";
|
||||
static const String messageTopicRemoveJob = "remove_job";
|
||||
static const String messageTopicUpdateBadges = "update_badges";
|
||||
static const String messageTopicMessageReceived = "message_received";
|
||||
static const String messageTopicPushContentView = "push_content_view";
|
||||
static const String messageTopicPopContentView = "pop_content_view";
|
||||
static const String messageTopicReplaceContentView = "replace_content_view";
|
||||
static const String messageTopicHideRightButton = "hide_right_button";
|
||||
static const String messageTopicPublishPayload = "publish_payload_message";
|
||||
static const String messageTopicConnectClient = "connect_client";
|
||||
static const String messageTopicDisconnectClient = "disconnect_client";
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
class RemoveJobMessage {
|
||||
final int id;
|
||||
|
||||
RemoveJobMessage({required this.id});
|
||||
}
|
||||
@@ -332,14 +332,11 @@ class MqttCore {
|
||||
void _jobDeleteReceived(payloadData) async {
|
||||
var jobDelMessage = JobDelMessage.fromJson(payloadData);
|
||||
|
||||
var foundJobs = await MyApp.isarInstance.jobs.where().filter().idEqualTo(jobDelMessage.id).findAll();
|
||||
if (foundJobs.isNotEmpty) {
|
||||
await MyApp.isarInstance.writeTxn(() async {
|
||||
await MyApp.isarInstance.jobs.delete(jobDelMessage.id);
|
||||
});
|
||||
await MyApp.isarInstance.writeTxn(() async {
|
||||
await MyApp.isarInstance.jobs.where().filter().idEqualTo(jobDelMessage.id).deleteAll();
|
||||
});
|
||||
|
||||
await MessageService().publish<JobDeletedMessage>(Constants.messageTopicJobDeleted, arguments: JobDeletedMessage(id: jobDelMessage.id));
|
||||
}
|
||||
await MessageService().publish<JobDeletedMessage>(Constants.messageTopicJobDeleted, arguments: JobDeletedMessage(id: jobDelMessage.id));
|
||||
}
|
||||
|
||||
void _syncRequestReceived(payloadData) async {
|
||||
|
||||
+1
-1
@@ -374,7 +374,7 @@ String mapTourMode(String mode) {
|
||||
text += "/ Auslieferung";
|
||||
break;
|
||||
|
||||
case "pudel":
|
||||
case "pu/del":
|
||||
text += "/ Abholung/Auslieferung";
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user