1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-07 08:34:06 +02:00

Fix missing browser.Load("about:blank") which apparently breaks stuff

This commit is contained in:
chylex 2016-04-11 16:07:38 +02:00
parent 17645a88cf
commit a4e86e55ae

View File

@ -13,8 +13,8 @@ partial class FormNotification : Form{
private readonly ChromiumWebBrowser browser;
private readonly Queue<TweetNotification> tweetQueue = new Queue<TweetNotification>(4);
private readonly bool autoHide;
private int timeLeft, totalTime;
private bool autoHide;
public FormNotification(Form owner, bool autoHide){
InitializeComponent();
@ -22,7 +22,7 @@ public FormNotification(Form owner, bool autoHide){
this.owner = owner;
this.autoHide = autoHide;
browser = new ChromiumWebBrowser("about:blank"){ MenuHandler = new MenuHandlerEmpty() };
browser = new ChromiumWebBrowser(""){ MenuHandler = new MenuHandlerEmpty() };
panelBrowser.Controls.Add(browser);
}
@ -38,6 +38,7 @@ public void ShowNotification(TweetNotification notification){
public void ShowNotificationForSettings(bool resetAnimation){
if (browser.Address == "about:blank"){
browser.Load("about:blank"); // required, otherwise shit breaks
browser.LoadHtml(TweetNotification.ExampleTweet.GenerateHtml(),"http://tweetdeck.twitter.com/");
resetAnimation = true;
}
@ -59,7 +60,7 @@ public void HideNotification(){
private void LoadNextNotification(){
TweetNotification tweet = tweetQueue.Dequeue();
browser.Load("about:blank");
browser.Load("about:blank"); // required, otherwise shit breaks
browser.LoadHtml(tweet.GenerateHtml(),"http://tweetdeck.twitter.com/");
totalTime = timeLeft = tweet.GetDisplayDuration(Program.UserConfig.NotificationDuration);