mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
Don't load news in debug build
This commit is contained in:
parent
dd9816856b
commit
7d0040b61c
1 changed files with 5 additions and 3 deletions
|
@ -181,18 +181,20 @@ private void InitializeControls()
|
|||
|
||||
ExportImportControl.UploadRequested += json => UploadManager.UploadText(json);
|
||||
|
||||
#if !DEBUG
|
||||
ucNews.NewsLoaded += (sender, e) =>
|
||||
{
|
||||
if (ucNews.NewsManager.IsUnread && Visible) tsbNews.StartAnimation();
|
||||
};
|
||||
ucNews.Start();
|
||||
|
||||
HandleCreated += MainForm_HandleCreated;
|
||||
#endif
|
||||
|
||||
#if WindowsStore
|
||||
tsmiDNSChanger.Visible = false;
|
||||
tsmiTrayDNSChanger.Visible = false;
|
||||
#endif
|
||||
|
||||
HandleCreated += MainForm_HandleCreated;
|
||||
}
|
||||
|
||||
public void UpdateControls()
|
||||
|
@ -1037,7 +1039,7 @@ private void MainForm_VisibleChanged(object sender, EventArgs e)
|
|||
#if !DEBUG
|
||||
if (Visible)
|
||||
{
|
||||
if (ucNews.NewsManager.IsUnread)
|
||||
if (ucNews.NewsManager != null && ucNews.NewsManager.IsUnread)
|
||||
{
|
||||
tsbNews.StartAnimation();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue