Implemented incognito mode
This commit is contained in:
@@ -54,11 +54,13 @@ namespace FoxTube
|
||||
|
||||
public static Userinfoplus[] Users { get; private set; } = new Userinfoplus[MaxUsersCount];
|
||||
|
||||
public static bool IncognitoMode { get; set; } = false;
|
||||
|
||||
public static bool CanAddAccounts => Users.Any(i => i == null);
|
||||
public static User CurrentUser { get; set; }
|
||||
public static bool Authorized => CurrentUser != null;
|
||||
public static ExtendedYouTubeService Service => CurrentUser?.Service ?? _defaultService;
|
||||
public static YoutubeClient YoutubeClient => CurrentUser?.Client ?? _defaultYteClient;
|
||||
public static ExtendedYouTubeService Service => IncognitoMode ? _defaultService : (CurrentUser?.Service ?? _defaultService);
|
||||
public static YoutubeClient YoutubeClient => IncognitoMode ? _defaultYteClient : (CurrentUser?.Client ?? _defaultYteClient);
|
||||
|
||||
public static event EventHandler<bool> UserStateUpdated;
|
||||
public static event EventHandler<Subscription> SubscriptionsChanged;
|
||||
|
||||
Reference in New Issue
Block a user