mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-12 21:33:47 +00:00
Fix: Mindwork Studio can miss the change from light to dark mode (#991)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
0bd0d6bcbd
commit
c4ba83f0be
5 files changed
+132
-5
No files matched your search
@@ -28,6 +28,18 @@ public sealed class CircuitStateService
|
||||
/// </summary>
|
||||
public string CircuitId { get; private set; } = "n/a";
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the browser connection returned after it was lost.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It does not occur for the first connection of a circuit, only for the ones which follow a loss. Use it
|
||||
/// to fetch again what the browser reports on its own: Blazor drops such reports while the connection is
|
||||
/// down, and nothing sends them a second time. The event is raised while Blazor is still completing the
|
||||
/// reconnection, though. A handler must not wait for JavaScript interop, because the browser's answer can
|
||||
/// only be processed once the reconnection has finished. Start such work without awaiting it instead.
|
||||
/// </remarks>
|
||||
public event Action? ConnectionRestored;
|
||||
|
||||
/// <summary>
|
||||
/// Called by the circuit handler when the circuit was opened.
|
||||
/// </summary>
|
||||
@@ -37,7 +49,17 @@ public sealed class CircuitStateService
|
||||
/// <summary>
|
||||
/// Called by the circuit handler when the browser connection was established or restored.
|
||||
/// </summary>
|
||||
public void MarkAsConnected() => this.isConnected = true;
|
||||
/// <remarks>
|
||||
/// A restored connection raises ConnectionRestored. Blazor never runs the handler's events of one circuit
|
||||
/// concurrently, so reading and writing the state in two steps is safe here.
|
||||
/// </remarks>
|
||||
public void MarkAsConnected()
|
||||
{
|
||||
var wasConnected = this.isConnected;
|
||||
this.isConnected = true;
|
||||
if (!wasConnected)
|
||||
this.ConnectionRestored?.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the circuit handler when the browser connection was lost or the circuit ended.
|
||||
|
||||
Reference in new issue
Block a user