File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ export function chunkMessages(
6666 if ( ! messages || messages . length === 0 ) return [ ] ;
6767
6868 const total = messages . length ;
69- const maxChunkSize = Math . max ( 1 , Math . max ( Math . ceil ( total * 0.2 ) , 200 ) ) ;
69+ // 暂时不自动分了,好像大家不是很喜欢这个功能,现在加了虚拟滚动没那么卡了
70+ // const maxChunkSize = Math.max(1, Math.max(Math.ceil(total * 0.2), 200));
7071 const chunks : Chunk [ ] = [ ] ;
7172
7273 const hasKeywordFilter =
@@ -88,13 +89,13 @@ export function chunkMessages(
8889
8990 const crossedDay =
9091 ! reachedEnd && ! isSameDay ( messages [ i - 1 ] . time , messages [ i ] . time ) ;
91- const reachedSizeLimit = i - start >= maxChunkSize ;
92+ // const reachedSizeLimit = i - start >= maxChunkSize;
9293
9394 if (
9495 ! reachedEnd &&
9596 ! startsKeywordChunk &&
96- ! crossedDay &&
97- ! reachedSizeLimit
97+ ! crossedDay
98+ // !reachedSizeLimit
9899 )
99100 continue ;
100101
You can’t perform that action at this time.
0 commit comments