fix duplicated history

This commit is contained in:
neon443
2025-08-18 15:46:57 +01:00
parent e8ad06b429
commit c0d45cbd2a
2 changed files with 0 additions and 3 deletions

View File

@@ -51,7 +51,6 @@ class HostsManager: ObservableObject, @unchecked Sendable {
} }
func addToHistory(_ host: Host) { func addToHistory(_ host: Host) {
history = [History(host: host, count: 1)] + history
history.append(History(host: host, count: 1)) history.append(History(host: host, count: 1))
formatHistory() formatHistory()
saveHistory() saveHistory()

View File

@@ -13,8 +13,6 @@ struct RecentsView: View {
@State var historyCount: Int = 1 @State var historyCount: Int = 1
// @State var displayedHistory: [History] = []
var body: some View { var body: some View {
if !hostsManager.history.isEmpty { if !hostsManager.history.isEmpty {
Section("Recents") { Section("Recents") {