auto-open tags sheet for submissions (pending testing/feedback)

This commit is contained in:
stopflock
2026-07-26 03:46:00 -05:00
parent 8148ad55c2
commit 837f59bfde
5 changed files with 57 additions and 7 deletions
+18
View File
@@ -8,6 +8,8 @@ import '../app_state.dart';
import '../dev_config.dart';
import '../widgets/map_view.dart';
import '../services/localization_service.dart';
import '../services/map_data_provider.dart';
import '../widgets/node_tag_sheet.dart';
import '../widgets/download_area_dialog.dart';
@@ -455,6 +457,22 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
});
}
// Auto-focus a node's details sheet right after it was submitted/edited/deleted,
// behind kAutoOpenNodeSheetAfterSubmit (pending A/B testing/team feedback).
if (kAutoOpenNodeSheetAfterSubmit) {
final focusNodeId = appState.consumePendingFocusNodeId();
if (focusNodeId != null && !_sheetCoordinator.hasActiveNodeSheet) {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted) return;
final node = MapDataProvider().getNodeById(focusNodeId);
if (node != null) {
openNodeTagSheet(node);
}
});
}
}
// Pass the active sheet height directly to the map
final activeSheetHeight = _sheetCoordinator.activeSheetHeight;