Settings page and manage accounts navigation options.
This commit is contained in:
@@ -15,6 +15,7 @@ using Wino.Mail.WinUI.Interfaces;
|
||||
using Wino.Mail.WinUI.Services;
|
||||
using Wino.Mail.WinUI.Views.Calendar;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
using Wino.Messaging.Client.Navigation;
|
||||
using Wino.Views;
|
||||
using Wino.Views.Account;
|
||||
using Wino.Views.Mail;
|
||||
@@ -68,6 +69,7 @@ public class NavigationService : NavigationServiceBase, INavigationService
|
||||
WinoPage.CalendarPage => typeof(CalendarPage),
|
||||
WinoPage.EventDetailsPage => typeof(EventDetailsPage),
|
||||
WinoPage.CalendarSettingsPage => typeof(CalendarSettingsPage),
|
||||
WinoPage.CalendarAccountSettingsPage => typeof(CalendarAccountSettingsPage),
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
@@ -208,8 +210,17 @@ public class NavigationService : NavigationServiceBase, INavigationService
|
||||
return false;
|
||||
}
|
||||
|
||||
public void GoBack()
|
||||
public void GoBack(Core.Domain.Enums.NavigationTransitionEffect slideEffect = Core.Domain.Enums.NavigationTransitionEffect.FromRight)
|
||||
{
|
||||
// Check if we're navigating within ManageAccountsPage (applies to both modes)
|
||||
// Check if we're navigating within SettingsPage (applies to both modes)
|
||||
if (_statePersistanceService.IsManageAccountsNavigating || _statePersistanceService.IsSettingsNavigating)
|
||||
{
|
||||
// Send message to ManageAccountsPage to go back within its AccountPagesFrame
|
||||
WeakReferenceMessenger.Default.Send(new BackBreadcrumNavigationRequested(slideEffect));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_statePersistanceService.ApplicationMode == WinoApplicationMode.Calendar)
|
||||
{
|
||||
var innerShellFrame = GetCoreFrame(NavigationReferenceFrame.InnerShellFrame);
|
||||
|
||||
@@ -32,8 +32,8 @@ public class StatePersistenceService : ObservableObject, IStatePersistanceServic
|
||||
|
||||
public bool IsBackButtonVisible =>
|
||||
ApplicationMode == WinoApplicationMode.Mail
|
||||
? IsReadingMail && IsReaderNarrowed
|
||||
: IsEventDetailsVisible;
|
||||
? (IsReadingMail && IsReaderNarrowed) || IsManageAccountsNavigating || IsSettingsNavigating
|
||||
: IsEventDetailsVisible || IsManageAccountsNavigating || IsSettingsNavigating;
|
||||
|
||||
private WinoApplicationMode applicationMode = WinoApplicationMode.Mail;
|
||||
|
||||
@@ -66,6 +66,34 @@ public class StatePersistenceService : ObservableObject, IStatePersistanceServic
|
||||
}
|
||||
}
|
||||
|
||||
private bool isManageAccountsNavigating;
|
||||
|
||||
public bool IsManageAccountsNavigating
|
||||
{
|
||||
get => isManageAccountsNavigating;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref isManageAccountsNavigating, value))
|
||||
{
|
||||
OnPropertyChanged(nameof(IsBackButtonVisible));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool isSettingsNavigating;
|
||||
|
||||
public bool IsSettingsNavigating
|
||||
{
|
||||
get => isSettingsNavigating;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref isSettingsNavigating, value))
|
||||
{
|
||||
OnPropertyChanged(nameof(IsBackButtonVisible));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool isReadingMail;
|
||||
|
||||
public bool IsReadingMail
|
||||
|
||||
Reference in New Issue
Block a user