diff --git a/Configuration/UserConfig.cs b/Configuration/UserConfig.cs index 0a5872ea..2a7da3ab 100644 --- a/Configuration/UserConfig.cs +++ b/Configuration/UserConfig.cs @@ -12,7 +12,7 @@ namespace TweetDuck.Configuration{ sealed class UserConfig{ private static readonly FileSerializer<UserConfig> Serializer = new FileSerializer<UserConfig>{ - HandleUnknownProperties = FileSerializer<UserConfig>.IgnoreProperties("AppLocale") + HandleUnknownProperties = FileSerializer<UserConfig>.IgnoreProperties("AppLocale", "ShowDataCollectionNotification") }; static UserConfig(){ @@ -37,9 +37,8 @@ static UserConfig(){ // CONFIGURATION DATA - public bool FirstRun { get; set; } = true; - public bool AllowDataCollection { get; set; } = false; - public bool ShowDataCollectionNotification { get; set; } = true; + public bool FirstRun { get; set; } = true; + public bool AllowDataCollection { get; set; } = false; public WindowState BrowserWindow { get; set; } = new WindowState(); public WindowState PluginsWindow { get; set; } = new WindowState(); diff --git a/Core/FormBrowser.cs b/Core/FormBrowser.cs index 22f11103..719bcf91 100644 --- a/Core/FormBrowser.cs +++ b/Core/FormBrowser.cs @@ -66,8 +66,6 @@ public FormBrowser(UpdaterSettings updaterSettings){ this.notification.Show(); this.browser = new TweetDeckBrowser(this, plugins, new TweetDeckBridge.Browser(this, notification)); - this.browser.PageLoaded += browser_PageLoaded; - this.contextMenu = ContextMenuBrowser.CreateMenu(this); Controls.Add(new MenuStrip{ Visible = false }); // fixes Alt freezing the program in Win 10 Anniversary Update @@ -213,38 +211,6 @@ private void trayIcon_ClickRestore(object sender, EventArgs e){ private void trayIcon_ClickClose(object sender, EventArgs e){ ForceClose(); } - - private void browser_PageLoaded(object sender, EventArgs e){ - if (Config.ShowDataCollectionNotification){ - this.InvokeAsyncSafe(() => { - if (!Config.FirstRun && Config.AllowDataCollection){ - FormMessage form = new FormMessage("Anonymous Data Update", "Hi! You can now review your anonymous data report, and opt-out if you've changed your mind. Collected data will be used to focus development on most commonly used features. If you want to opt-out but still support the project, any feedback and donations are appreciated.", MessageBoxIcon.Information); - form.AddButton("OK", ControlType.Accept | ControlType.Focused); - - Button btnReviewSettings = new Button{ - Anchor = AnchorStyles.Bottom | AnchorStyles.Left, - Font = SystemFonts.MessageBoxFont, - Location = new Point(9, 12), - Margin = new Padding(0, 0, 48, 0), - Size = new Size(160, 26), - Text = "Review Feedback Options", - UseVisualStyleBackColor = true - }; - - btnReviewSettings.Click += (sender2, args2) => { - form.Close(); - OpenSettings(typeof(TabSettingsFeedback)); - }; - - form.AddActionControl(btnReviewSettings); - ShowChildForm(form); - } - - Config.ShowDataCollectionNotification = false; - Config.Save(); - }); - } - } private void plugins_Reloaded(object sender, PluginErrorEventArgs e){ if (e.HasErrors){ @@ -356,7 +322,6 @@ public void OnIntroductionClosed(bool showGuide, bool allowDataCollection){ if (Config.FirstRun){ Config.FirstRun = false; Config.AllowDataCollection = allowDataCollection; - Config.ShowDataCollectionNotification = false; Config.Save(); if (allowDataCollection && analytics == null){ diff --git a/Core/TweetDeckBrowser.cs b/Core/TweetDeckBrowser.cs index 318ddd67..8136754e 100644 --- a/Core/TweetDeckBrowser.cs +++ b/Core/TweetDeckBrowser.cs @@ -31,9 +31,7 @@ public bool IsTweetDeckWebsite{ } } } - - public event EventHandler PageLoaded; - + private readonly ChromiumWebBrowser browser; private readonly PluginManager plugins; @@ -144,8 +142,6 @@ private void browser_FrameLoadEnd(object sender, FrameLoadEndEventArgs e){ if (Program.UserConfig.FirstRun){ ScriptLoader.ExecuteFile(e.Frame, "introduction.js"); } - - PageLoaded?.Invoke(this, EventArgs.Empty); } }