@@ -364,12 +364,12 @@ private fun ChooseAccountDialogContent(
364364 }
365365 }
366366 }
367- if (isOnline) {
368- OnlineActions (
369- onAddAccountClick = onAddAccountClick,
370- onOpenSettingsClick = onOpenSettingsClick
371- )
372- }
367+
368+ OnlineActions (
369+ onAddAccountClick = onAddAccountClick,
370+ onOpenSettingsClick = onOpenSettingsClick,
371+ isOnline = isOnline
372+ )
373373 }
374374 }
375375 }
@@ -470,23 +470,25 @@ private fun StatusActionButtons(onSetOnlineStatusClick: () -> Unit, onSetStatusM
470470}
471471
472472@Composable
473- private fun OnlineActions (onAddAccountClick : () -> Unit , onOpenSettingsClick : () -> Unit ) {
474- TextButton (onClick = onAddAccountClick, modifier = Modifier .fillMaxWidth()) {
475- Row (
476- modifier = Modifier .padding(start = 16 .dp, top = 8 .dp).fillMaxWidth(),
477- verticalAlignment = Alignment .CenterVertically
478- ) {
479- Icon (
480- painterResource(R .drawable.ic_account_plus),
481- contentDescription = null ,
482- tint = colorResource(id = R .color.high_emphasis_text)
483- )
484- Spacer (Modifier .size(16 .dp))
485- Text (
486- stringResource(R .string.nc_account_chooser_add_account),
487- color = colorResource(id = R .color.high_emphasis_text),
488- fontWeight = FontWeight .Bold
489- )
473+ private fun OnlineActions (onAddAccountClick : () -> Unit , onOpenSettingsClick : () -> Unit , isOnline : Boolean ) {
474+ if (isOnline) {
475+ TextButton (onClick = onAddAccountClick, modifier = Modifier .fillMaxWidth()) {
476+ Row (
477+ modifier = Modifier .padding(start = 16 .dp, top = 8 .dp).fillMaxWidth(),
478+ verticalAlignment = Alignment .CenterVertically
479+ ) {
480+ Icon (
481+ painterResource(R .drawable.ic_account_plus),
482+ contentDescription = null ,
483+ tint = colorResource(id = R .color.high_emphasis_text)
484+ )
485+ Spacer (Modifier .size(16 .dp))
486+ Text (
487+ stringResource(R .string.nc_account_chooser_add_account),
488+ color = colorResource(id = R .color.high_emphasis_text),
489+ fontWeight = FontWeight .Bold
490+ )
491+ }
490492 }
491493 }
492494
0 commit comments