mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
fix duplicated history
This commit is contained in:
@@ -51,7 +51,6 @@ class HostsManager: ObservableObject, @unchecked Sendable {
|
||||
}
|
||||
|
||||
func addToHistory(_ host: Host) {
|
||||
history = [History(host: host, count: 1)] + history
|
||||
history.append(History(host: host, count: 1))
|
||||
formatHistory()
|
||||
saveHistory()
|
||||
|
||||
@@ -13,8 +13,6 @@ struct RecentsView: View {
|
||||
|
||||
@State var historyCount: Int = 1
|
||||
|
||||
// @State var displayedHistory: [History] = []
|
||||
|
||||
var body: some View {
|
||||
if !hostsManager.history.isEmpty {
|
||||
Section("Recents") {
|
||||
|
||||
Reference in New Issue
Block a user