UserSwitcherView: hide logout option if not logged in (#264)

Updates tailscale/corp#18202

Signed-off-by: kari-ts <kari@tailscale.com>
pull/268/head
kari-ts 8 months ago committed by GitHub
parent 67a9320d26
commit dca2fc3bf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -25,7 +25,7 @@ import com.tailscale.ipn.ui.viewModel.UserSwitcherViewModel
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun UserSwitcherView(
fun UserSwitcherView(
nav: BackNavigation,
onNavigateHome: () -> Unit,
viewModel: UserSwitcherViewModel = viewModel()
@ -81,8 +81,10 @@ fun UserSwitcherView(
SettingRow(viewModel.addProfileSetting)
Lists.ItemDivider()
SettingRow(viewModel.loginSetting)
Lists.ItemDivider()
SettingRow(viewModel.logoutSetting)
if (currentUser != null){
Lists.ItemDivider()
SettingRow(viewModel.logoutSetting)
}
}
}
}

Loading…
Cancel
Save