wireapp / wire-webapp

👽 Wire for web
https://app.wire.com
GNU General Public License v3.0
1.13k stars 290 forks source link

fix: Fix loading following messages condition WPB-9465 #17599

Open svitovyda opened 1 month ago

svitovyda commented 1 month ago
BugWPB-9465 [web] Conversation scrolling stops loading following messages


Description

This fixes the part of the problem. TODO: If messages are all read, the scrolling will trigger the next messages loading. But if the messages (30+ missed calls and some content messages after them) are not read, the scroll to the last message will not trigger the loading, new sent messages will appear, but the missed messages will not be shown TODO: in most cases

const lastMessage = conversation.getNewestMessage();
if (!isLastReceivedMessage(lastMessage, conversation))

can be replaced with !conversation.hasLastReceivedMessageLoaded(), I'd do this refactoring within this fix too.

Also, the isLastReceivedMessage can be a public method of conversation

Checklist

Important details for the reviewers

(Delete this section if unnecessary)

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 46.14%. Comparing base (a01fa21) to head (43a0a39). Report is 1 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #17599 +/- ## ========================================== + Coverage 46.11% 46.14% +0.03% ========================================== Files 760 760 Lines 25017 25010 -7 Branches 5729 5722 -7 ========================================== + Hits 11537 11542 +5 + Misses 12036 12026 -10 + Partials 1444 1442 -2 ```