-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove deprecated accompanist-navigation dependency
- Loading branch information
Showing
7 changed files
with
58 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 13 additions & 12 deletions
25
app/src/beta/kotlin/com/wire/android/navigation/TrackingNavController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
package com.wire.android.navigation | ||
|
||
import androidx.compose.animation.ExperimentalAnimationApi | ||
import androidx.compose.runtime.Composable | ||
import androidx.navigation.NavDestination | ||
import androidx.navigation.compose.rememberNavController | ||
import com.datadog.android.compose.ExperimentalTrackingApi | ||
import com.datadog.android.compose.NavigationViewTrackingEffect | ||
import com.datadog.android.rum.tracking.AcceptAllNavDestinations | ||
import com.google.accompanist.navigation.animation.rememberAnimatedNavController | ||
|
||
@OptIn(ExperimentalAnimationApi::class, ExperimentalTrackingApi::class) | ||
@OptIn(ExperimentalTrackingApi::class) | ||
@Composable | ||
fun rememberTrackingAnimatedNavController(nameFromRoute: (String) -> String?) = rememberAnimatedNavController().apply { | ||
NavigationViewTrackingEffect( | ||
navController = this, | ||
trackArguments = true, | ||
destinationPredicate = object : AcceptAllNavDestinations() { | ||
override fun getViewName(component: NavDestination): String? = component.route?.let { nameFromRoute(it) } | ||
} | ||
) | ||
} | ||
fun rememberTrackingAnimatedNavController(nameFromRoute: (String) -> String?) = | ||
rememberNavController().apply { | ||
NavigationViewTrackingEffect( | ||
navController = this, | ||
trackArguments = true, | ||
destinationPredicate = object : AcceptAllNavDestinations() { | ||
override fun getViewName(component: NavDestination): String? = | ||
component.route?.let { nameFromRoute(it) } | ||
} | ||
) | ||
} |
25 changes: 13 additions & 12 deletions
25
app/src/dev/kotlin/com/wire/android/navigation/TrackingNavController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
package com.wire.android.navigation | ||
|
||
import androidx.compose.animation.ExperimentalAnimationApi | ||
import androidx.compose.runtime.Composable | ||
import androidx.navigation.NavDestination | ||
import androidx.navigation.compose.rememberNavController | ||
import com.datadog.android.compose.ExperimentalTrackingApi | ||
import com.datadog.android.compose.NavigationViewTrackingEffect | ||
import com.datadog.android.rum.tracking.AcceptAllNavDestinations | ||
import com.google.accompanist.navigation.animation.rememberAnimatedNavController | ||
|
||
@OptIn(ExperimentalAnimationApi::class, ExperimentalTrackingApi::class) | ||
@OptIn(ExperimentalTrackingApi::class) | ||
@Composable | ||
fun rememberTrackingAnimatedNavController(nameFromRoute: (String) -> String?) = rememberAnimatedNavController().apply { | ||
NavigationViewTrackingEffect( | ||
navController = this, | ||
trackArguments = true, | ||
destinationPredicate = object : AcceptAllNavDestinations() { | ||
override fun getViewName(component: NavDestination): String? = component.route?.let { nameFromRoute(it) } | ||
} | ||
) | ||
} | ||
fun rememberTrackingAnimatedNavController(nameFromRoute: (String) -> String?) = | ||
rememberNavController().apply { | ||
NavigationViewTrackingEffect( | ||
navController = this, | ||
trackArguments = true, | ||
destinationPredicate = object : AcceptAllNavDestinations() { | ||
override fun getViewName(component: NavDestination): String? = | ||
component.route?.let { nameFromRoute(it) } | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
app/src/prod/kotlin/com/wire/android/navigation/TrackingNavController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
package com.wire.android.navigation | ||
|
||
import androidx.compose.animation.ExperimentalAnimationApi | ||
import androidx.compose.runtime.Composable | ||
import com.google.accompanist.navigation.animation.rememberAnimatedNavController | ||
import androidx.navigation.compose.rememberNavController | ||
|
||
@OptIn(ExperimentalAnimationApi::class) | ||
@Composable | ||
fun rememberTrackingAnimatedNavController(nameFromRoute: (String) -> String?) = rememberAnimatedNavController() | ||
fun rememberTrackingAnimatedNavController(nameFromRoute: (String) -> String?) = | ||
rememberNavController() |
25 changes: 13 additions & 12 deletions
25
app/src/staging/kotlin/com/wire/android/navigation/TrackingNavController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
package com.wire.android.navigation | ||
|
||
import androidx.compose.animation.ExperimentalAnimationApi | ||
import androidx.compose.runtime.Composable | ||
import androidx.navigation.NavDestination | ||
import com.datadog.android.compose.ExperimentalTrackingApi | ||
import com.datadog.android.compose.NavigationViewTrackingEffect | ||
import com.datadog.android.rum.tracking.AcceptAllNavDestinations | ||
import com.google.accompanist.navigation.animation.rememberAnimatedNavController | ||
import androidx.navigation.compose.rememberNavController | ||
|
||
@OptIn(ExperimentalAnimationApi::class, ExperimentalTrackingApi::class) | ||
@OptIn(ExperimentalTrackingApi::class) | ||
@Composable | ||
fun rememberTrackingAnimatedNavController(nameFromRoute: (String) -> String?) = rememberAnimatedNavController().apply { | ||
NavigationViewTrackingEffect( | ||
navController = this, | ||
trackArguments = true, | ||
destinationPredicate = object : AcceptAllNavDestinations() { | ||
override fun getViewName(component: NavDestination): String? = component.route?.let { nameFromRoute(it) } | ||
} | ||
) | ||
} | ||
fun rememberTrackingAnimatedNavController(nameFromRoute: (String) -> String?) = | ||
rememberNavController().apply { | ||
NavigationViewTrackingEffect( | ||
navController = this, | ||
trackArguments = true, | ||
destinationPredicate = object : AcceptAllNavDestinations() { | ||
override fun getViewName(component: NavDestination): String? = | ||
component.route?.let { nameFromRoute(it) } | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters