mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
The single-active BackwardRelayPager applies forwarded relay callbacks to whichever scope is currently bound. Its doc already states this is "safe as long as the caller only advances the bound scope", but a subscription for a *just-backgrounded* scope (conversation navigation overlap, account switch, a second pane) can still deliver a late onEvent/onEose/onClosed — which would move the newly-bound scope's cursors instead. Now that those cursors persist on the Chatroom/ChatroomList model, that corruption would stick. Add BackwardRelayPager.isBoundTo(cursors) (cursor identity == scope identity) and gate each manager's forwarded callbacks on it, so a stray callback from a non-bound scope is dropped, not mis-applied. The framework's own newEose bookkeeping still runs. No-op on the happy single-scope path.