File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
package/src/components/MessageList Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ const flatListViewabilityConfig: ViewabilityConfig = {
6161} ;
6262
6363const hasReadLastMessage = ( channel : Channel , userId : string ) => {
64- const latestMessageIdInChannel = channel . state . latestMessages . slice ( - 1 ) [ 0 ] ?. id ;
64+ const latestMessageIdInChannel =
65+ channel . state . latestMessages [ channel . state . latestMessages . length - 1 ] ?. id ;
6566 const lastReadMessageIdServer = channel . state . read [ userId ] ?. last_read_message_id ;
6667 return latestMessageIdInChannel === lastReadMessageIdServer ;
6768} ;
@@ -214,11 +215,11 @@ const getItemTypeInternal = (message: LocalMessage) => {
214215
215216 if ( message . text ) {
216217 const text = message . text ;
217- if ( text . length <= 20 ) {
218+ if ( text . length <= 50 ) {
218219 return 'short-message-with-text' ;
219220 }
220221
221- if ( text . length <= 100 ) {
222+ if ( text . length <= 200 ) {
222223 return 'medium-message-with-text' ;
223224 }
224225
You can’t perform that action at this time.
0 commit comments