Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TeamPrinterV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aleksandr
TeamPrinterV2
Commits
70de6755
Commit
70de6755
authored
Jul 25, 2024
by
Aleksandr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix dropping current screen with navigation
parent
be3bcf1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
app/src/main/java/com/isidroid/c23/ui/navigation/AppNavHost.kt
+2
-0
core/core/src/main/java/com/isidroid/core/ext/ExtNavigation.kt
+3
-3
No files found.
app/src/main/java/com/isidroid/c23/ui/navigation/AppNavHost.kt
View file @
70de6755
package
com.isidroid.c23.ui.navigation
import
androidx.compose.runtime.Composable
import
androidx.compose.runtime.LaunchedEffect
import
androidx.compose.ui.Modifier
import
androidx.navigation.NavHostController
import
androidx.navigation.NavType
...
...
@@ -15,6 +16,7 @@ import com.isidroid.c23.ui.navigation.destinations.JobDetailsDestination
import
com.isidroid.c23.ui.navigation.destinations.MapScreenDestination
import
com.isidroid.c23.ui.navigation.destinations.PrintJobsScreenDestination
import
com.isidroid.c23.ui.navigation.destinations.RenderScreenDestination
import
timber.log.Timber
@Composable
fun
AppNavHost
(
...
...
core/core/src/main/java/com/isidroid/core/ext/ExtNavigation.kt
View file @
70de6755
...
...
@@ -16,10 +16,10 @@ fun NavController.navigateSingleTopTo(
isInclusive
:
Boolean
=
true
,
popupToRoute
:
String
?
=
null
)
{
navigate
(
route
)
{
val
dropNode
=
if
(
dropCurrent
)
currentDestination
?.
route
else
popupToRoute
val
node
=
dropNode
?.
let
{
graph
.
findNode
(
popupToRoute
)
}
?:
graph
.
findStartDestination
()
val
dropNode
=
if
(
dropCurrent
)
currentDestination
?.
route
else
popupToRoute
val
node
=
dropNode
?.
let
{
graph
.
findNode
(
dropNode
)
}
?:
graph
.
findStartDestination
()
navigate
(
route
)
{
popUpTo
(
node
.
id
)
{
inclusive
=
isInclusive
if
(
isSaveState
!=
null
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment