Fixed adverts compiling, authorization and failsafe protocol
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Microsoft.Advertising.WinRT.UI;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Windows.ApplicationModel.Core;
|
||||
using Windows.Security.Credentials;
|
||||
|
||||
namespace FoxTube.Core.Helpers
|
||||
{
|
||||
@@ -23,15 +24,17 @@ namespace FoxTube.Core.Helpers
|
||||
/// </summary>
|
||||
/// <param name="args">Parameters which will be provided to new application instance</param>
|
||||
public static async void RestartApp(string args) =>
|
||||
await CoreApplication.RequestRestartAsync(args);
|
||||
await CoreApplication.RequestRestartAsync(args ?? "");
|
||||
|
||||
public static void InitializeFailsafeProtocol()
|
||||
{
|
||||
Metrics.AddEvent("Failsafe protocol initiated");
|
||||
Settings.ResetSettings();
|
||||
PasswordVault passwordVault = new PasswordVault();
|
||||
IReadOnlyList<PasswordCredential> credentialEntries = passwordVault.RetrieveAll();
|
||||
foreach (PasswordCredential credential in credentialEntries)
|
||||
passwordVault.Remove(credential);
|
||||
RestartApp();
|
||||
}
|
||||
|
||||
public static NativeAdsManagerV2 AdManager => new NativeAdsManagerV2("9ncqqxjtdlfh", "1100044398");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user