Skip to content

Just-opened narrow sometimes flickers "no messages" before fetch has started #5152

Open
@chrisbobbe

Description

@chrisbobbe
const isFetching = fetching.older || fetching.newer || loading;
// [...]
const sayNoMessages = messages.length === 0 && !isFetching;

We fudge fetching.older and fetching.newer as false in fetchingReducer when this is a narrow we've just opened, one that state.fetching doesn't have info for yet.

fetchMessagesInNarrow correctly sets fetching.older and fetching.newer to true when it's called. But by the time it's called, it's too late: the false values have already made sayNoMessages true, wrongly, for at least a frame. And during that time, we've told the user there are no messages.

Right?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions