Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
触发原因:
按最近更新排序时,新会话在开始和会话结束都会有时间戳的元数据用于排序,此时还会触发后端查询会话及目录下的最大会话数。因此在查询后端时就会在文件夹标题下显示[加载中],然后查询完后再消失,会话列表则拿到查询结果。
从表现上来说,每一次回复都会触发一次加载中,列表的UI效果就是被挤压下拉,然后像弹簧一样缩回去影响注意力。而最近更新是一个纯前端排序的过程,会话没有增加也没有减少,此时不需要做一次后端查询。
改动措施:
区分视图变化(筛选条件、会话增减加载)和时间排序场景,仅时间排序场景减少后端查询,其余行为保持一致。