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:
parent
17645a88cf
commit
a4e86e55ae
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user