Couple UI Fixes (#255)

- Disabled UI navigation cache for all pages.
- Restore the renderer<>composer page animation back.
- IdlePage functionality into mail list page.
- Couple bugfixes.
This commit is contained in:
Burak Kaan Köse
2024-06-26 20:00:10 +02:00
committed by GitHub
parent ca40730600
commit 39626e0df9
12 changed files with 180 additions and 109 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Linq;
using CommunityToolkit.Mvvm.Messaging;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@@ -18,6 +19,14 @@ namespace Wino.Services
{
public class WinoNavigationService : IWinoNavigationService
{
private readonly IStatePersistanceService _statePersistanceService;
private WinoPage[] _renderingPageTypes = new WinoPage[]
{
WinoPage.MailRenderingPage,
WinoPage.ComposePage
};
private Frame GetCoreFrame(NavigationReferenceFrame frameType)
{
if (Window.Current.Content is Frame appFrame && appFrame.Content is AppShell shellPage)
@@ -36,6 +45,11 @@ namespace Wino.Services
}
}
public WinoNavigationService(IStatePersistanceService statePersistanceService)
{
_statePersistanceService = statePersistanceService;
}
private Type GetPageType(WinoPage winoPage)
{
switch (winoPage)
@@ -85,6 +99,8 @@ namespace Wino.Services
var pageType = GetPageType(page);
Frame shellFrame = GetCoreFrame(NavigationReferenceFrame.ShellFrame);
_statePersistanceService.IsReadingMail = _renderingPageTypes.Contains(page);
if (shellFrame != null)
{
var currentFrameType = GetCurrentFrameType(ref shellFrame);