File tree Expand file tree Collapse file tree 4 files changed +65
-1
lines changed
Expand file tree Collapse file tree 4 files changed +65
-1
lines changed Original file line number Diff line number Diff line change 2464824648 }
2464924649 }
2465024650 },
24651+ "Reset ignored discovered devices" : {
24652+ "localizations" : {
24653+ "de" : {
24654+ "stringUnit" : {
24655+ "state" : "translated",
24656+ "value" : "Ignorierte entdeckte Geräte zurücksetzen"
24657+ }
24658+ },
24659+ "es" : {
24660+ "stringUnit" : {
24661+ "state" : "translated",
24662+ "value" : "Restablecer dispositivos descubiertos ignorados"
24663+ }
24664+ },
24665+ "it" : {
24666+ "stringUnit" : {
24667+ "state" : "translated",
24668+ "value" : "Reimposta dispositivi scoperti ignorati"
24669+ }
24670+ },
24671+ "ja" : {
24672+ "stringUnit" : {
24673+ "state" : "translated",
24674+ "value" : "無視された発見済みデバイスをリセット"
24675+ }
24676+ },
24677+ "nl" : {
24678+ "stringUnit" : {
24679+ "state" : "translated",
24680+ "value" : "Negeer geen ontdekte apparaten"
24681+ }
24682+ },
24683+ "uk" : {
24684+ "stringUnit" : {
24685+ "state" : "translated",
24686+ "value" : "Скинути ігноровані виявлені пристрої"
24687+ }
24688+ },
24689+ "zh-Hans" : {
24690+ "stringUnit" : {
24691+ "state" : "translated",
24692+ "value" : "重置已忽略的发现设备"
24693+ }
24694+ }
24695+ }
24696+ },
2465124697 "Restart app to remove v1 database" : {
2465224698 "localizations" : {
2465324699 "de" : {
Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ class SushitrainDelegate: NSObject {
9595 @AppStorage ( " userPausedDevices " ) var userPausedDevices = Set < String > ( )
9696 @AppStorage ( " ignoreLongTimeNoSeeDevices " ) var ignoreLongTimeNoSeeDevices = Set < String > ( )
9797
98+ @AppStorage ( " ignoreDiscoveredDevices " ) var ignoreDiscoveredDevices = Set < String > ( )
99+
98100 #if os(iOS)
99101 // Whether to re-enable hideHiddenFolders when app comes to the foreground
100102 @AppStorage ( " rehideHiddenFoldersOnActivate " ) var rehideHiddenFoldersOnActivate : Bool = false
Original file line number Diff line number Diff line change @@ -302,6 +302,14 @@ struct LatencyView: View {
302302 addingDeviceID = devID
303303 showingAddDevicePopup = true
304304 }
305+ } . onDelete { idxs in
306+ let toDelete = idxs. map { discoveredNewDevices [ $0] }
307+ for deviceID in toDelete {
308+ appState. userSettings. ignoreDiscoveredDevices. insert ( deviceID)
309+ }
310+ Task {
311+ await self . update ( )
312+ }
305313 }
306314 }
307315 }
@@ -360,7 +368,9 @@ struct LatencyView: View {
360368
361369 // Discovered peers
362370 let peerIDs = peers. map { $0. deviceID ( ) }
363- self . discoveredNewDevices = Array ( appState. discoveredDevices. keys) . filter ( { d in !peerIDs. contains ( d) } )
371+ self . discoveredNewDevices = Array ( appState. discoveredDevices. keys) . filter ( { d in
372+ !peerIDs. contains ( d) && !appState. userSettings. ignoreDiscoveredDevices. contains ( d)
373+ } )
364374 self . loading = false
365375 }
366376 }
Original file line number Diff line number Diff line change @@ -402,6 +402,12 @@ struct TroubleshootingView: View {
402402 )
403403 } . disabled ( performingDatabaseMaintenance)
404404 }
405+
406+ Section {
407+ Button ( " Reset ignored discovered devices " , role: . destructive) {
408+ appState. userSettings. ignoreDiscoveredDevices. removeAll ( )
409+ }
410+ }
405411 }
406412 #if os(macOS)
407413 . formStyle( . grouped)
You can’t perform that action at this time.
0 commit comments