Fixing profile sync for gmail and separating authenticators token storage.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -2,6 +2,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Windows.UI.Xaml;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.UWP;
|
||||
using Wino.Messaging.UI;
|
||||
@@ -18,6 +20,11 @@ namespace Wino.Dialogs
|
||||
WeakReferenceMessenger.Default.Register(this);
|
||||
}
|
||||
|
||||
public override void OnStateChanged(AccountCreationDialogState state)
|
||||
{
|
||||
var tt = VisualStateManager.GoToState(this, state.ToString(), true);
|
||||
}
|
||||
|
||||
public async void Receive(CopyAuthURLRequested message)
|
||||
{
|
||||
copyClipboardURL = message.AuthURL;
|
||||
|
||||
@@ -16,7 +16,15 @@ namespace Wino.Dialogs
|
||||
|
||||
public CancellationTokenSource CancellationTokenSource { get; private set; }
|
||||
|
||||
public static readonly DependencyProperty StateProperty = DependencyProperty.Register(nameof(State), typeof(AccountCreationDialogState), typeof(BaseAccountCreationDialog), new PropertyMetadata(AccountCreationDialogState.Idle));
|
||||
public static readonly DependencyProperty StateProperty = DependencyProperty.Register(nameof(State), typeof(AccountCreationDialogState), typeof(BaseAccountCreationDialog), new PropertyMetadata(AccountCreationDialogState.Idle, OnStateChanged));
|
||||
|
||||
private static void OnStateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var dialog = d as BaseAccountCreationDialog;
|
||||
dialog.OnStateChanged((AccountCreationDialogState)e.NewValue);
|
||||
}
|
||||
|
||||
public abstract void OnStateChanged(AccountCreationDialogState state);
|
||||
|
||||
// Prevent users from dismissing it by ESC key.
|
||||
public void DialogClosing(ContentDialog sender, ContentDialogClosingEventArgs args)
|
||||
|
||||
@@ -39,7 +39,6 @@ namespace Wino.Core.UWP
|
||||
protected IThemeService ThemeService { get; }
|
||||
protected IDatabaseService DatabaseService { get; }
|
||||
protected ITranslationService TranslationService { get; }
|
||||
protected IMailDialogService DialogService { get; }
|
||||
|
||||
// Order matters.
|
||||
private List<IInitializeAsync> initializeServices => new List<IInitializeAsync>()
|
||||
@@ -69,7 +68,6 @@ namespace Wino.Core.UWP
|
||||
ThemeService = Services.GetService<IThemeService>();
|
||||
DatabaseService = Services.GetService<IDatabaseService>();
|
||||
TranslationService = Services.GetService<ITranslationService>();
|
||||
DialogService = Services.GetService<IMailDialogService>();
|
||||
|
||||
// Make sure the paths are setup on app start.
|
||||
AppConfiguration.ApplicationDataFolderPath = ApplicationData.Current.LocalFolder.Path;
|
||||
|
||||
Reference in New Issue
Block a user