Job-Identifikation auf externalId umstellen und Tour-State persistieren
- Job-Löschung und -Anzeige nutzen externalId statt interner id - RefreshBadgesMessage korrekt instanziieren - Tour-State beim Abschluss in Job.tours zurückschreiben und persistieren - Version auf 352 erhöht Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
b94e8f252a
commit
10b3a647e7
4 files changed
+14
-5
No files matched your search
@@ -564,6 +564,13 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
|
||||
widget.tour.state = Constants.stateFinishedNotConfirmed;
|
||||
|
||||
final updatedTours = widget.job.tours;
|
||||
final tourIdx = updatedTours.indexWhere((t) => t.id == widget.tour.id);
|
||||
if (tourIdx >= 0) {
|
||||
updatedTours[tourIdx] = widget.tour;
|
||||
widget.job.tours = updatedTours;
|
||||
}
|
||||
|
||||
final jobBox = MyApp.objectBoxStore.box<Job>();
|
||||
jobBox.put(widget.job);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _TourListPageState extends State<TourListPage> with ProducerMixin {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
widget.job.id.toString(),
|
||||
widget.job.externalId.toString(),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
],
|
||||
|
||||
+5
-3
@@ -418,10 +418,12 @@ class _MainState extends State<Main> with SingleTickerProviderStateMixin, Produc
|
||||
var removeJobMessage = message.payload as RemoveJobMessage;
|
||||
|
||||
final box = MyApp.objectBoxStore.box<Job>();
|
||||
var job = box.get(removeJobMessage.id);
|
||||
final query = box.query(Job_.externalId.equals(removeJobMessage.id)).build();
|
||||
final job = query.findFirst();
|
||||
query.close();
|
||||
|
||||
if (job != null) {
|
||||
box.remove(removeJobMessage.id);
|
||||
box.remove(job.id);
|
||||
|
||||
sendMessage(
|
||||
routingKey: Constants.messageTopicJobDeleted,
|
||||
@@ -430,7 +432,7 @@ class _MainState extends State<Main> with SingleTickerProviderStateMixin, Produc
|
||||
|
||||
sendMessage(
|
||||
routingKey: Constants.messageTopicUpdateBadges,
|
||||
payload: RefreshBadgesMessage,
|
||||
payload: RefreshBadgesMessage(),
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 349.0.0+349
|
||||
version: 352.0.0+352
|
||||
|
||||
environment:
|
||||
sdk: '>=3.9.0 <4.0.0'
|
||||
|
||||
Reference in new issue
Block a user