From a0601cd6ae562a2c97d1943184de5d7a474aba35 Mon Sep 17 00:00:00 2001 From: stopflock Date: Tue, 2 Dec 2025 19:23:20 -0600 Subject: [PATCH] devibe changelog, hide "view on osm" for pending nodes that aren't real yet --- assets/changelog.json | 7 +++---- lib/widgets/node_tag_sheet.dart | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/assets/changelog.json b/assets/changelog.json index 5e5ec64..fbe0663 100644 --- a/assets/changelog.json +++ b/assets/changelog.json @@ -5,10 +5,9 @@ "• Download area max zoom level is now limited to the currently selected tile provider's maximum zoom level", "• Navigation route planning now prevents selecting start and end locations that are too close together", "• Cleaned up internal 'maxCameras' references to use 'maxNodes' terminology consistently", - "• FIXED: Proximity warnings now consider pending nodes - prevents submitting multiple nodes at the same location without warning", - "• FIXED: Deleting queue items now only removes that specific item, not all pending nodes at the same location", - "• FIXED: Pending nodes now reappear on the map after app restart - queue items repopulate the visual cache on startup", - "• NEW: Upload queue screen shows when processing is paused (offline mode or manually paused)" + "• Proximity warnings now consider pending nodes - prevents submitting multiple nodes at the same location without warning", + "• Pending nodes now reappear on the map after app restart - queue items repopulate the visual cache on startup", + "• Upload queue screen shows when processing is paused (offline mode or manually paused)" ] }, "1.5.3": { diff --git a/lib/widgets/node_tag_sheet.dart b/lib/widgets/node_tag_sheet.dart index 4d607b0..80b0994 100644 --- a/lib/widgets/node_tag_sheet.dart +++ b/lib/widgets/node_tag_sheet.dart @@ -36,6 +36,10 @@ class NodeTagSheet extends StatelessWidget { (!node.tags.containsKey('_pending_deletion') || node.tags['_pending_deletion'] != 'true'); + // Check if this is a real OSM node (not pending) - for "View on OSM" button + final isRealOSMNode = !node.tags.containsKey('_pending_upload') && + node.id > 0; // Real OSM nodes have positive IDs + void _openEditSheet() { // Check if node limit is active and warn user if (isNodeLimitActive) { @@ -195,12 +199,14 @@ class NodeTagSheet extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - TextButton.icon( - onPressed: () => _viewOnOSM(), - icon: const Icon(Icons.open_in_new, size: 16), - label: Text(locService.t('actions.viewOnOSM')), - ), - const SizedBox(width: 8), + if (isRealOSMNode) ...[ + TextButton.icon( + onPressed: () => _viewOnOSM(), + icon: const Icon(Icons.open_in_new, size: 16), + label: Text(locService.t('actions.viewOnOSM')), + ), + const SizedBox(width: 8), + ], if (isEditable) ...[ OutlinedButton.icon( onPressed: _openAdvancedEdit,