File tree 8 files changed +34
-1
lines changed
8 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ import NotificationController, {
55
55
NotificationControllerDelegate ,
56
56
NotificationSender ,
57
57
} from './notification-controller' ;
58
+ import { isMacOs13OrNewer } from './platform-version' ;
58
59
import * as problemReport from './problem-report' ;
59
60
import { resolveBin } from './proc' ;
60
61
import ReconnectionBackoff from './reconnection-backoff' ;
@@ -765,6 +766,7 @@ class ApplicationMain
765
766
forceShowChanges : CommandLineOptions . showChanges . match ,
766
767
navigationHistory : this . navigationHistory ,
767
768
currentApiAccessMethod : this . currentApiAccessMethod ,
769
+ isMacOs13OrNewer : isMacOs13OrNewer ( ) ,
768
770
} ) ) ;
769
771
770
772
IpcMainEventChannel . map . handleGetData ( async ( ) => ( {
Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ export function isMacOs11OrNewer() {
5
5
return process . platform === 'darwin' && major >= 20 ;
6
6
}
7
7
8
+ export function isMacOs13OrNewer ( ) {
9
+ const [ major ] = parseVersion ( ) ;
10
+ return process . platform === 'darwin' && major >= 22 ;
11
+ }
12
+
8
13
// Windows 11 has the internal version 10.0.22000+.
9
14
export function isWindows11OrNewer ( ) {
10
15
const [ major , minor , patch ] = parseVersion ( ) ;
Original file line number Diff line number Diff line change @@ -245,6 +245,7 @@ export default class AppRenderer {
245
245
this . storeAutoStart ( initialState . autoStart ) ;
246
246
this . setChangelog ( initialState . changelog , initialState . forceShowChanges ) ;
247
247
this . setCurrentApiAccessMethod ( initialState . currentApiAccessMethod ) ;
248
+ this . reduxActions . userInterface . setIsMacOs13OrNewer ( initialState . isMacOs13OrNewer ) ;
248
249
249
250
if ( initialState . macOsScrollbarVisibility !== undefined ) {
250
251
this . reduxActions . userInterface . setMacOsScrollbarVisibility (
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export default function Support() {
26
26
27
27
const loginState = useSelector ( ( state ) => state . account . status ) ;
28
28
const connectedToDaemon = useSelector ( ( state ) => state . userInterface . connectedToDaemon ) ;
29
+ const isMacOs13OrNewer = useSelector ( ( state ) => state . userInterface . isMacOs13OrNewer ) ;
29
30
30
31
const showSubSettings = loginState . type === 'ok' && connectedToDaemon ;
31
32
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ export interface ISetSelectLocationView {
56
56
selectLocationView : LocationType ;
57
57
}
58
58
59
+ export interface ISetIsMacOs13OrNewer {
60
+ type : 'SET_IS_MACOS13_OR_NEWER' ;
61
+ isMacOs13OrNewer : boolean ;
62
+ }
63
+
59
64
export type UserInterfaceAction =
60
65
| IUpdateLocaleAction
61
66
| IUpdateWindowArrowPositionAction
@@ -67,7 +72,8 @@ export type UserInterfaceAction =
67
72
| ISetChangelog
68
73
| ISetForceShowChanges
69
74
| ISetIsPerformingPostUpgrade
70
- | ISetSelectLocationView ;
75
+ | ISetSelectLocationView
76
+ | ISetIsMacOs13OrNewer ;
71
77
72
78
function updateLocale ( locale : string ) : IUpdateLocaleAction {
73
79
return {
@@ -147,6 +153,13 @@ function setSelectLocationView(selectLocationView: LocationType): ISetSelectLoca
147
153
} ;
148
154
}
149
155
156
+ function setIsMacOs13OrNewer ( isMacOs13OrNewer : boolean ) : ISetIsMacOs13OrNewer {
157
+ return {
158
+ type : 'SET_IS_MACOS13_OR_NEWER' ,
159
+ isMacOs13OrNewer,
160
+ } ;
161
+ }
162
+
150
163
export default {
151
164
updateLocale,
152
165
updateWindowArrowPosition,
@@ -159,4 +172,5 @@ export default {
159
172
setForceShowChanges,
160
173
setIsPerformingPostUpgrade,
161
174
setSelectLocationView,
175
+ setIsMacOs13OrNewer,
162
176
} ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export interface IUserInterfaceReduxState {
15
15
forceShowChanges : boolean ;
16
16
isPerformingPostUpgrade : boolean ;
17
17
selectLocationView : LocationType ;
18
+ isMacOs13OrNewer : boolean ;
18
19
}
19
20
20
21
const initialState : IUserInterfaceReduxState = {
@@ -28,6 +29,7 @@ const initialState: IUserInterfaceReduxState = {
28
29
forceShowChanges : false ,
29
30
isPerformingPostUpgrade : false ,
30
31
selectLocationView : LocationType . exit ,
32
+ isMacOs13OrNewer : true ,
31
33
} ;
32
34
33
35
export default function (
@@ -80,6 +82,12 @@ export default function (
80
82
selectLocationView : action . selectLocationView ,
81
83
} ;
82
84
85
+ case 'SET_IS_MACOS13_OR_NEWER' :
86
+ return {
87
+ ...state ,
88
+ isMacOs13OrNewer : action . isMacOs13OrNewer ,
89
+ } ;
90
+
83
91
default :
84
92
return state ;
85
93
}
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export interface IAppStateSnapshot {
77
77
forceShowChanges : boolean ;
78
78
navigationHistory ?: IHistoryObject ;
79
79
currentApiAccessMethod ?: AccessMethodSetting ;
80
+ isMacOs13OrNewer : boolean ;
80
81
}
81
82
82
83
// The different types of requests are:
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ class ApplicationMain {
174
174
forceShowChanges : false ,
175
175
navigationHistory : undefined ,
176
176
scrollPositions : { } ,
177
+ isMacOs13OrNewer : true ,
177
178
} ) ) ;
178
179
179
180
IpcMainEventChannel . guiSettings . handleSetPreferredLocale ( ( locale ) => {
You can’t perform that action at this time.
0 commit comments