Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

[PAY-186] Address desktop notification qa#1312

Merged
dylanjeffers merged 4 commits into
mainfrom
dj-pay-186-desktop-notification-qa
May 13, 2022
Merged

[PAY-186] Address desktop notification qa#1312
dylanjeffers merged 4 commits into
mainfrom
dj-pay-186-desktop-notification-qa

Conversation

@dylanjeffers

@dylanjeffers dylanjeffers commented May 12, 2022

Copy link
Copy Markdown
Contributor

Description

Fixes various notification qa issues:

  1. Fix markAsRead
  2. Fix AnnouncementNotification
  3. Enable UserListModal for repost/follow notifs with more than 9 users

@audius-infra

Copy link
Copy Markdown
Collaborator

@dylanjeffers dylanjeffers changed the title [PAY-186] Desktop Notification QA [PAY-186] Address desktop notification qa May 13, 2022

@rickyrombo rickyrombo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks really good!!


const users = useSelector((state: CommonState) =>
getNotificationUsers(state, notificationProp, USER_LENGTH_LIMIT)
getNotificationUsers(state, notificationProp, USER_LENGTH_LIMIT + 3)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why +3?

@dylanjeffers dylanjeffers May 13, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Omg great catch, that was a test

const otherUsersCount = otherUsers.length
const isMultiUser = users.length > 1
const { users, userIds, timeLabel, isRead } = notification
const [firstUser] = users

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is cool - we don't need otherUsers anymore!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah realized that couldn't be relied on since we only pull 8 users max, so need the ids from the actual notif to know the true number of users

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wait but should it be const otherUsersCount = userIds.length - 1 below? Won't this double count the first user?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup nice catch

@dylanjeffers dylanjeffers merged commit 72a4025 into main May 13, 2022
@dylanjeffers dylanjeffers deleted the dj-pay-186-desktop-notification-qa branch May 13, 2022 05:49
@sliptype sliptype mentioned this pull request May 13, 2022
dylanjeffers added a commit that referenced this pull request May 18, 2022
raymondjacobson pushed a commit that referenced this pull request May 19, 2022
@AudiusProject AudiusProject deleted a comment from linear Bot Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants