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

Commit ef6a74fe authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

fix: missing navigation parameter, on previous sentry fix

parent 66f6be29
Loading
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -17,18 +17,11 @@

package foundation.e.advancedprivacy.common.extensions

import android.os.Bundle
import androidx.navigation.NavController
import androidx.navigation.NavDirections

fun NavController.safeNavigate(direction: NavDirections) {
    currentDestination?.getAction(direction.actionId)?.run {
        navigate(direction.actionId)
    }
}

fun NavController.safeNavigateWithArgs(direction: NavDirections, bundle: Bundle?) {
    currentDestination?.getAction(direction.actionId)?.run {
        navigate(direction.actionId, bundle)
        navigate(direction)
    }
}