Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3b9106b authored by mitulsheth's avatar mitulsheth
Browse files

fix(code-review): This itinerary is too long

- Resolved code review messages
parent d57bc11c
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -53,8 +53,8 @@ class RouteStateRepository {
        _routeState.value = _routeState.value.copy(isLoading = false, error = error)
    }

    fun setDirectionError(directionError: DirectionUiError?) {
        _routeState.value = _routeState.value.copy(isLoading = false, directionError = directionError, error = null)
    fun setDirectionError(directionUiError: DirectionUiError?) {
        _routeState.value = _routeState.value.copy(isLoading = false, directionError = directionUiError, error = null)
    }

    fun clear() {
+18 −0
Original line number Diff line number Diff line
/*
 *     Cardinal Maps
 *     Copyright (C) 2025 Cardinal Maps Authors
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
package earth.maps.cardinal.ui.directions

import uniffi.ferrostar.ParsingException

sealed class DirectionUiError {
+1 −1
Original line number Diff line number Diff line
@@ -500,7 +500,7 @@ private fun NonTransitRouteResults(
            val message = when (routeState.directionError) {
                DirectionUiError.DistanceExceeded -> stringResource(string.long_itinerary_error_message)
                is DirectionUiError.Unknown -> routeState.directionError.message?.let {
                    stringResource(string.directions_error, routeState.directionError.message)
                    stringResource(string.directions_error, it)
                } ?: stringResource(string.unknown_error)
            }
            Text(