Skip to content

Commit

Permalink
avoid opening the config when the app starts and there is already a c…
Browse files Browse the repository at this point in the history
…onfig
  • Loading branch information
Vlad Somai authored and Vlad Somai committed Aug 7, 2022
1 parent fd1700b commit 2d1651a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Necta/NectaApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ private void SaveAndValidateURI(bool isFirstPaint = false)
API_Handler.API_PRINTER_INFO_URI = printerInfoURI;
API_Handler.API_REQUEST_INTERVAL = (int)ApiRequestInterval_value.Value;

NectaConfigService.SaveNewConfig();
if (!isFirstPaint)//do not save config when app starts because it is handled in Initialize
NectaConfigService.SaveNewConfig();

if (API_Handler.API_REQUEST_INTERVAL < 3000)
NectaLogService.WriteLog(Thread.CurrentThread.Name, "The request interval value is too low, please enter a value greater than 3000ms!", LogLevels.WARNING);
Expand Down

0 comments on commit 2d1651a

Please sign in to comment.