Skip to content

Commit

Permalink
Add support for empty changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Dec 23, 2024
1 parent b37b14c commit 3d246eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,19 @@ fun ChangelogScreen(
) {
Text(
text = state.version,
style = MaterialTheme.typography.headlineMedium,
style = MaterialTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.onSurface,
)

state.changes.forEach { changeItem -> ChangeListItem(text = changeItem) }
if(state.changes.isEmpty()) {
Text(
text = stringResource(R.string.changelog_empty),
style = MaterialTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
} else {
state.changes.forEach { changeItem -> ChangeListItem(text = changeItem) }
}
}
Box(modifier = Modifier.padding(Dimens.mediumPadding).fillMaxWidth()) {
PrimaryButton(
Expand Down
1 change: 1 addition & 0 deletions android/lib/resource/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -419,4 +419,5 @@
<string name="search">Search</string>
<string name="obfuscation_info_shadowsocks_batteryusage">Attention: Shadowsocks can increase battery consumption depending on data usage, such as streaming a video.</string>
<string name="see_full_changelog">See full changelog</string>
<string name="changelog_empty">No changelog was added for this version</string>
</resources>
3 changes: 3 additions & 0 deletions desktop/packages/mullvad-vpn/locales/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2547,6 +2547,9 @@ msgstr ""
msgid "New list"
msgstr ""

msgid "No changelog was added for this version"
msgstr ""

msgid "No custom lists available"
msgstr ""

Expand Down

0 comments on commit 3d246eb

Please sign in to comment.