- Every network call returns a result whatever fails, not only the exceptions .NET usually throws: on Android the HTTPS client is the platform's own stack, and a network switch mid-request throws others. The outside test as a whole cannot throw; sharing the link falls back to copying it. A last guard (the UI thread, unobserved tasks, Android's raiser) writes errors.log in the app folder and keeps the app running; nothing is sent. - On mobile data the app no longer probes the operator's gateway as if it were a home router: the router card says there is none, a private address on the phone with another public one is the operator's address sharing (CGNAT) and is drawn as its shared exit, the public IPv4 is held by that exit, and the provider's notes are labelled as being about its home lines. These were "router not answering" and "can't tell" on an Iliad phone. - The route's routers appear as stops on the path's wires: the operator's internal ones before its exit, the public ones with their network number towards the internet. - The download speed is timed after the first quarter of the sample, once the connection has ramped up; the path no longer shows the address block's registry country. - Two new strings, drafted in every language. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
using Avalonia;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Controls.ApplicationLifetimes;
|
|
using Avalonia.Markup.Xaml;
|
|
|
|
using MeWeb.App.Services;
|
|
using MeWeb.App.ViewModels;
|
|
using MeWeb.App.Views;
|
|
using MeWeb.Core.Net;
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace MeWeb.App;
|
|
|
|
public partial class App : Application
|
|
{
|
|
public static IServiceProvider Services { get; private set; }
|
|
|
|
public static IPlatform Platform { get; set; } = new SystemPlatform();
|
|
|
|
public override void Initialize()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
#if DEBUG
|
|
this.AttachDeveloperTools();
|
|
#endif
|
|
}
|
|
|
|
public override void OnFrameworkInitializationCompleted()
|
|
{
|
|
ErrorLog.Watch();
|
|
Services = new ServiceCollection().AddMeWebApp(Platform).BuildServiceProvider();
|
|
var stored = AppSettings.Read();
|
|
Localizer.Instance.SetLanguage(Languages.Find(stored.Language) ?? Languages.ForCulture(System.Globalization.CultureInfo.CurrentUICulture));
|
|
|
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
|
desktop.MainWindow = new MainWindow { Content = CreateMainView() };
|
|
else if (ApplicationLifetime is IActivityApplicationLifetime activity)
|
|
activity.MainViewFactory = CreateMainView;
|
|
else if (ApplicationLifetime is ISingleViewApplicationLifetime single)
|
|
single.MainView = CreateMainView();
|
|
|
|
base.OnFrameworkInitializationCompleted();
|
|
}
|
|
|
|
static Control CreateMainView() => new MainView { DataContext = Services.GetRequiredService<MainViewModel>() };
|
|
}
|