Skip to content

Android - Chat - Unread message does not disappear from LHN in focus mode #7903

Closed

Description

@kavimuru

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Launch the app
  2. Log in with any account
  3. Navigate to a conversation (conv 1)
  4. Click on the Pin icon on top right to pin the conversation to the top of LHN
  5. Navigate to another conversation (conv 2)
  6. Write something on compose box and navigate away from the conversation
  7. Check on LHN that the conversation now has a pencil icon indicating there’s a draft in the conversation
  8. Navigate to another conversation (conv 3) and mark message as unread
  9. Navigate away from the conversation and verify conv 3 is marked as unread (with bold letters) in LHN
  10. Navigate to settings by clicking on the user avatar over the LHN
  11. Click on preferences
  12. Click on the Priority Mode option and select “#focus”
  13. “#focus” mode should display all pinned conversations and also all that have unread messages and draft
  14. Verify the 3 conversations with are displayed in LHN
  15. Navigate to the unread conversation (conv 3) and open it so it's marked as unread

Expected Result:

Verify conversation 3 is not displayed in LHN anymore

Actual Result:

Unread message does not disappear from LHN

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Android

Version Number: 1.1.40
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856

Bug5468371_Screen_Recording_20220224-213453_New_Expensify.mp4

Notes/Photos/Videos:
Expensify/Expensify Issue URL:
Issue reported by: Applause
Slack conversation:

View all open jobs on GitHub

view this job

Activity

  1. MelvinBot commented on Feb 25, 2022

    @MelvinBot
    Contributor

    Triggered auto assignment to @marcaaron (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  2. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 25, 2022
  3. MelvinBot commented on Feb 25, 2022

    @MelvinBot
    Contributor

    Triggered auto assignment to @jboniface (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

  4. Santhosh-Sellavel commented on Feb 25, 2022

    @Santhosh-Sellavel
    Collaborator

    Proposal

    In here, For sidebar Options in focus mode, we have a filter for read reports alone. Using hideReadReports: true

    if (priorityMode === CONST.PRIORITY_MODE.GSD) {
    sideBarOptions = {
    hideReadReports: true,
    sortByAlphaAsc: true,
    };
    }

    hideReadReports is configurable filter criteria for the getOption method

    function getOptions(reports, personalDetails, activeReportID, {

    In the following lines, report gets filtered only when it hasreport.unreadActionCount === 0

    const shouldFilterReportIfEmpty = !showReportsWithNoComments && report.lastMessageTimestamp === 0 && !ReportUtils.isDefaultRoom(report);
    const shouldFilterReportIfRead = hideReadReports && report.unreadActionCount === 0;
    const shouldFilterReport = shouldFilterReportIfEmpty || shouldFilterReportIfRead;
    if (report.reportID !== activeReportID
    && !report.isPinned
    && !hasDraftComment
    && shouldFilterReport
    && !reportContainsIOUDebt) {
    return;
    }

    Since hideReadReports criteria is used for sidebarOptions alone, we remove the criteria.
    Add a new criteria hideReports in getOptions method.

    Now use hideReports in the filter and refactor the filter block as shown below.

           const shouldFilterReportIfEmpty = !showReportsWithNoComments && report.lastMessageTimestamp === 0 && !ReportUtils.isDefaultRoom(report);
           const shouldFilterReport = hideReports || shouldFilterReportIfEmpty;
           if (report.reportID !== activeReportID
               && !report.isPinned
               && !hasDraftComment
               && shouldFilterReport
               && !reportContainsIOUDebt) {
               return;
           }

    Removed shouldFilterReportIfRead as we need to filter both read & unread reports and used hideReports in shouldFilterReport along with existing criterias.

    This should be enough to handle this issue.
    Thanks!

  5. MelvinBot commented on Feb 28, 2022

    @MelvinBot
    Contributor

    @jboniface Whoops! This issue is 2 days overdue. Let's get this updated quick!

  6. jboniface commented on Feb 28, 2022

    @jboniface
  7. 3 remaining items

  8. MelvinBot commented on Feb 28, 2022

    @MelvinBot
    Contributor

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (Exported)

  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 28, 2022
  10. MelvinBot commented on Feb 28, 2022

    @MelvinBot
    Contributor

    Triggered auto assignment to @marcaaron (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  11. rushatgabhane commented on Mar 3, 2022

    @rushatgabhane
    Member

    Hmm, @Santhosh-Sellavel could you please help me understand why this is a bug?

    The unread report is the most recent report. It shouldn't disappear once we've read it.
    It should disappear only if we've read it, anddd we navigate to a different report.

    I hope I'm making sense

  12. Santhosh-Sellavel commented on Mar 3, 2022

    @Santhosh-Sellavel
    Collaborator

    @rushatgabhane
    My learnings here, on focus mode we can just have selected chats alone, and ignore other chats.

    Also, Issue was reported by Applause here.

  13. rushatgabhane commented on Mar 3, 2022

    @rushatgabhane
    Member

    Do you agree that this issue should be closed?

  14. thesahindia commented on Mar 3, 2022

    @thesahindia
    Member

    I think this isn't a bug and we shouldn't remove unread chats from LHN. If we only keep pinned chats in the LHN then how the user would know about the new messages from a chat that isn't pinned by the user, it's not a good ux

  15. Santhosh-Sellavel commented on Mar 4, 2022

    @Santhosh-Sellavel
    Collaborator

    @rushatgabhane I am 50-50 here, so let's ask in the Slack channel to get an opinion on what's expected here.

  16. Santhosh-Sellavel commented on Mar 4, 2022

    @Santhosh-Sellavel
    Collaborator

    Asked in channel thread link

  17. rushatgabhane commented on Mar 5, 2022

    @rushatgabhane
    Member

    Great, thanks. Added my thoughts in the 🧵

  18. rushatgabhane commented on Mar 14, 2022

    @rushatgabhane
    Member

    If we assume that NewDot is supposed to work the same on all platforms then, when the current chat is open in the main view, it'd also be shown in LHN, on web/desktop. I think, in the screen vid in the OP, that it's not disappearing because the user hasn't navigated to a new report

    @marcaaron we've reached a consensus to close this issue in this slack thread.

  19. marcaaron commented on Mar 14, 2022

    @marcaaron
    Contributor

    Sounds good thanks

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

Metadata

Metadata

Labels

EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions