Skip to content

Conversation

@zacharykeeping
Copy link
Member

  1. What triggered this change? (PBI link, Email Subject, conversation + reason, etc)

#1470

  1. What was changed?

Fixes a crash when navigating to the Network page a second time while offline, as the error event handler doesn't get re-subscribed to the collection.

  1. Did you do pair or mob programming?

No

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a crash that occurs when navigating to the Network page a second time while offline. The root cause was event handlers (OnCollectionUpdated and OnError) being subscribed inside a one-time initialization block, preventing them from being re-subscribed after OnDisappearing() unsubscribed them. The fix moves these subscriptions outside the conditional block to ensure they're re-attached on every page appearance.

Key Changes:

  • Event handler subscriptions moved from inside the one-time if (Segments is null || Segments.Count == 0) block to unconditional execution in Initialise()
  • Aligns with the established pattern used in QuizViewModel and RedeemViewModel

@zacharykeeping zacharykeeping merged commit 9a5e6a6 into main Dec 16, 2025
12 checks passed
@zacharykeeping zacharykeeping deleted the 1470-offline-fix branch December 16, 2025 22:04
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.

3 participants