mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 15:53:44 +00:00
* Abstracted App Center Logging into its own component, so that we can have it centralized in one place and we avoid checking for FDroid on all the places we want to use it * Implemented the new logger where Crashes.TrackError was being used except on some specific cases * Improved logging, added a debug logger and removed AppCenter to be used on DEBUG
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using System;
|
|
using Bit.App.Controls;
|
|
using Bit.App.Resources;
|
|
using Bit.Core.Abstractions;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.App.Pages
|
|
{
|
|
public class HomeViewModel : BaseViewModel
|
|
{
|
|
private readonly IStateService _stateService;
|
|
private readonly IMessagingService _messagingService;
|
|
|
|
private bool _showCancelButton;
|
|
|
|
public HomeViewModel()
|
|
{
|
|
_stateService = ServiceContainer.Resolve<IStateService>("stateService");
|
|
_messagingService = ServiceContainer.Resolve<IMessagingService>("messagingService");
|
|
var logger = ServiceContainer.Resolve<ILogger>("logger");
|
|
|
|
PageTitle = AppResources.Bitwarden;
|
|
|
|
AccountSwitchingOverlayViewModel = new AccountSwitchingOverlayViewModel(_stateService, _messagingService, logger)
|
|
{
|
|
AllowActiveAccountSelection = true
|
|
};
|
|
}
|
|
|
|
public bool ShowCancelButton
|
|
{
|
|
get => _showCancelButton;
|
|
set => SetProperty(ref _showCancelButton, value);
|
|
}
|
|
|
|
public AccountSwitchingOverlayViewModel AccountSwitchingOverlayViewModel { get; }
|
|
public Action StartLoginAction { get; set; }
|
|
public Action StartRegisterAction { get; set; }
|
|
public Action StartSsoLoginAction { get; set; }
|
|
public Action StartEnvironmentAction { get; set; }
|
|
public Action CloseAction { get; set; }
|
|
}
|
|
}
|