Archived
1
0

Fixed metrics endpoints and offline behaviour

This commit is contained in:
Michael Gordeev
2020-05-14 00:01:52 +03:00
parent cf3252b4fa
commit b4cfb58b64
4 changed files with 18 additions and 6 deletions
+1
View File
@@ -57,6 +57,7 @@ namespace FoxTube.Utils
public static void SendReport(Exception exception, ErrorAttachmentLog[] logs = null, params (string key, string value)[] details)
{
logs ??= new ErrorAttachmentLog[0];
Crashes.TrackError(exception,
details.Length < 1 ? null :
details.Select(i => new KeyValuePair<string, string>(i.key, i.value)) as Dictionary<string, string>,
+16 -6
View File
@@ -4,6 +4,7 @@ using FoxTube.Utils;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI;
using Windows.UI.Popups;
using Windows.UI.ViewManagement;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@@ -20,14 +21,23 @@ namespace FoxTube
UnhandledException += ErrorOccured;
}
protected override async void OnLaunched(LaunchActivatedEventArgs e)
protected override async void OnLaunched(LaunchActivatedEventArgs args)
{
await UserManagement.Initialize();
await StoreInterop.UpdateStoreState();
if (Settings.LastReviewedVersion != Metrics.CurrentVersion)
Inbox.PushChangelog();
try
{
await UserManagement.Initialize();
await StoreInterop.UpdateStoreState();
if (Settings.LastReviewedVersion != Metrics.CurrentVersion)
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.Activate();
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 865 KiB

+1
View File
@@ -189,6 +189,7 @@
<Content Include="Assets\BadgeLogo.scale-400.png" />
<Content Include="Assets\DefaultChannelBanner.png" />
<Content Include="Assets\DefaultVideoThumbnail.png" />
<Content Include="Assets\Logo.png" />
<Content Include="Assets\Icons\Contact.png" />
<Content Include="Assets\LargeTile.scale-100.png" />
<Content Include="Assets\LargeTile.scale-125.png" />