File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export type UserPreferencesState = {
1919 cardsSettings : Record < string , CardSettingsType >
2020 firstSeenDate : number
2121 userCustomCards : SupportedCardType [ ]
22- pauseTo : number
22+ pauseTo : number | "always"
2323}
2424
2525type UserPreferencesStoreActions = {
@@ -35,7 +35,7 @@ type UserPreferencesStoreActions = {
3535 markOnboardingAsCompleted : ( occupation : Omit < Occupation , 'icon' > | null ) => void
3636 setUserCustomCards : ( cards : SupportedCardType [ ] ) => void
3737 updateCardOrder : ( prevIndex : number , newIndex : number ) => void
38- setPauseTo : ( value : number ) => void
38+ setPauseTo : ( value : number | "always" ) => void
3939 isPauseModeActive : ( ) => boolean ;
4040}
4141
@@ -98,6 +98,9 @@ export const useUserPreferences = create(
9898 setPauseTo : ( value ) => set ( { pauseTo : value } ) ,
9999 isPauseModeActive : ( ) => {
100100 const pauseTo = get ( ) . pauseTo
101+ if ( pauseTo === "always" ) {
102+ return true ;
103+ }
101104 return Boolean ( pauseTo && pauseTo - new Date ( ) . getTime ( ) > 0 )
102105 }
103106 } ) ,
You can’t perform that action at this time.
0 commit comments