Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/java/com/example/cahier/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ class MainActivity : ComponentActivity() {
intent.action = null
intent.data = null
lifecycleScope.launch {
navigateToBrushGraphState.value = true
val repo = repository.get()
val success = repo.importBrushFromUri(uri.toString())
if (success) {
android.util.Log.d("MainActivity", "Import brush SUCCESS")
navigateToBrushGraphState.value = true
repo.postDebug(DisplayText.Resource(com.example.cahier.R.string.bg_msg_brush_loaded_success))
} else {
Comment thread
maxmmitchell marked this conversation as resolved.
android.util.Log.e("MainActivity", "Import brush FAILED")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ fun CahierApp(

LaunchedEffect(navigateToBrushGraph) {
if (navigateToBrushGraph) {
navController.navigate(BrushGraphDestination.route)
if (navController.currentDestination?.route != BrushGraphDestination.route) {
navController.navigate(BrushGraphDestination.route)
}
onNavigateToBrushGraphHandled()
}
}
Expand Down
Loading