Fixed metrics endpoints and offline behaviour
This commit is contained in:
@@ -57,6 +57,7 @@ namespace FoxTube.Utils
|
|||||||
|
|
||||||
public static void SendReport(Exception exception, ErrorAttachmentLog[] logs = null, params (string key, string value)[] details)
|
public static void SendReport(Exception exception, ErrorAttachmentLog[] logs = null, params (string key, string value)[] details)
|
||||||
{
|
{
|
||||||
|
logs ??= new ErrorAttachmentLog[0];
|
||||||
Crashes.TrackError(exception,
|
Crashes.TrackError(exception,
|
||||||
details.Length < 1 ? null :
|
details.Length < 1 ? null :
|
||||||
details.Select(i => new KeyValuePair<string, string>(i.key, i.value)) as Dictionary<string, string>,
|
details.Select(i => new KeyValuePair<string, string>(i.key, i.value)) as Dictionary<string, string>,
|
||||||
|
|||||||
+12
-2
@@ -4,6 +4,7 @@ using FoxTube.Utils;
|
|||||||
using Windows.ApplicationModel;
|
using Windows.ApplicationModel;
|
||||||
using Windows.ApplicationModel.Activation;
|
using Windows.ApplicationModel.Activation;
|
||||||
using Windows.UI;
|
using Windows.UI;
|
||||||
|
using Windows.UI.Popups;
|
||||||
using Windows.UI.ViewManagement;
|
using Windows.UI.ViewManagement;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
@@ -20,14 +21,23 @@ namespace FoxTube
|
|||||||
UnhandledException += ErrorOccured;
|
UnhandledException += ErrorOccured;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async void OnLaunched(LaunchActivatedEventArgs e)
|
protected override async void OnLaunched(LaunchActivatedEventArgs args)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
await UserManagement.Initialize();
|
await UserManagement.Initialize();
|
||||||
await StoreInterop.UpdateStoreState();
|
await StoreInterop.UpdateStoreState();
|
||||||
if (Settings.LastReviewedVersion != Metrics.CurrentVersion)
|
if (Settings.LastReviewedVersion != Metrics.CurrentVersion)
|
||||||
Inbox.PushChangelog();
|
Inbox.PushChangelog();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Metrics.SendReport(new Exception("OuLaunch initialization failed", e));
|
||||||
|
await new MessageDialog("There can be a temporary server issue or weak internet connection. Please, check your internet connection and try again later", "Something went wrong...").ShowAsync();
|
||||||
|
Utils.Utils.CloseApp();
|
||||||
|
}
|
||||||
|
|
||||||
if (!e.PrelaunchActivated && Window.Current.Content == null)
|
if (!args.PrelaunchActivated && Window.Current.Content == null)
|
||||||
Window.Current.Content = new MainPage();
|
Window.Current.Content = new MainPage();
|
||||||
Window.Current.Activate();
|
Window.Current.Activate();
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 865 KiB |
@@ -189,6 +189,7 @@
|
|||||||
<Content Include="Assets\BadgeLogo.scale-400.png" />
|
<Content Include="Assets\BadgeLogo.scale-400.png" />
|
||||||
<Content Include="Assets\DefaultChannelBanner.png" />
|
<Content Include="Assets\DefaultChannelBanner.png" />
|
||||||
<Content Include="Assets\DefaultVideoThumbnail.png" />
|
<Content Include="Assets\DefaultVideoThumbnail.png" />
|
||||||
|
<Content Include="Assets\Logo.png" />
|
||||||
<Content Include="Assets\Icons\Contact.png" />
|
<Content Include="Assets\Icons\Contact.png" />
|
||||||
<Content Include="Assets\LargeTile.scale-100.png" />
|
<Content Include="Assets\LargeTile.scale-100.png" />
|
||||||
<Content Include="Assets\LargeTile.scale-125.png" />
|
<Content Include="Assets\LargeTile.scale-125.png" />
|
||||||
|
|||||||
Reference in New Issue
Block a user