expo-splash-screen 0.29.1 → 0.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/splashscreen/SplashScreenModule.kt +16 -0
- package/build/SplashScreen.types.d.ts +2 -0
- package/build/SplashScreen.types.d.ts.map +1 -1
- package/build/SplashScreen.types.js.map +1 -1
- package/build/index.native.d.ts +1 -18
- package/build/index.native.d.ts.map +1 -1
- package/build/index.native.js +6 -51
- package/build/index.native.js.map +1 -1
- package/ios/SplashScreenModule.swift +20 -4
- package/package.json +3 -3
- package/src/SplashScreen.types.ts +4 -0
- package/src/index.native.ts +7 -57
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.29.3 — 2024-11-06
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 0.29.2 — 2024-11-05
|
|
18
|
+
|
|
19
|
+
### 💡 Others
|
|
20
|
+
|
|
21
|
+
- Migrate internal logic used by router from JS to native ([#32610](https://github.com/expo/expo/pull/32610) by [@brentvatne](https://github.com/brentvatne))
|
|
22
|
+
|
|
13
23
|
## 0.29.1 — 2024-10-31
|
|
14
24
|
|
|
15
25
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
group = 'host.exp.exponent'
|
|
4
|
-
version = '0.29.
|
|
4
|
+
version = '0.29.3'
|
|
5
5
|
|
|
6
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
7
7
|
apply from: expoModulesCorePlugin
|
|
@@ -14,7 +14,7 @@ android {
|
|
|
14
14
|
namespace "expo.modules.splashscreen"
|
|
15
15
|
defaultConfig {
|
|
16
16
|
versionCode 17
|
|
17
|
-
versionName '0.29.
|
|
17
|
+
versionName '0.29.3'
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -15,10 +15,20 @@ class SplashScreenOptions : Record {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
class SplashScreenModule : Module() {
|
|
18
|
+
private var userControlledAutoHideEnabled: Boolean = false
|
|
19
|
+
|
|
18
20
|
override fun definition() = ModuleDefinition {
|
|
19
21
|
Name("ExpoSplashScreen")
|
|
20
22
|
|
|
21
23
|
AsyncFunction<Unit>("preventAutoHideAsync") {
|
|
24
|
+
// The user has manually invoked prevent autohide, this is used to allow libraries
|
|
25
|
+
// such as expo-router to know whether it's safe to hide or if they should wait for
|
|
26
|
+
// the user to do it.
|
|
27
|
+
userControlledAutoHideEnabled = true
|
|
28
|
+
SplashScreenManager.preventAutoHideCalled = true
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
AsyncFunction<Unit>("internalPreventAutoHideAsync") {
|
|
22
32
|
SplashScreenManager.preventAutoHideCalled = true
|
|
23
33
|
}
|
|
24
34
|
|
|
@@ -38,6 +48,12 @@ class SplashScreenModule : Module() {
|
|
|
38
48
|
SplashScreenManager.hide()
|
|
39
49
|
}
|
|
40
50
|
|
|
51
|
+
AsyncFunction("internalMaybeHideAsync") {
|
|
52
|
+
if (!userControlledAutoHideEnabled) {
|
|
53
|
+
SplashScreenManager.hide()
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
41
57
|
OnDestroy {
|
|
42
58
|
SplashScreenManager.unregisterContentAppearedListener()
|
|
43
59
|
}
|
|
@@ -17,5 +17,7 @@ export interface SplashScreenNativeModule extends NativeModule {
|
|
|
17
17
|
preventAutoHideAsync: () => Promise<boolean>;
|
|
18
18
|
hide: () => void;
|
|
19
19
|
hideAsync: () => Promise<void>;
|
|
20
|
+
_internal_maybeHideAsync: () => Promise<void>;
|
|
21
|
+
_internal_preventAutoHideAsync: () => Promise<boolean>;
|
|
20
22
|
}
|
|
21
23
|
//# sourceMappingURL=SplashScreen.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplashScreen.types.d.ts","sourceRoot":"","sources":["../src/SplashScreen.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,UAAU,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnD,oBAAoB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"SplashScreen.types.d.ts","sourceRoot":"","sources":["../src/SplashScreen.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,UAAU,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnD,oBAAoB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/B,wBAAwB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C,8BAA8B,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplashScreen.types.js","sourceRoot":"","sources":["../src/SplashScreen.types.ts"],"names":[],"mappings":"","sourcesContent":["import { NativeModule } from 'expo-modules-core/types';\n\nexport type SplashScreenOptions = {\n /**\n * The duration of the fade out animation in milliseconds.\n * @default 400\n */\n duration?: number;\n /**\n * Whether to hide the splash screen with a fade out animation.\n * @ios\n * @default false\n */\n fade?: boolean;\n};\n\nexport interface SplashScreenNativeModule extends NativeModule {\n setOptions: (options: SplashScreenOptions) => void;\n preventAutoHideAsync: () => Promise<boolean>;\n hide: () => void;\n hideAsync: () => Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SplashScreen.types.js","sourceRoot":"","sources":["../src/SplashScreen.types.ts"],"names":[],"mappings":"","sourcesContent":["import { NativeModule } from 'expo-modules-core/types';\n\nexport type SplashScreenOptions = {\n /**\n * The duration of the fade out animation in milliseconds.\n * @default 400\n */\n duration?: number;\n /**\n * Whether to hide the splash screen with a fade out animation.\n * @ios\n * @default false\n */\n fade?: boolean;\n};\n\nexport interface SplashScreenNativeModule extends NativeModule {\n setOptions: (options: SplashScreenOptions) => void;\n preventAutoHideAsync: () => Promise<boolean>;\n hide: () => void;\n hideAsync: () => Promise<void>;\n // @private\n _internal_maybeHideAsync: () => Promise<void>;\n // @private\n _internal_preventAutoHideAsync: () => Promise<boolean>;\n}\n"]}
|
package/build/index.native.d.ts
CHANGED
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
import { SplashScreenOptions } from './SplashScreen.types';
|
|
2
|
-
/**
|
|
3
|
-
* Expo Router uses this internal method to ensure that we can detect if the user
|
|
4
|
-
* has explicitly opted into preventing the splash screen from hiding. This means
|
|
5
|
-
* they will also explicitly hide it. If they don't, we will hide it for them after
|
|
6
|
-
* the navigation render completes.
|
|
7
|
-
*
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
export declare function _internal_preventAutoHideAsync(): Promise<boolean>;
|
|
11
|
-
/**
|
|
12
|
-
* Used for Expo libraries to attempt hiding the splash screen after they've completed their work.
|
|
13
|
-
* If the user has explicitly opted into preventing the splash screen from hiding, we should not
|
|
14
|
-
* hide it for them. This is often used for animated splash screens.
|
|
15
|
-
*
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
export declare const _internal_maybeHideAsync: () => void;
|
|
19
2
|
export declare function setOptions(options: SplashScreenOptions): void;
|
|
20
3
|
export declare function hide(): void;
|
|
21
4
|
export declare function hideAsync(): Promise<void>;
|
|
22
|
-
export declare
|
|
5
|
+
export declare function preventAutoHideAsync(): Promise<boolean | undefined>;
|
|
23
6
|
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAA4B,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAA4B,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAIrF,wBAAgB,UAAU,CAAC,OAAO,EAAE,mBAAmB,QAMtD;AAED,wBAAgB,IAAI,SAMnB;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED,wBAAsB,oBAAoB,iCAMzC"}
|
package/build/index.native.js
CHANGED
|
@@ -1,50 +1,5 @@
|
|
|
1
1
|
import { requireOptionalNativeModule } from 'expo-modules-core';
|
|
2
2
|
const SplashModule = requireOptionalNativeModule('ExpoSplashScreen');
|
|
3
|
-
let _userControlledAutoHideEnabled = false;
|
|
4
|
-
let _preventAutoHideAsyncInvoked = false;
|
|
5
|
-
/**
|
|
6
|
-
* Expo Router uses this internal method to ensure that we can detect if the user
|
|
7
|
-
* has explicitly opted into preventing the splash screen from hiding. This means
|
|
8
|
-
* they will also explicitly hide it. If they don't, we will hide it for them after
|
|
9
|
-
* the navigation render completes.
|
|
10
|
-
*
|
|
11
|
-
* @private
|
|
12
|
-
*/
|
|
13
|
-
export async function _internal_preventAutoHideAsync() {
|
|
14
|
-
if (!SplashModule) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
// Memoize, this should only be called once.
|
|
18
|
-
if (_preventAutoHideAsyncInvoked) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
_preventAutoHideAsyncInvoked = true;
|
|
22
|
-
// Append error handling to ensure any uncaught exceptions result in the splash screen being hidden.
|
|
23
|
-
// This prevents the splash screen from floating over error screens.
|
|
24
|
-
if (ErrorUtils?.getGlobalHandler) {
|
|
25
|
-
const originalHandler = ErrorUtils.getGlobalHandler();
|
|
26
|
-
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
27
|
-
hide();
|
|
28
|
-
originalHandler(error, isFatal);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
return SplashModule.preventAutoHideAsync();
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Used for Expo libraries to attempt hiding the splash screen after they've completed their work.
|
|
35
|
-
* If the user has explicitly opted into preventing the splash screen from hiding, we should not
|
|
36
|
-
* hide it for them. This is often used for animated splash screens.
|
|
37
|
-
*
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
export const _internal_maybeHideAsync = () => {
|
|
41
|
-
// If the user has explicitly opted into preventing the splash screen from hiding,
|
|
42
|
-
// we should not hide it for them. This is often used for animated splash screens.
|
|
43
|
-
if (_userControlledAutoHideEnabled) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
hide();
|
|
47
|
-
};
|
|
48
3
|
export function setOptions(options) {
|
|
49
4
|
if (!SplashModule) {
|
|
50
5
|
return;
|
|
@@ -60,10 +15,10 @@ export function hide() {
|
|
|
60
15
|
export async function hideAsync() {
|
|
61
16
|
hide();
|
|
62
17
|
}
|
|
63
|
-
export
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return
|
|
68
|
-
}
|
|
18
|
+
export async function preventAutoHideAsync() {
|
|
19
|
+
if (!SplashModule) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
return SplashModule.preventAutoHideAsync();
|
|
23
|
+
}
|
|
69
24
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAIhE,MAAM,YAAY,GAAG,2BAA2B,CAA2B,kBAAkB,CAAC,CAAC;AAE/F,
|
|
1
|
+
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAIhE,MAAM,YAAY,GAAG,2BAA2B,CAA2B,kBAAkB,CAAC,CAAC;AAE/F,MAAM,UAAU,UAAU,CAAC,OAA4B;IACrD,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,IAAI;IAClB,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,YAAY,CAAC,IAAI,EAAE,CAAC;AACtB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,IAAI,EAAE,CAAC;AACT,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,OAAO,YAAY,CAAC,oBAAoB,EAAE,CAAC;AAC7C,CAAC","sourcesContent":["import { requireOptionalNativeModule } from 'expo-modules-core';\n\nimport { SplashScreenNativeModule, SplashScreenOptions } from './SplashScreen.types';\n\nconst SplashModule = requireOptionalNativeModule<SplashScreenNativeModule>('ExpoSplashScreen');\n\nexport function setOptions(options: SplashScreenOptions) {\n if (!SplashModule) {\n return;\n }\n\n SplashModule.setOptions(options);\n}\n\nexport function hide() {\n if (!SplashModule) {\n return;\n }\n\n SplashModule.hide();\n}\n\nexport async function hideAsync(): Promise<void> {\n hide();\n}\n\nexport async function preventAutoHideAsync() {\n if (!SplashModule) {\n return;\n }\n\n return SplashModule.preventAutoHideAsync();\n}\n"]}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import ExpoModulesCore
|
|
2
2
|
|
|
3
3
|
public class SplashScreenModule: Module {
|
|
4
|
+
var userControlledAutoHideEnabled = false
|
|
5
|
+
|
|
4
6
|
public func definition() -> ModuleDefinition {
|
|
5
7
|
Name("ExpoSplashScreen")
|
|
6
8
|
|
|
7
|
-
AsyncFunction("preventAutoHideAsync") {
|
|
8
|
-
SplashScreenManager.shared.preventAutoHideCalled = true
|
|
9
|
-
}
|
|
10
|
-
|
|
11
9
|
Function("setOptions") { (options: SplashScreenOptions) in
|
|
12
10
|
SplashScreenManager.shared.setOptions(options: options)
|
|
13
11
|
}
|
|
@@ -20,6 +18,24 @@ public class SplashScreenModule: Module {
|
|
|
20
18
|
SplashScreenManager.shared.hide()
|
|
21
19
|
}
|
|
22
20
|
|
|
21
|
+
AsyncFunction("internalMaybeHideAsync") {
|
|
22
|
+
if !userControlledAutoHideEnabled {
|
|
23
|
+
SplashScreenManager.shared.hide()
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
AsyncFunction("preventAutoHideAsync") {
|
|
28
|
+
// The user has manually invoked prevent autohide, this is used to allow libraries
|
|
29
|
+
// such as expo-router to know whether it's safe to hide or if they should wait for
|
|
30
|
+
// the user to do it.
|
|
31
|
+
userControlledAutoHideEnabled = true
|
|
32
|
+
SplashScreenManager.shared.preventAutoHideCalled = true
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
AsyncFunction("internalPreventAutoHideAsync") {
|
|
36
|
+
SplashScreenManager.shared.preventAutoHideCalled = true
|
|
37
|
+
}
|
|
38
|
+
|
|
23
39
|
OnDestroy {
|
|
24
40
|
SplashScreenManager.shared.removeObservers()
|
|
25
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-splash-screen",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.3",
|
|
4
4
|
"description": "Provides a module to allow keeping the native Splash Screen visible until you choose to hide it.",
|
|
5
5
|
"main": "build",
|
|
6
6
|
"types": "build",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/splash-screen/",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@expo/prebuild-config": "8.0.
|
|
37
|
+
"@expo/prebuild-config": "8.0.9"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"expo-module-scripts": "^4.0.0"
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"expo": "*"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "d7775d436fab9d9601c193dfe2cc65a2949ef2ed"
|
|
46
46
|
}
|
|
@@ -19,4 +19,8 @@ export interface SplashScreenNativeModule extends NativeModule {
|
|
|
19
19
|
preventAutoHideAsync: () => Promise<boolean>;
|
|
20
20
|
hide: () => void;
|
|
21
21
|
hideAsync: () => Promise<void>;
|
|
22
|
+
// @private
|
|
23
|
+
_internal_maybeHideAsync: () => Promise<void>;
|
|
24
|
+
// @private
|
|
25
|
+
_internal_preventAutoHideAsync: () => Promise<boolean>;
|
|
22
26
|
}
|
package/src/index.native.ts
CHANGED
|
@@ -4,57 +4,6 @@ import { SplashScreenNativeModule, SplashScreenOptions } from './SplashScreen.ty
|
|
|
4
4
|
|
|
5
5
|
const SplashModule = requireOptionalNativeModule<SplashScreenNativeModule>('ExpoSplashScreen');
|
|
6
6
|
|
|
7
|
-
let _userControlledAutoHideEnabled = false;
|
|
8
|
-
let _preventAutoHideAsyncInvoked = false;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Expo Router uses this internal method to ensure that we can detect if the user
|
|
12
|
-
* has explicitly opted into preventing the splash screen from hiding. This means
|
|
13
|
-
* they will also explicitly hide it. If they don't, we will hide it for them after
|
|
14
|
-
* the navigation render completes.
|
|
15
|
-
*
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
export async function _internal_preventAutoHideAsync(): Promise<boolean> {
|
|
19
|
-
if (!SplashModule) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Memoize, this should only be called once.
|
|
24
|
-
if (_preventAutoHideAsyncInvoked) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
_preventAutoHideAsyncInvoked = true;
|
|
28
|
-
|
|
29
|
-
// Append error handling to ensure any uncaught exceptions result in the splash screen being hidden.
|
|
30
|
-
// This prevents the splash screen from floating over error screens.
|
|
31
|
-
if (ErrorUtils?.getGlobalHandler) {
|
|
32
|
-
const originalHandler = ErrorUtils.getGlobalHandler();
|
|
33
|
-
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
34
|
-
hide();
|
|
35
|
-
originalHandler(error, isFatal);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return SplashModule.preventAutoHideAsync();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Used for Expo libraries to attempt hiding the splash screen after they've completed their work.
|
|
44
|
-
* If the user has explicitly opted into preventing the splash screen from hiding, we should not
|
|
45
|
-
* hide it for them. This is often used for animated splash screens.
|
|
46
|
-
*
|
|
47
|
-
* @private
|
|
48
|
-
*/
|
|
49
|
-
export const _internal_maybeHideAsync = () => {
|
|
50
|
-
// If the user has explicitly opted into preventing the splash screen from hiding,
|
|
51
|
-
// we should not hide it for them. This is often used for animated splash screens.
|
|
52
|
-
if (_userControlledAutoHideEnabled) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
hide();
|
|
56
|
-
};
|
|
57
|
-
|
|
58
7
|
export function setOptions(options: SplashScreenOptions) {
|
|
59
8
|
if (!SplashModule) {
|
|
60
9
|
return;
|
|
@@ -75,9 +24,10 @@ export async function hideAsync(): Promise<void> {
|
|
|
75
24
|
hide();
|
|
76
25
|
}
|
|
77
26
|
|
|
78
|
-
export
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
27
|
+
export async function preventAutoHideAsync() {
|
|
28
|
+
if (!SplashModule) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return SplashModule.preventAutoHideAsync();
|
|
33
|
+
}
|