File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export function filterDetailedNotifications(
7070 }
7171
7272 passesFilters =
73- passesFilters && isNotificationStateVisible ( notification , settings ) ;
73+ passesFilters && passesStateFilter ( notification , settings ) ;
7474 }
7575
7676 return passesFilters ;
@@ -88,7 +88,7 @@ export function hasAnyFiltersSet(settings: SettingsState): boolean {
8888 ) ;
8989}
9090
91- function isNotificationStateVisible (
91+ function passesStateFilter (
9292 notification : Notification ,
9393 settings : SettingsState ,
9494) : boolean {
@@ -101,11 +101,11 @@ function isNotificationStateVisible(
101101 return true ;
102102}
103103
104- export function wouldStateBeHiddenByFilters (
104+ export function isStateFilteredOut (
105105 state : StateType ,
106106 settings : SettingsState ,
107107) : boolean {
108108 const notification = { subject : { state } } as Notification ;
109109
110- return ! isNotificationStateVisible ( notification , settings ) ;
110+ return ! passesStateFilter ( notification , settings ) ;
111111}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import {
2525 getPullRequestReviews ,
2626 getRelease ,
2727} from './api/client' ;
28- import { wouldStateBeHiddenByFilters } from './notifications/filters/filter' ;
28+ import { isStateFilteredOut } from './notifications/filters/filter' ;
2929
3030export async function getGitifySubjectDetails (
3131 notification : Notification ,
@@ -166,7 +166,7 @@ async function getGitifySubjectForDiscussion(
166166 }
167167
168168 // Return early if this notification would be hidden by filters
169- if ( wouldStateBeHiddenByFilters ( discussionState , settings ) ) {
169+ if ( isStateFilteredOut ( discussionState , settings ) ) {
170170 return null ;
171171 }
172172
@@ -225,7 +225,7 @@ async function getGitifySubjectForIssue(
225225 const issueState = issue . state_reason ?? issue . state ;
226226
227227 // Return early if this notification would be hidden by filters
228- if ( wouldStateBeHiddenByFilters ( issueState , settings ) ) {
228+ if ( isStateFilteredOut ( issueState , settings ) ) {
229229 return null ;
230230 }
231231
@@ -269,7 +269,7 @@ async function getGitifySubjectForPullRequest(
269269 let prCommentUser : User ;
270270
271271 // Return early if this notification would be hidden by filters
272- if ( wouldStateBeHiddenByFilters ( prState , settings ) ) {
272+ if ( isStateFilteredOut ( prState , settings ) ) {
273273 return null ;
274274 }
275275 if (
You can’t perform that action at this time.
0 commit comments