From 4ab8d11f920b630174dac9e3b5f5e316cab1712f Mon Sep 17 00:00:00 2001 From: Scarriffle Date: Wed, 29 Jul 2026 11:43:31 +0200 Subject: [PATCH] iOS: Menge-je-Lagerort-Sheet an den Abschnitt haengen (Flackern behoben) Das Hinzufuegen/Umlagern/Entfernen-Sheet hing an der umschliessenden Group; bei manchen iOS-Versionen ging es dadurch kurz auf und sofort wieder zu. Jetzt am Abschnitt selbst (wie bei den Einzelstuecken), was stabil praesentiert. Co-Authored-By: Claude Opus 4.8 --- ios/Sources/ObjectStockView.swift | 32 ++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/ios/Sources/ObjectStockView.swift b/ios/Sources/ObjectStockView.swift index a6d73e6..910eb94 100644 --- a/ios/Sources/ObjectStockView.swift +++ b/ios/Sources/ObjectStockView.swift @@ -63,6 +63,23 @@ struct ObjectStockSection: View { .buttonStyle(.borderless) .font(.callout) } + // Sheet an den Abschnitt hängen (nicht an die Group) – sonst ging das + // Fenster bei manchen iOS-Versionen kurz auf und sofort wieder zu. + .sheet(item: $sheet) { welche in + NavigationStack { + switch welche { + case .add: + ObjectAddSheet(product: product, locations: locations, einheit: einheit, + perform: { await afterAction() }) + case .relocate(let from): + ObjectRelocateSheet(product: product, locations: locations, initialFrom: from, + perform: { await afterAction() }) + case .remove(let loc): + ObjectRemoveSheet(product: product, locations: locations, einheit: einheit, + initialLoc: loc, perform: { await afterAction() }) + } + } + } if let removals, !removals.stats.isEmpty { Section("Bereits entnommen") { @@ -73,21 +90,6 @@ struct ObjectStockSection: View { } } } - .sheet(item: $sheet) { welche in - NavigationStack { - switch welche { - case .add: - ObjectAddSheet(product: product, locations: locations, einheit: einheit, - perform: { await afterAction() }) - case .relocate(let from): - ObjectRelocateSheet(product: product, locations: locations, initialFrom: from, - perform: { await afterAction() }) - case .remove(let loc): - ObjectRemoveSheet(product: product, locations: locations, einheit: einheit, - initialLoc: loc, perform: { await afterAction() }) - } - } - } .task(id: product.id) { await loadRemovals() } .onChange(of: lots) { _ in Task { await loadRemovals() } } }