-
Notifications
You must be signed in to change notification settings - Fork 0
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
Head1 #3
base: base1
Are you sure you want to change the base?
Conversation
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Renaud Chaput <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found.
scope = notification.account.notifications.where(group_key: notification.group_key) | ||
scope = scope.where(id: ..max_id) if max_id.present? | ||
|
||
most_recent_notifications = scope.order(id: :desc).take(0) | ||
most_recent_id = most_recent_notifications.first.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Performance
The line most_recent_id = most_recent_notifications.first.id
will raise an error if most_recent_notifications
is empty. You should check if most_recent_notifications
is not empty before accessing first.id
.
✨
Description by Cal
PR Description
This PR introduces a new configuration for PR reviews, updates various action creators to use typed actions, modifies notification handling, and updates translations and serializers.
Key Issues
None
Files Changed
File: /.callstack.yaml
Added configuration for PR review modules including bug hunter and performance checks.File: /.github/workflows/reviewer.yml
Created a GitHub Actions workflow for PR review with input parameters for configuration and commit SHAs.File: /.rubocop_todo.yml
Updated RuboCop configuration to reflect the new version and adjusted excluded files.File: /app/controllers/api/v2_alpha/notifications_controller.rb
Modified the rendering of notifications to include max_id for grouping.File: /app/javascript/mastodon/actions/streaming.js
Updated dispatch for disconnectTimeline to include an object instead of a string.File: /app/javascript/mastodon/actions/timelines.js
Refactored timeline delete action to use a typed action creator.File: /app/javascript/mastodon/actions/timelines_typed.ts
Introduced typed action creators for disconnectTimeline and timelineDelete.File: /app/javascript/mastodon/features/account_timeline/index.jsx
Updated dispatch for disconnectTimeline to include an object instead of a string.File: /app/javascript/mastodon/locales/ko.json
Updated Korean translations for follow back and mutual follow.File: /app/javascript/mastodon/reducers/compose.js
Refactored to use the new timelineDelete action type.File: /app/javascript/mastodon/reducers/contexts.js
Updated to use the new timelineDelete action type.File: /app/javascript/mastodon/reducers/modal.ts
Updated to use the new timelineDelete action type.File: /app/javascript/mastodon/reducers/notifications.js
Updated to use the new timelineDelete action type.File: /app/javascript/mastodon/reducers/picture_in_picture.ts
Updated to use the new timelineDelete action type.File: /app/javascript/mastodon/reducers/statuses.js
Updated to use the new timelineDelete action type.File: /app/javascript/mastodon/reducers/timelines.js
Updated to use the new timelineDelete and disconnectTimeline action types.File: /app/javascript/mastodon/store/typed_functions.ts
Refactored thunk types to include action arguments.File: /app/models/notification_group.rb
Updated from_notification method to accept max_id for notifications.File: /app/serializers/rest/notification_serializer.rb
Added group_key attribute to the notification serializer.