File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 4
4
using System . Linq ;
5
5
using System . Speech . Synthesis ;
6
6
7
+ using Avalonia . Controls ;
8
+
7
9
using Newtonsoft . Json ;
8
10
9
11
using Nullinside . Api . Common . Twitch ;
@@ -91,6 +93,10 @@ public static Configuration Instance {
91
93
/// </summary>
92
94
/// <returns>True if successful, false otherwise.</returns>
93
95
public bool WriteConfiguration ( ) {
96
+ if ( Design . IsDesignMode ) {
97
+ return false ;
98
+ }
99
+
94
100
try {
95
101
Directory . CreateDirectory ( Path . GetDirectoryName ( CONFIG_LOCATION ) ! ) ;
96
102
Original file line number Diff line number Diff line change 3
3
using System . Linq ;
4
4
using System . Threading ;
5
5
6
+ using Avalonia . Controls ;
7
+
6
8
using log4net ;
7
9
8
10
using Nullinside . Api . Common . Twitch ;
@@ -93,6 +95,10 @@ private void Main() {
93
95
/// Connects to any configuration found in the config file that we are not currently connected to.
94
96
/// </summary>
95
97
private void ConnectChatsInConfig ( ) {
98
+ if ( Design . IsDesignMode ) {
99
+ return ;
100
+ }
101
+
96
102
List < string ? > ? missing = _configuration . TwitchChats ?
97
103
. Select ( c => c . TwitchChannel )
98
104
. Except ( _chats ? . Select ( c => c . ChatConfig ? . TwitchChannel ) ?? [ ] )
You can’t perform that action at this time.
0 commit comments