mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-02-25 08:46:03 +01:00
Minor refactoring and code fixes
This commit is contained in:
parent
09fac63ffc
commit
45a3a7499f
lib/TweetLib.Core
windows/TweetDuck
@ -1,8 +1,6 @@
|
||||
using TweetLib.Core.Systems.Dialogs;
|
||||
|
||||
namespace TweetLib.Core.Application {
|
||||
public interface IAppMessageDialogs {
|
||||
void Information(string caption, string text, string buttonAccept = Dialogs.OK);
|
||||
void Error(string caption, string text, string buttonAccept = Dialogs.OK);
|
||||
void Information(string caption, string text);
|
||||
void Error(string caption, string text);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
namespace TweetLib.Core.Features {
|
||||
public interface ICommonInterface {
|
||||
void Alert(string type, string contents);
|
||||
void DisplayTooltip(string text);
|
||||
void DisplayTooltip(string? text);
|
||||
void FixClipboard();
|
||||
int GetIdleSeconds();
|
||||
void OnSoundNotification();
|
||||
|
@ -3,7 +3,7 @@ public interface INotificationInterface {
|
||||
bool FreezeTimer { get; set; }
|
||||
bool IsHovered { get; }
|
||||
|
||||
void DisplayTooltip(string text);
|
||||
void DisplayTooltip(string? text);
|
||||
void FinishCurrentNotification();
|
||||
void ShowTweetDetail();
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ public NotificationBridgeObject(INotificationInterface notificationInterface, IC
|
||||
this.i = notificationInterface;
|
||||
}
|
||||
|
||||
public void DisplayTooltip(string text) {
|
||||
public void DisplayTooltip(string? text) {
|
||||
i.DisplayTooltip(text);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ public void LoadNotificationLayout(string fontSize, string headLayout) {
|
||||
NotificationBrowser.SetNotificationLayout(fontSize, headLayout);
|
||||
}
|
||||
|
||||
public void DisplayTooltip(string text) {
|
||||
public void DisplayTooltip(string? text) {
|
||||
i.DisplayTooltip(text);
|
||||
}
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
namespace TweetLib.Core.Systems.Dialogs {
|
||||
internal static class Dialogs {
|
||||
public const string OK = "OK";
|
||||
}
|
||||
}
|
@ -4,12 +4,12 @@
|
||||
|
||||
namespace TweetDuck.Application {
|
||||
sealed class MessageDialogs : IAppMessageDialogs {
|
||||
public void Information(string caption, string text, string buttonAccept) {
|
||||
FormManager.RunOnUIThreadAsync(() => FormMessage.Information(caption, text, buttonAccept));
|
||||
public void Information(string caption, string text) {
|
||||
FormManager.RunOnUIThreadAsync(() => FormMessage.Information(caption, text, FormMessage.OK));
|
||||
}
|
||||
|
||||
public void Error(string caption, string text, string buttonAccept) {
|
||||
FormManager.RunOnUIThreadAsync(() => FormMessage.Error(caption, text, buttonAccept));
|
||||
public void Error(string caption, string text) {
|
||||
FormManager.RunOnUIThreadAsync(() => FormMessage.Error(caption, text, FormMessage.OK));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,6 +79,7 @@ bool IJsDialogHandler.OnJSDialog(IWebBrowser browserControl, IBrowser browser, s
|
||||
input.Dispose();
|
||||
}
|
||||
|
||||
callback.Dispose();
|
||||
form.Dispose();
|
||||
});
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace TweetDuck.Management {
|
||||
static class BrowserCache {
|
||||
public static string CacheFolder => CefUtils.GetCacheFolder(App.StoragePath);
|
||||
private static string CacheFolder => CefUtils.GetCacheFolder(App.StoragePath);
|
||||
|
||||
private static bool clearOnExit;
|
||||
private static Timer autoClearTimer;
|
||||
|
Loading…
Reference in New Issue
Block a user