Fix viewport following (#3681)

This was my bad after refactoring how the viewport following stuff used
store queries.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Fixes an issue where viewport following was not working
pull/3683/head
David Sheldrick 2024-05-02 14:54:41 +01:00 zatwierdzone przez GitHub
rodzic f2827f6409
commit 623788c2db
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -2919,7 +2919,9 @@ export class Editor extends EventEmitter<TLEventMap> {
const moveTowardsUser = () => {
// Stop following if we can't find the user
const leaderPresence = [...leaderPresences]
const leaderPresence = this._getCollaboratorsQuery()
.get()
.filter((p) => p.userId === userId)
.sort((a, b) => {
return a.lastActivityTimestamp - b.lastActivityTimestamp
})