/// <summary> /// Loads the Splash view. Requires the UI thread /// </summary> public void LoadSplashView() { Log.Debug($"{nameof(LoadSplashView)} State={_state}"); ThreadHelper.JoinableTaskFactory.Run(async delegate { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); LoadHtml(CreateWebViewHarness(Assembly.GetAssembly(typeof(IBrowserService)), "waiting")); _state = WebviewState.Waiting; }); }
/// <summary> /// Loads the Webview. Requires the UI thread /// </summary> public void LoadWebView() { if (_state == WebviewState.Unknown || _state == WebviewState.Waiting || _state == WebviewState.Restarting) { Log.Debug($"{nameof(LoadWebView)} State={_state}"); ThreadHelper.JoinableTaskFactory.Run(async delegate { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); LoadHtml(CreateWebViewHarness(Assembly.GetAssembly(typeof(IBrowserService)), "webview")); _state = WebviewState.Loaded; }); } else { Log.Debug($"Ignoring {nameof(LoadWebView)} State={_state}"); } }
public void SetIsReloading() { _state = WebviewState.Restarting; }