mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-06-01 11:34:04 +02:00
Fix missing browser.Load("about:blank") which apparently breaks stuff
This commit is contained in:
parent
17645a88cf
commit
a4e86e55ae
@ -13,8 +13,8 @@ partial class FormNotification : Form{
|
|||||||
private readonly ChromiumWebBrowser browser;
|
private readonly ChromiumWebBrowser browser;
|
||||||
|
|
||||||
private readonly Queue<TweetNotification> tweetQueue = new Queue<TweetNotification>(4);
|
private readonly Queue<TweetNotification> tweetQueue = new Queue<TweetNotification>(4);
|
||||||
|
private readonly bool autoHide;
|
||||||
private int timeLeft, totalTime;
|
private int timeLeft, totalTime;
|
||||||
private bool autoHide;
|
|
||||||
|
|
||||||
public FormNotification(Form owner, bool autoHide){
|
public FormNotification(Form owner, bool autoHide){
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -22,7 +22,7 @@ public FormNotification(Form owner, bool autoHide){
|
|||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
this.autoHide = autoHide;
|
this.autoHide = autoHide;
|
||||||
|
|
||||||
browser = new ChromiumWebBrowser("about:blank"){ MenuHandler = new MenuHandlerEmpty() };
|
browser = new ChromiumWebBrowser(""){ MenuHandler = new MenuHandlerEmpty() };
|
||||||
panelBrowser.Controls.Add(browser);
|
panelBrowser.Controls.Add(browser);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,6 +38,7 @@ public void ShowNotification(TweetNotification notification){
|
|||||||
|
|
||||||
public void ShowNotificationForSettings(bool resetAnimation){
|
public void ShowNotificationForSettings(bool resetAnimation){
|
||||||
if (browser.Address == "about:blank"){
|
if (browser.Address == "about:blank"){
|
||||||
|
browser.Load("about:blank"); // required, otherwise shit breaks
|
||||||
browser.LoadHtml(TweetNotification.ExampleTweet.GenerateHtml(),"http://tweetdeck.twitter.com/");
|
browser.LoadHtml(TweetNotification.ExampleTweet.GenerateHtml(),"http://tweetdeck.twitter.com/");
|
||||||
resetAnimation = true;
|
resetAnimation = true;
|
||||||
}
|
}
|
||||||
@ -59,7 +60,7 @@ public void HideNotification(){
|
|||||||
private void LoadNextNotification(){
|
private void LoadNextNotification(){
|
||||||
TweetNotification tweet = tweetQueue.Dequeue();
|
TweetNotification tweet = tweetQueue.Dequeue();
|
||||||
|
|
||||||
browser.Load("about:blank");
|
browser.Load("about:blank"); // required, otherwise shit breaks
|
||||||
browser.LoadHtml(tweet.GenerateHtml(),"http://tweetdeck.twitter.com/");
|
browser.LoadHtml(tweet.GenerateHtml(),"http://tweetdeck.twitter.com/");
|
||||||
|
|
||||||
totalTime = timeLeft = tweet.GetDisplayDuration(Program.UserConfig.NotificationDuration);
|
totalTime = timeLeft = tweet.GetDisplayDuration(Program.UserConfig.NotificationDuration);
|
||||||
|
Loading…
Reference in New Issue
Block a user