Skip to content

Commit 1198de2

Browse files
PM-17766 add new strings for ssh keys empty item (#4722)
1 parent 3db7b17 commit 1198de2

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataExtensions.kt

+7-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ fun VaultData.toViewState(
209209
R.string.no_notes
210210
}
211211

212-
else -> R.string.no_items
212+
VaultItemListingState.ItemListingType.Vault.SshKey -> {
213+
R.string.no_ssh_keys
214+
}
213215
}
214216
.asText()
215217
}
@@ -245,6 +247,10 @@ fun VaultData.toViewState(
245247
R.string.new_note
246248
}
247249

250+
VaultItemListingState.ItemListingType.Vault.SshKey -> {
251+
R.string.new_ssh_key
252+
}
253+
248254
else -> R.string.new_item
249255
}
250256
.asText()

app/src/main/res/values/strings.xml

+2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@
164164
<string name="no_notes">There are no notes in your vault.</string>
165165
<string name="new_note">New note</string>
166166
<string name="new_item">New item</string>
167+
<string name="new_ssh_key">New SSH key</string>
167168
<string name="no_text_sends">There are no text Sends in your vault.</string>
168169
<string name="no_file_sends">There are no file Sends in your vault.</string>
170+
<string name="no_ssh_keys">There are no SSH keys in your vault.</string>
169171
<string name="new_text_send">New text Send</string>
170172
<string name="new_file_send">New file Send</string>
171173
<string name="no_username">No Username</string>

app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataExtensionsTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -731,9 +731,9 @@ class VaultItemListingDataExtensionsTest {
731731
// SSH keys
732732
assertEquals(
733733
VaultItemListingState.ViewState.NoItems(
734-
message = R.string.no_items.asText(),
734+
message = R.string.no_ssh_keys.asText(),
735735
shouldShowAddButton = false,
736-
buttonText = R.string.new_item.asText(),
736+
buttonText = R.string.new_ssh_key.asText(),
737737
),
738738
vaultData.toViewState(
739739
itemListingType = VaultItemListingState.ItemListingType.Vault.SshKey,

0 commit comments

Comments
 (0)