Commit 93ddf29 1 parent 0ffcab9 commit 93ddf29 Copy full SHA for 93ddf29
File tree 1 file changed +10
-1
lines changed
packages/nextcloud/lib/src/helpers
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ class VersionCheck {
11
11
required this .versions,
12
12
required this .minimumVersion,
13
13
required int ? maximumMajor,
14
- }) : maximumMajor = maximumMajor ?? minimumVersion.major;
14
+ bool ? isSupportedOverride,
15
+ }) : maximumMajor = maximumMajor ?? minimumVersion.major,
16
+ _isSupportedOverride = isSupportedOverride;
15
17
16
18
/// Current version of the app.
17
19
final List <Version >? versions;
@@ -22,11 +24,18 @@ class VersionCheck {
22
24
/// Maximum major version of the app.
23
25
late final int maximumMajor;
24
26
27
+ /// Overrides the check if the current version is supported.
28
+ final bool ? _isSupportedOverride;
29
+
25
30
/// Whether the [versions] is allowed by the [minimumVersion] and [maximumMajor] .
26
31
///
27
32
/// If [versions] is `null` or empty it is assumed that the app is supported.
28
33
/// Only one of the [versions] has to be supported to return `true` .
29
34
bool get isSupported {
35
+ if (_isSupportedOverride != null ) {
36
+ return _isSupportedOverride! ;
37
+ }
38
+
30
39
if (versions == null || versions! .isEmpty) {
31
40
return true ;
32
41
}
You can’t perform that action at this time.
0 commit comments