File tree 4 files changed +20
-1
lines changed
4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ public interface ISoundSwitchConfiguration : IConfiguration
55
55
56
56
bool SwitchForegroundProgram { get ; set ; }
57
57
bool NotifyUsingPrimaryScreen { get ; set ; }
58
+
59
+ bool AutoAddNewConnectedDevices { get ; set ; }
58
60
59
61
/// <summary>
60
62
/// What to do with the TrayIcon when changing default device
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ public SoundSwitchConfiguration()
60
60
RecordingHotKey = new HotKey ( Keys . F7 , HotKey . ModifierKeys . Alt | HotKey . ModifierKeys . Control ) ;
61
61
MuteRecordingHotKey = new HotKey ( Keys . M , HotKey . ModifierKeys . Control | HotKey . ModifierKeys . Alt ) ;
62
62
63
+ AutoAddNewConnectedDevices = true ;
64
+
63
65
SelectedDevices = new HashSet < DeviceInfo > ( ) ;
64
66
SwitchIcon = IconChangerFactory . ActionEnum . Never ;
65
67
MigratedFields = new HashSet < string > ( ) ;
@@ -85,6 +87,8 @@ public SoundSwitchConfiguration()
85
87
public string CustomNotificationFilePath { get ; set ; }
86
88
public bool NotifyUsingPrimaryScreen { get ; set ; }
87
89
90
+ public bool AutoAddNewConnectedDevices { get ; set ; }
91
+
88
92
89
93
public DateTime LastDonationNagTime { get ; set ; }
90
94
@@ -190,7 +194,8 @@ public bool Migrate()
190
194
}
191
195
192
196
return profile ;
193
- } ) . ToHashSet ( ) ;
197
+ } )
198
+ . ToHashSet ( ) ;
194
199
MigratedFields . Add ( nameof ( ProfileSettings ) + "_final" ) ;
195
200
migrated = true ;
196
201
}
Original file line number Diff line number Diff line change @@ -248,6 +248,17 @@ public bool NotifyUsingPrimaryScreen
248
248
}
249
249
}
250
250
251
+
252
+ public bool AutoAddNewDevice
253
+ {
254
+ get => AppConfigs . Configuration . AutoAddNewConnectedDevices ;
255
+ set
256
+ {
257
+ AppConfigs . Configuration . AutoAddNewConnectedDevices = value ;
258
+ AppConfigs . Configuration . Save ( ) ;
259
+ }
260
+ }
261
+
251
262
#region Misc settings
252
263
253
264
/// <summary>
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ public interface IAppModel : IDisposable
117
117
118
118
bool Telemetry { get ; set ; }
119
119
bool QuickMenuEnabled { get ; set ; }
120
+ bool AutoAddNewDevice { get ; set ; }
120
121
121
122
#endregion
122
123
You can’t perform that action at this time.
0 commit comments