Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
chore(app): change page only if a tag is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaBrighi committed Jun 16, 2023
1 parent f339fdc commit 9376885
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ class MainActivity : ComponentActivity() {
intent.getParcelableExtra(NfcAdapter.EXTRA_TAG)
}
tag?.let { detectTagData(it) }
.let {
?.let {
if (navController.currentDestination?.route != MainNavigation.login &&
navController.currentDestination?.route != MainNavigation.createUser
) {
navController.navigate(MainNavigation.schoolSupply(it?.rfidId)) { launchSingleTop = true }
navController.navigate(MainNavigation.schoolSupply(it.rfidId)) { launchSingleTop = true }
}
}
}
Expand Down

0 comments on commit 9376885

Please sign in to comment.