Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

svitovyda
Copy link
Contributor

@svitovyda svitovyda commented Jun 17, 2024

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

  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

Important details for the reviewers

(Delete this section if unnecessary)

  • use (x) data
  • can be reviewed commit-by-commit
  • be sure to look at ...

Copy link

sonarcloud bot commented Jun 17, 2024

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
Copy link

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
@@            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     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants