From 62cf70e36e65efb21eda50e64fa698e46a62d28c Mon Sep 17 00:00:00 2001 From: stopflock Date: Tue, 21 Oct 2025 15:33:51 -0500 Subject: [PATCH] fix swiping away add/edit sheets --- lib/screens/home_screen.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index a61dcc2..919e692 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -130,6 +130,13 @@ class _HomeScreenState extends State with TickerProviderStateMixin { setState(() { _addSheetHeight = 0.0; }); + + // Handle dismissal by canceling session if still active + final appState = context.read(); + if (appState.session != null) { + debugPrint('[HomeScreen] AddNodeSheet dismissed - canceling session'); + appState.cancelSession(); + } }); } @@ -180,6 +187,13 @@ class _HomeScreenState extends State with TickerProviderStateMixin { _editSheetHeight = 0.0; _transitioningToEdit = false; }); + + // Handle dismissal by canceling edit session if still active + final appState = context.read(); + if (appState.editSession != null) { + debugPrint('[HomeScreen] EditNodeSheet dismissed - canceling edit session'); + appState.cancelEditSession(); + } }); }); }