Skip to content

Commit

Permalink
Show out of time instead of negative days in the top bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun authored and albin-mullvad committed Nov 27, 2023
1 parent 3281f0d commit 1d0895a
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,15 @@ fun MullvadTopBarWithDeviceName(
text =
stringResource(
id = R.string.top_bar_time_left,
pluralStringResource(
id = R.plurals.days,
daysLeftUntilExpiry,
daysLeftUntilExpiry
)
if (daysLeftUntilExpiry >= 0) {
pluralStringResource(
id = R.plurals.days,
daysLeftUntilExpiry,
daysLeftUntilExpiry
)
} else {
stringResource(id = R.string.out_of_time)
}
),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onBackground.copy(alpha = AlphaTopBar)
Expand Down

0 comments on commit 1d0895a

Please sign in to comment.