-
Notifications
You must be signed in to change notification settings - Fork 578
Closed
Labels
bugbroken functionality, usability problems, unexpected errorsbroken functionality, usability problems, unexpected errorsperformanceperformance related issuesperformance related issuesstate:testedWe tested it and are about to release itWe tested it and are about to release it
Milestone
Description
MailListView queries the list model state on every render:
state: listModel.stateStream(), |
And List relies on referential equality of the state:
tutanota/src/common/gui/base/List.ts
Line 172 in b61d6c2
if (this.state !== attrs.state || this.lastThemeId !== theme.themeId) { |
however we do have a getter for the state stream and it's no memoized
tutanota/src/mail-app/mail/model/MailListModel.ts
Lines 86 to 95 in b61d6c2
get stateStream(): Stream<ListState<Mail>> { | |
return this.listModel.stateStream.map((state) => { | |
const newState: ListState<Mail> = { | |
...state, | |
items: this.items, | |
selectedItems: new Set(this.getSelectedAsArray()), | |
} | |
return newState | |
}) | |
} |
so we will get a new stream with new state on every call
Test notes
- Verify mail lists still work (try selecting mails, loading scrolling through large lists, multiple selection, new mail received, etc.)
- Verify conversation lists still work (try selecting mails, loading scrolling through large lists, multiple selection, new mail received, etc.)
Metadata
Metadata
Assignees
Labels
bugbroken functionality, usability problems, unexpected errorsbroken functionality, usability problems, unexpected errorsperformanceperformance related issuesperformance related issuesstate:testedWe tested it and are about to release itWe tested it and are about to release it