Skip to content

Commit

Permalink
#1352 Displaying & counting only the direct subscriptions notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoraboeuf committed Sep 17, 2024
1 parent 43d4acb commit 2de8feb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default function BuildContentNotifications({build}) {
type: 'BUILD',
id: build.id,
}}
sourceId="entity-subscription"
/>
</GridCell>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default function EntityNotificationsBadge({entityType, entityId, href}) {
notificationRecords(
eventEntityType: $entityType,
eventEntityId: $entityId,
sourceId: "entity-subscription",
) {
pageItems {
result {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import NotificationRecordResultLink from "@components/extension/notifications/No

const {Column} = Table

export default function NotificationRecordingsTable({entity}) {
export default function NotificationRecordingsTable({entity, sourceId}) {

const client = useGraphQLClient()

Expand Down Expand Up @@ -48,6 +48,7 @@ export default function NotificationRecordingsTable({entity}) {
$resultType: NotificationResultType,
$eventEntityType: ProjectEntityType,
$eventEntityId: Int,
$sourceId: String,
) {
notificationRecords(
offset: $offset,
Expand All @@ -56,6 +57,7 @@ export default function NotificationRecordingsTable({entity}) {
resultType: $resultType,
eventEntityType: $eventEntityType,
eventEntityId: $eventEntityId,
sourceId: $sourceId,
) {
pageInfo {
nextPage {
Expand All @@ -75,6 +77,7 @@ export default function NotificationRecordingsTable({entity}) {
size: pagination.size,
eventEntityType: entity?.type,
eventEntityId: entity?.id,
sourceId: sourceId,
...filter,
}
).then(data => {
Expand All @@ -88,7 +91,7 @@ export default function NotificationRecordingsTable({entity}) {
setLoading(false)
})
}
}, [client, pagination, filter]);
}, [client, pagination, filter, sourceId, entity]);

const onTableChange = (_, filters) => {
setFilter({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export default function PromotionRunView({id}) {
type: 'PROMOTION_RUN',
id: run.id,
}}
sourceId="entity-subscription"
/>
</PageSection>
</Space>
Expand Down

0 comments on commit 2de8feb

Please sign in to comment.