devibe changelog, hide "view on osm" for pending nodes that aren't real yet

This commit is contained in:
stopflock
2025-12-02 19:23:20 -06:00
parent 5043ef3e34
commit a0601cd6ae
2 changed files with 15 additions and 10 deletions
+12 -6
View File
@@ -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,