diff --git a/ShhShell/Views/Hosts/RecentsView.swift b/ShhShell/Views/Hosts/RecentsView.swift index 53e642e..52b93a1 100644 --- a/ShhShell/Views/Hosts/RecentsView.swift +++ b/ShhShell/Views/Hosts/RecentsView.swift @@ -65,10 +65,14 @@ struct RecentsView: View { .disabled(historyCount == hostsManager.history.count) Spacer() - Text("\(historyCount)/\(hostsManager.history.count)") - .foregroundStyle(.gray) - .font(.caption) - .contentTransition(.numericText()) + Text( + historyCount == 0 ? + "\(hostsManager.history.count) item\(plural(hostsManager.history.count))" : + "\(historyCount)/\(hostsManager.history.count)" + ) + .foregroundStyle(.gray) + .font(.caption) + .contentTransition(.numericText()) Spacer() Button { @@ -96,3 +100,7 @@ struct RecentsView: View { keyManager: KeyManager() ) } + +func plural(_ num: Int) -> String { + return num == 1 ? "" : "s" +}