File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
lib/watch_together/providers Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -486,6 +486,19 @@ class WatchTogetherProvider with ChangeNotifier {
486486
487487 appLogger.d ('WatchTogether: Host exited player, callback set: ${onHostExitedPlayer != null }' );
488488
489+ // Clear media info so the next mediaSwitch (even same ratingKey) isn't
490+ // treated as a duplicate by the guard in _handleMediaSwitch.
491+ // copyWith uses ?? so it can't set fields to null — construct directly.
492+ _session = WatchSession (
493+ sessionId: _session! .sessionId,
494+ role: _session! .role,
495+ controlMode: _session! .controlMode,
496+ state: _session! .state,
497+ participants: _session! .participants,
498+ errorMessage: _session! .errorMessage,
499+ hostPeerId: _session! .hostPeerId,
500+ );
501+
489502 // Clear the player callback BEFORE popping so that any mediaSwitch message
490503 // arriving during the pop animation routes to MainScreen's handler instead
491504 // of the dying VideoPlayerScreen.
You can’t perform that action at this time.
0 commit comments