Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
LoginScreen: Drop non-required navigation logic
Browse files Browse the repository at this point in the history
Signed-off-by: Aayush Gupta <[email protected]>
  • Loading branch information
theimpulson committed Aug 29, 2023
1 parent 623758b commit 53c901f
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions app/src/main/java/io/aayush/relabs/ui/screens/login/LoginScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
Expand All @@ -40,16 +39,6 @@ fun LoginScreen(
navHostController: NavHostController,
viewModel: LoginScreenViewModel = hiltViewModel()
) {
LaunchedEffect(key1 = Unit) {
if (!viewModel.accessToken.isNullOrEmpty()) {
navHostController.navigate(Screen.Home.route) {
popUpTo(navHostController.graph.findStartDestination().id) {
inclusive = true
}
launchSingleTop = true
}
}
}

val startActivityForResult = rememberLauncherForActivityResult(
contract = ActivityResultContracts.StartActivityForResult(),
Expand Down

0 comments on commit 53c901f

Please sign in to comment.