mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-22 18:15:47 +02:00
parent
d48da3d51c
commit
f7e9ad74d1
@ -48,10 +48,13 @@ public bool IsWaiting{
|
||||
|
||||
public AnalyticsFile AnalyticsFile => analytics?.File ?? AnalyticsFile.Dummy;
|
||||
|
||||
#pragma warning disable IDE0069 // Disposable fields should be disposed
|
||||
private readonly TweetDeckBrowser browser;
|
||||
private readonly FormNotificationTweet notification;
|
||||
#pragma warning restore IDE0069 // Disposable fields should be disposed
|
||||
|
||||
private readonly PluginManager plugins;
|
||||
private readonly UpdateHandler updates;
|
||||
private readonly FormNotificationTweet notification;
|
||||
private readonly ContextMenu contextMenu;
|
||||
private readonly UpdateBridge updateBridge;
|
||||
|
||||
@ -90,6 +93,7 @@ public FormBrowser(){
|
||||
Disposed += (sender, args) => {
|
||||
Config.MuteToggled -= Config_MuteToggled;
|
||||
Config.TrayBehaviorChanged -= Config_TrayBehaviorChanged;
|
||||
browser.Dispose();
|
||||
};
|
||||
|
||||
Config.MuteToggled += Config_MuteToggled;
|
||||
@ -115,9 +119,7 @@ protected override void Dispose(bool disposing){
|
||||
if (disposing){
|
||||
components?.Dispose();
|
||||
|
||||
browser.Dispose();
|
||||
updates.Dispose();
|
||||
notification.Dispose();
|
||||
contextMenu.Dispose();
|
||||
|
||||
notificationScreenshotManager?.Dispose();
|
||||
|
@ -103,8 +103,11 @@ protected virtual FormBorderStyle NotificationBorderStyle{
|
||||
protected double SizeScale => DpiScale * Config.ZoomLevel / 100.0;
|
||||
|
||||
protected readonly FormBrowser owner;
|
||||
|
||||
#pragma warning disable IDE0069 // Disposable fields should be disposed
|
||||
protected readonly ChromiumWebBrowser browser;
|
||||
|
||||
#pragma warning restore IDE0069 // Disposable fields should be disposed
|
||||
|
||||
private readonly ResourceHandlerNotification resourceHandler = new ResourceHandlerNotification();
|
||||
|
||||
private DesktopNotification currentNotification;
|
||||
@ -144,7 +147,11 @@ protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){
|
||||
this.browser.SetupZoomEvents();
|
||||
|
||||
Controls.Add(browser);
|
||||
Disposed += (sender, args) => this.owner.FormClosed -= owner_FormClosed;
|
||||
|
||||
Disposed += (sender, args) => {
|
||||
this.owner.FormClosed -= owner_FormClosed;
|
||||
this.browser.Dispose();
|
||||
};
|
||||
|
||||
DpiScale = this.GetDPIScale();
|
||||
|
||||
@ -155,7 +162,6 @@ protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){
|
||||
protected override void Dispose(bool disposing){
|
||||
if (disposing){
|
||||
components?.Dispose();
|
||||
browser.Dispose();
|
||||
resourceHandler.Dispose();
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,10 @@ public static void Show(string hash = null){
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0069 // Disposable fields should be disposed
|
||||
private readonly ChromiumWebBrowser browser;
|
||||
#pragma warning restore IDE0069 // Disposable fields should be disposed
|
||||
|
||||
private string nextUrl;
|
||||
|
||||
private FormGuide(string url, FormBrowser owner){
|
||||
@ -87,12 +90,12 @@ private FormGuide(string url, FormBrowser owner){
|
||||
browser.SetupZoomEvents();
|
||||
|
||||
Controls.Add(browser);
|
||||
Disposed += (sender, args) => browser.Dispose();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing){
|
||||
if (disposing){
|
||||
components?.Dispose();
|
||||
browser.Dispose();
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
|
Loading…
Reference in New Issue
Block a user