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;
|
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>();
|
final jobBox = MyApp.objectBoxStore.box<Job>();
|
||||||
jobBox.put(widget.job);
|
jobBox.put(widget.job);
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class _TourListPageState extends State<TourListPage> with ProducerMixin {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
widget.job.id.toString(),
|
widget.job.externalId.toString(),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
+5
-3
@@ -418,10 +418,12 @@ class _MainState extends State<Main> with SingleTickerProviderStateMixin, Produc
|
|||||||
var removeJobMessage = message.payload as RemoveJobMessage;
|
var removeJobMessage = message.payload as RemoveJobMessage;
|
||||||
|
|
||||||
final box = MyApp.objectBoxStore.box<Job>();
|
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) {
|
if (job != null) {
|
||||||
box.remove(removeJobMessage.id);
|
box.remove(job.id);
|
||||||
|
|
||||||
sendMessage(
|
sendMessage(
|
||||||
routingKey: Constants.messageTopicJobDeleted,
|
routingKey: Constants.messageTopicJobDeleted,
|
||||||
@@ -430,7 +432,7 @@ class _MainState extends State<Main> with SingleTickerProviderStateMixin, Produc
|
|||||||
|
|
||||||
sendMessage(
|
sendMessage(
|
||||||
routingKey: Constants.messageTopicUpdateBadges,
|
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
|
# 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
|
# 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.
|
# 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:
|
environment:
|
||||||
sdk: '>=3.9.0 <4.0.0'
|
sdk: '>=3.9.0 <4.0.0'
|
||||||
|
|||||||
Reference in new issue
Block a user