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 notif badge for space invite #4061

Merged
merged 2 commits into from
Sep 24, 2021

Conversation

BillCarsonFr
Copy link
Member

Fixes #4059

image

@BillCarsonFr BillCarsonFr added the Z-NextRelease For issues and PRs which should be included in the NextRelease. label Sep 22, 2021
@github-actions
Copy link

github-actions bot commented Sep 22, 2021

Unit Test Results

  34 files  ±0    34 suites  ±0   22s ⏱️ ±0s
  73 tests ±0    73 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
180 runs  ±0  180 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 5a8e789. ± Comparison against base commit 5a8e789.

♻️ This comment has been updated with latest results.

@BillCarsonFr BillCarsonFr requested a review from bmarty September 23, 2021 07:48
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one remark about formatting

rootCounts.fold(0, { acc, rs ->
acc + rs.highlightCount
}) + (counts.highlightCount.takeIf { selectedSpace != null } ?: 0)
+ spaceInviteCount
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this formatting it is really hard to read.
change to

                            CountInfo(
                                    homeCount = counts,
                                    otherCount = RoomAggregateNotificationCount(
                                            notificationCount = rootCounts.fold(0, { acc, rs -> acc + rs.notificationCount })
                                                    + (counts.notificationCount.takeIf { selectedSpace != null } ?: 0)
                                                    + spaceInviteCount,
                                            highlightCount = rootCounts.fold(0, { acc, rs -> acc + rs.highlightCount })
                                                    + (counts.highlightCount.takeIf { selectedSpace != null } ?: 0)
                                                    + spaceInviteCount
                                    )
                            )

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have improved the formatting

@bmarty bmarty enabled auto-merge September 24, 2021 13:54
@bmarty bmarty merged commit 5a8e789 into develop Sep 24, 2021
@bmarty bmarty deleted the feature/bca/spaces_invite_notification_dot branch September 24, 2021 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-NextRelease For issues and PRs which should be included in the NextRelease.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Space Invites are not lighting up the drawer menu
2 participants