Outlook auth fix and actually syncing.

This commit is contained in:
Burak Kaan Köse
2025-10-06 17:46:00 +02:00
parent 9623c2e6d2
commit 309e891594
14 changed files with 85 additions and 22 deletions
@@ -37,6 +37,11 @@ public class DialogServiceBase : IDialogServiceBase
ApplicationResourceManager = applicationResourceManager;
}
protected XamlRoot GetXamlRoot()
{
return WinoApplication.MainWindow?.Content?.XamlRoot;
}
public async Task<string> PickFilePathAsync(string saveFileName)
{
var picker = new FolderPicker()
@@ -122,7 +127,8 @@ public class DialogServiceBase : IDialogServiceBase
{
return new AccountCreationDialog
{
RequestedTheme = ThemeService.RootTheme.ToWindowsElementTheme()
RequestedTheme = ThemeService.RootTheme.ToWindowsElementTheme(),
XamlRoot = GetXamlRoot()
};
}
@@ -195,6 +201,8 @@ public class DialogServiceBase : IDialogServiceBase
try
{
dialog.XamlRoot = GetXamlRoot();
return await dialog.ShowAsync();
}
catch (Exception ex)
+9 -10
View File
@@ -1,10 +1,8 @@
using System;
using System.Threading.Tasks;
using Windows.ApplicationModel;
using Windows.Foundation.Metadata;
using Windows.Storage;
using Windows.System;
using Windows.UI.Shell;
using Wino.Core.Domain.Interfaces;
@@ -88,20 +86,21 @@ public class NativeAppService : INativeAppService
return string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision);
}
[Obsolete("Not supported for Win SDK")]
public async Task PinAppToTaskbarAsync()
{
// If Start screen manager API's aren't present
if (!ApiInformation.IsTypePresent("Windows.UI.Shell.TaskbarManager")) return;
//if (!ApiInformation.IsTypePresent("Windows.UI.Shell.TaskbarManager")) return;
// Get the taskbar manager
var taskbarManager = TaskbarManager.GetDefault();
//// Get the taskbar manager
//var taskbarManager = TaskbarManager.GetDefault();
// If Taskbar doesn't allow pinning, don't show the tip
if (!taskbarManager.IsPinningAllowed) return;
//// If Taskbar doesn't allow pinning, don't show the tip
//if (!taskbarManager.IsPinningAllowed) return;
// If already pinned, don't show the tip
if (await taskbarManager.IsCurrentAppPinnedAsync()) return;
//// If already pinned, don't show the tip
//if (await taskbarManager.IsCurrentAppPinnedAsync()) return;
await taskbarManager.RequestPinCurrentAppAsync();
//await taskbarManager.RequestPinCurrentAppAsync();
}
}
+4 -2
View File
@@ -198,8 +198,10 @@ public class NewThemeService : INewThemeService
await ApplyCustomThemeAsync(true);
// Registering to color changes, thus we notice when user changes theme system wide
uiSettings.ColorValuesChanged -= UISettingsColorChanged;
uiSettings.ColorValuesChanged += UISettingsColorChanged;
// TODO: WinUI: This event seems to be very unreliable. It causes a crash when the function runs under.
//uiSettings.ColorValuesChanged -= UISettingsColorChanged;
//uiSettings.ColorValuesChanged += UISettingsColorChanged;
isInitialized = true;
}
@@ -227,7 +227,7 @@ public class PreferencesService(IConfigurationService configurationService) : Ob
public bool IsNavigationPaneOpened
{
get => _configurationService.Get(nameof(IsNavigationPaneOpened), true);
set => SaveProperty(propertyName: nameof(IsNavigationPaneOpened), value);
set => SetPropertyAndSave(propertyName: nameof(IsNavigationPaneOpened), value);
}
public bool AutoSelectNextItem