mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-02-13 09:12:56 +00:00
Compare commits
4 Commits
v1.6.1-bet
...
v1.6.1-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cda350f22 | ||
|
|
89f8ad2e0a | ||
|
|
cc1a335a49 | ||
|
|
473d65c83e |
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"1.6.1": {
|
||||
"content": [
|
||||
"• IMPROVED: Navigation route calculation timeout increased from 15 to 30 seconds - better success rate for complex routes in dense areas",
|
||||
"• TECHNICAL: Route timeout is now configurable in dev_config for easier future adjustments"
|
||||
"• Navigation route calculation timeout increased from 15 to 30 seconds - better success rate for complex routes in dense areas",
|
||||
"• Route timeout is now configurable in dev_config for easier future adjustments",
|
||||
"• Fix accidentally opening edit sheet on node tap instead of tags sheet"
|
||||
]
|
||||
},
|
||||
"1.6.0": {
|
||||
|
||||
@@ -38,8 +38,7 @@ class MapInteractionHandler {
|
||||
debugPrint('[MapInteractionHandler] Could not center map on node: $e');
|
||||
}
|
||||
|
||||
// Start edit session for the node
|
||||
appState.startEditSession(node);
|
||||
// Note: Edit session is NOT started here - only when user explicitly presses Edit button
|
||||
}
|
||||
|
||||
/// Handle suspected location tap with selection and highlighting
|
||||
|
||||
@@ -80,12 +80,12 @@ class NavigationCoordinator {
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
if (appState.isInRouteMode) {
|
||||
// Show route overview (zoom out to show full route)
|
||||
if (appState.showRouteButton) {
|
||||
// Route button - show route overview and zoom to show route
|
||||
appState.showRouteOverview();
|
||||
zoomToShowFullRoute(appState: appState, mapController: mapController);
|
||||
} else {
|
||||
// Not in route - handle based on current state
|
||||
// Search button - toggle search mode
|
||||
if (appState.isInSearchMode) {
|
||||
// Exit search mode
|
||||
appState.clearSearchResults();
|
||||
|
||||
@@ -385,14 +385,20 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
_sheetCoordinator.setEditSheetShown(false);
|
||||
}
|
||||
|
||||
// Auto-open navigation sheet when needed - simplified logic (only in dev mode)
|
||||
// Auto-open navigation sheet when needed - only when online and in nav features mode
|
||||
if (kEnableNavigationFeatures) {
|
||||
final shouldShowNavSheet = appState.isInSearchMode || appState.showingOverview;
|
||||
final shouldShowNavSheet = !appState.offlineMode && (appState.isInSearchMode || appState.showingOverview);
|
||||
if (shouldShowNavSheet && !_sheetCoordinator.navigationSheetShown) {
|
||||
_sheetCoordinator.setNavigationSheetShown(true);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => _openNavigationSheet());
|
||||
} else if (!shouldShowNavSheet) {
|
||||
} else if (!shouldShowNavSheet && _sheetCoordinator.navigationSheetShown) {
|
||||
_sheetCoordinator.setNavigationSheetShown(false);
|
||||
// When sheet should close (including going offline), clean up navigation state
|
||||
if (appState.offlineMode) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
appState.cancelNavigation();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,8 +497,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
}
|
||||
},
|
||||
),
|
||||
// Search bar (slides in when in search mode) - only online since search doesn't work offline
|
||||
if (!appState.offlineMode && appState.isInSearchMode)
|
||||
// Search bar (slides in when in search mode)
|
||||
if (appState.isInSearchMode)
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
|
||||
@@ -159,7 +159,7 @@ class MapOverlays extends StatelessWidget {
|
||||
children: [
|
||||
// Search/Navigation button - show search button always, show route button only in dev mode when online
|
||||
if (onSearchPressed != null) ...[
|
||||
if (appState.showSearchButton || (enableNavigationFeatures(offlineMode: appState.offlineMode) && appState.showRouteButton)) ...[
|
||||
if ((!appState.offlineMode && appState.showSearchButton) || appState.showRouteButton) ...[
|
||||
FloatingActionButton(
|
||||
mini: true,
|
||||
heroTag: "search_nav",
|
||||
|
||||
@@ -101,32 +101,30 @@ class NavigationSheet extends StatelessWidget {
|
||||
address: provisionalAddress,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
// Only show routing buttons if navigation features are enabled
|
||||
if (enableNavigationFeatures(offlineMode: appState.offlineMode)) ...[
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ElevatedButton.icon(
|
||||
icon: const Icon(Icons.directions),
|
||||
label: Text(LocalizationService.instance.t('navigation.routeTo')),
|
||||
onPressed: () {
|
||||
appState.startRoutePlanning(thisLocationIsStart: false);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: ElevatedButton.icon(
|
||||
icon: const Icon(Icons.my_location),
|
||||
label: Text(LocalizationService.instance.t('navigation.routeFrom')),
|
||||
onPressed: () {
|
||||
appState.startRoutePlanning(thisLocationIsStart: true);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
// Show routing buttons (sheet only opens when online, so always available)
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ElevatedButton.icon(
|
||||
icon: const Icon(Icons.directions),
|
||||
label: Text(LocalizationService.instance.t('navigation.routeTo')),
|
||||
onPressed: () {
|
||||
appState.startRoutePlanning(thisLocationIsStart: false);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: ElevatedButton.icon(
|
||||
icon: const Icon(Icons.my_location),
|
||||
label: Text(LocalizationService.instance.t('navigation.routeFrom')),
|
||||
onPressed: () {
|
||||
appState.startRoutePlanning(thisLocationIsStart: true);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
// SETTING SECOND POINT: Show both points and select button
|
||||
|
||||
Reference in New Issue
Block a user