diff --git a/Configuration/UserConfig.cs b/Configuration/UserConfig.cs index 0fcedcf9..22ad7f49 100644 --- a/Configuration/UserConfig.cs +++ b/Configuration/UserConfig.cs @@ -35,9 +35,8 @@ static UserConfig(){ // CONFIGURATION DATA - public bool FirstRun { get; set; } = true; - public bool AllowDataCollection { get; set; } = false; - public bool ShowFollowNotification { 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 cf4ced2f..5468b1a3 100644 --- a/Core/FormBrowser.cs +++ b/Core/FormBrowser.cs @@ -320,7 +320,6 @@ public void TriggerAnalyticsEvent(AnalyticsFile.Event e){ public void OnIntroductionClosed(bool showGuide, bool allowDataCollection){ if (Config.FirstRun){ Config.FirstRun = false; - Config.ShowFollowNotification = false; Config.AllowDataCollection = allowDataCollection; Config.Save(); @@ -328,10 +327,6 @@ public void OnIntroductionClosed(bool showGuide, bool allowDataCollection){ analytics = new AnalyticsManager(this, plugins, Program.AnalyticsFilePath); } } - else if (Config.ShowFollowNotification){ - Config.ShowFollowNotification = false; - Config.Save(); - } if (showGuide){ FormGuide.Show(); diff --git a/Core/TweetDeckBrowser.cs b/Core/TweetDeckBrowser.cs index cadc5217..8136754e 100644 --- a/Core/TweetDeckBrowser.cs +++ b/Core/TweetDeckBrowser.cs @@ -142,9 +142,6 @@ private void browser_FrameLoadEnd(object sender, FrameLoadEndEventArgs e){ if (Program.UserConfig.FirstRun){ ScriptLoader.ExecuteFile(e.Frame, "introduction.js"); } - else if (Program.UserConfig.ShowFollowNotification){ - ScriptLoader.ExecuteFile(e.Frame, "introduction.follow.js"); - } } } diff --git a/Resources/Scripts/introduction.follow.js b/Resources/Scripts/introduction.follow.js deleted file mode 100644 index 5fd38459..00000000 --- a/Resources/Scripts/introduction.follow.js +++ /dev/null @@ -1,91 +0,0 @@ -(function($, $TD){ - $(document).one("TD.ready", function(){ - let css = $(` -<style> -#td-introduction-modal { - display: block; -} - -#td-introduction-modal .mdl { - width: 90%; - max-width: 626px; - height: 244px; -} - -#td-introduction-modal .mdl-header-title { - cursor: default; -} - -#td-introduction-modal .mdl-content { - padding: 4px 16px 0; - overflow-y: auto; -} - -#td-introduction-modal p { - margin: 12px 0; - font-size: 1.4rem; -} - -#td-introduction-modal p strong { - font-weight: normal; - text-shadow: 0 0 #000; -} - -#td-introduction-modal footer { - padding: 10px 0; -} -</style>`).appendTo(document.head); - - let ele = $(` -<div id="td-introduction-modal" class="ovl"> - <div class="mdl is-inverted-dark"> - <header class="mdl-header"> - <h3 class="mdl-header-title">Quick message</h3> - <a href="#" class="mdl-dismiss link-normal-dark"><i class="icon icon-close"></i></a> - </header> - <div class="mdl-inner"> - <div class="mdl-content"> - <p>Hi! Unfortunately the old <strong>@TryTweetDuck</strong> account was suspended.</p> - <p>If you were following it before, or if you want to keep up with the latest news and updates about TweetDuck, please <a id="td-introduction-follow" href="#">follow @TryMyAwesomeApp</a>.</p> - <p>Thanks for your support!</p> - </div> - <footer class="txt-right"> - <button class="btn btn-positive"><span class="label">Close</span</button> - </footer> - </div> - </div> -</div>`).appendTo(".js-app"); - - let tdUser = null; - let loadTweetDuckUser = (onSuccess, onError) => { - if (tdUser !== null){ - onSuccess(tdUser); - } - else{ - TD.controller.clients.getPreferredClient().getUsersByIds([ "957608948189880320" ], users => onSuccess(users[0]), onError); - } - }; - - loadTweetDuckUser(user => tdUser = user); - - ele.find("#td-introduction-follow").click(function(){ - loadTweetDuckUser(user => { - $(document).trigger("uiShowFollowFromOptions", { userToFollow: user }); - - $(".js-modals-container").find("header a[rel='user']").each(function(){ - this.outerHTML = "TweetDuck"; - }); - }, () => { - alert("An error occurred when retrieving the account information."); - }); - }); - - ele.find("button, a.mdl-dismiss").click(function(){ - ele.fadeOut(200, function(){ - $TD.onIntroductionClosed(false, false); - ele.remove(); - css.remove(); - }); - }); - }); -})($, $TD); diff --git a/bld/gen_upd.iss b/bld/gen_upd.iss index eba60747..fc8a4bfa 100644 --- a/bld/gen_upd.iss +++ b/bld/gen_upd.iss @@ -60,6 +60,7 @@ Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\GPUCache" [InstallDelete] Type: files; Name: "{app}\TweetLib.Audio.dll" +Type: filesandordirs; Name: "{app}\scripts" Type: filesandordirs; Name: "{app}\plugins\official" Type: files; Name: "{app}\locales\am.pak" Type: files; Name: "{app}\locales\ar.pak"