Live store update notifications.

This commit is contained in:
Burak Kaan Köse
2026-03-08 11:22:41 +01:00
parent a8f9b2d126
commit c1568d33e6
18 changed files with 341 additions and 37 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
namespace Wino.Core.Domain;
namespace Wino.Core.Domain;
public static class Constants
{
@@ -21,6 +21,8 @@ public static class Constants
public const string ToastModeKey = nameof(ToastModeKey);
public const string ToastModeMail = nameof(ToastModeMail);
public const string ToastModeCalendar = nameof(ToastModeCalendar);
public const string ToastStoreUpdateActionKey = nameof(ToastStoreUpdateActionKey);
public const string ToastStoreUpdateActionInstall = nameof(ToastStoreUpdateActionInstall);
public const string ClientLogFile = "Client_.log";
public const string ServerLogFile = "Server_.log";
public const string LogArchiveFileName = "WinoLogs.zip";
@@ -28,3 +30,4 @@ public static class Constants
public const string WinoMailIdentiifer = nameof(WinoMailIdentiifer);
public const string WinoCalendarIdentifier = nameof(WinoCalendarIdentifier);
}
@@ -36,8 +36,14 @@ public interface INotificationBuilder
/// </summary>
void CreateWebView2RuntimeMissingNotification();
/// <summary>
/// Shows a notification when a Microsoft Store update is available.
/// </summary>
void CreateStoreUpdateNotification();
/// <summary>
/// Creates a calendar reminder toast for the specified calendar item.
/// </summary>
Task CreateCalendarReminderNotificationAsync(CalendarItem calendarItem, long reminderDurationInSeconds);
}
@@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.Calendar;
@@ -57,6 +57,11 @@ public interface IPreferencesService : INotifyPropertyChanged
/// </summary>
WinoApplicationMode DefaultApplicationMode { get; set; }
/// <summary>
/// Setting: Whether Microsoft Store update notifications should be shown.
/// </summary>
bool IsStoreUpdateNotificationsEnabled { get; set; }
#endregion
#region Mail
@@ -241,3 +246,4 @@ public interface IPreferencesService : INotifyPropertyChanged
#endregion
}
@@ -0,0 +1,12 @@
using System.Threading.Tasks;
namespace Wino.Core.Domain.Interfaces;
public interface IStoreUpdateService
{
bool HasAvailableUpdate { get; }
Task<bool> RefreshAvailabilityAsync(bool showNotification = false);
Task<bool> StartUpdateAsync();
}
@@ -0,0 +1,3 @@
namespace Wino.Core.Domain.MenuItems;
public class StoreUpdateMenuItem : MenuItemBase { }
@@ -599,6 +599,7 @@
"MenuNewMail": "New Mail",
"MenuRate": "Rate Wino",
"MenuSettings": "Settings",
"MenuUpdateAvailable": "Update Available",
"MergedAccountCommonFolderArchive": "Archive",
"MergedAccountCommonFolderDraft": "Draft",
"MergedAccountCommonFolderInbox": "Inbox",
@@ -622,6 +623,8 @@
"Notifications_MultipleNotificationsTitle": "New Mail",
"Notifications_WinoUpdatedMessage": "Checkout new version {0}",
"Notifications_WinoUpdatedTitle": "Wino Mail has been updated.",
"Notifications_StoreUpdateAvailableTitle": "Update available",
"Notifications_StoreUpdateAvailableMessage": "A newer version of Wino Mail is ready to install from Microsoft Store.",
"OnlineSearchFailed_Message": "Failed to perform search\n{0}\n\nListing offline mails.",
"OnlineSearchTry_Line1": "Can't find what you are looking for?",
"OnlineSearchTry_Line2": "Try online search.",
@@ -700,6 +703,8 @@
"SettingsAppPreferences_StartupBehavior_FatalError": "Fatal error occurred while changing the startup mode for Wino Mail.",
"SettingsAppPreferences_StartupBehavior_Title": "Start minimized on Windows startup",
"SettingsAppPreferences_Title": "App Preferences",
"SettingsAppPreferences_StoreUpdateNotifications_Title": "Store update notifications",
"SettingsAppPreferences_StoreUpdateNotifications_Description": "Show notifications and footer actions when a Microsoft Store update is available.",
"SettingsAutoSelectNextItem_Description": "Select the next item after you delete or move a mail.",
"SettingsAutoSelectNextItem_Title": "Auto select next item",
"SettingsAvailableThemes_Description": "Select a theme from Wino's own collection for your taste or apply your own themes.",
@@ -1117,3 +1122,5 @@
"AccountSetup_TryAgainButton": "Try Again",
"ImapCalDavSettings_AutoDiscoveryFailed": "Auto-discovery failed. Please enter settings manually in the Advanced tab."
}