Skip to content

fix(live): sync edited RTSP URL without an app restart#12

Merged
keyldev merged 1 commit into
mainfrom
fix/rtsp-url-sync-and-single-page-host
Jun 6, 2026
Merged

fix(live): sync edited RTSP URL without an app restart#12
keyldev merged 1 commit into
mainfrom
fix/rtsp-url-sync-and-single-page-host

Conversation

@keyldev

@keyldev keyldev commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

MainView hosted CurrentPage in two ContentControls (one per layout), so the same page VM bound to two views — both fired Loaded and double-activated the session (double Acquire + "Already started"), leaking a coordinator ref so the stale session was reused on next open.

  • MainView: host CurrentPage in a single shared ContentControl; only the chrome (sidebar / bottom nav) toggles on the breakpoint. ContentPadding moved to a property since one host can't switch padding via two layouts
  • SingleCameraPageViewModel: make Activate/Dispose idempotent (re-entrancy gate + dispose guard) so a session is acquired and released exactly once
  • GridPageViewModel: rebuild a tile when its effective stream URL changes instead of keeping the stale tile by Id (refreshes on next Live-tab entry)

Summary

Fixing issue #7
MainView hosted CurrentPage in two ContentControls (one per layout), so the same page VM bound to two views — both fired Loaded and double-activated the session (double Acquire + "Already started"), leaking a coordinator ref so the stale session was reused on next open.

  • MainView: host CurrentPage in a single shared ContentControl; only the chrome (sidebar / bottom nav) toggles on the breakpoint. ContentPadding moved to a property since one host can't switch padding via two layouts
  • SingleCameraPageViewModel: make Activate/Dispose idempotent (re-entrancy gate + dispose guard) so a session is acquired and released exactly once
  • GridPageViewModel: rebuild a tile when its effective stream URL changes instead of keeping the stale tile by Id (refreshes on next Live-tab entry)

Related

Type

  • Bug fix
  • Feature
  • Refactor / cleanup
  • Docs / CI
  • Other:

Checklist

  • Builds with 0 warnings (TreatWarningsAsErrors=true).
  • Tests pass (dotnet test); new Core logic has unit tests.
  • No layering violation — App references Core only (Infrastructure / Video / Devices wired via DI in a head).
  • Scope stays within one phase (didn't pull work from a later phase's "Не входит").
  • README / docs updated if public commands, options, or setup changed.

Platforms tested

  • Windows
  • Linux
  • macOS
  • Android
  • iOS
  • CI build only

Screenshots / notes

MainView hosted CurrentPage in two ContentControls (one per layout), so the same page VM bound to two views — both fired Loaded and double-activated the session (double Acquire + "Already started"), leaking a coordinator ref so the stale session was reused on next open.
- MainView: host CurrentPage in a single shared ContentControl; only the chrome (sidebar / bottom nav) toggles on the breakpoint. ContentPadding moved to a property since one host can't switch padding via two layouts
- SingleCameraPageViewModel: make Activate/Dispose idempotent (re-entrancy gate + dispose guard) so a session is acquired and released exactly once
- GridPageViewModel: rebuild a tile when its effective stream URL changes instead of keeping the stale tile by Id (refreshes on next Live-tab entry)
@keyldev keyldev merged commit 5e6aacc into main Jun 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant