You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense for the settings.aprilFoolsMode check to be inside IsAprilFirst()? Like if the setting is true, do the check but if it's false, always have IsAprilFirst() return false.
Maybe I'm not understanding this logic but it seems to me that we'll check jobs if April fools mode is false OR if it's not April first. So it doesn't matter what the setting is because it will always not check jobs on April first.
The reason will be displayed to describe this comment to others. Learn more.
Expected Behaviour:
If April Fools Mode is disabled (!settings.aprilFoolsMode returns true - which is the case when settings.aprilFoolsMode = false) -
or if it is enabled (!settings.aprilFoolsMode returns false) and it is not April 1st !IsAprilFirst(),
check Jobs.
Otherwise do nothing.
So the logic itself is correct. Ofc you could negate everything settings.aprilFoolsMode && IsAprilFirst() and then do nothing.
You can also move the settings.aprilFoolsMode check to the function and rename it AprilFoolsCheck() or something.
431fde0
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.
Would it make more sense for the
settings.aprilFoolsMode
check to be insideIsAprilFirst()
? Like if the setting is true, do the check but if it's false, always haveIsAprilFirst()
return false.Maybe I'm not understanding this logic but it seems to me that we'll check jobs if April fools mode is false OR if it's not April first. So it doesn't matter what the setting is because it will always not check jobs on April first.
431fde0
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.
Or we put CheckJobs in the
else
since we want that to be the default and log April Fools Mode only whensettings.aprilFoolsMode & IsAprilFirst()
431fde0
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.
Expected Behaviour:
If April Fools Mode is disabled (
!settings.aprilFoolsMode
returns true - which is the case whensettings.aprilFoolsMode = false
) -or if it is enabled (
!settings.aprilFoolsMode
returns false) and it is not April 1st!IsAprilFirst()
,check Jobs.
Otherwise do nothing.
So the logic itself is correct. Ofc you could negate everything
settings.aprilFoolsMode && IsAprilFirst()
and then do nothing.You can also move the
settings.aprilFoolsMode
check to the function and rename itAprilFoolsCheck()
or something.