diff --git a/src/App.tsx b/src/App.tsx
index 4102bd2..a963d45 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -2,16 +2,18 @@
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
import BinaryClockScreen from './pages/BinaryClockScreen';
-import BootSplash from 'react-native-bootsplash';
import { KeepAwake } from '@thehale/react-native-keep-awake';
+import { useState } from 'react';
import { StatusBar } from 'react-native';
+import { init } from './init';
-const App = () => {
- BootSplash.hide({fade: true});
- return (
+function App() {
+ const [initialized, setInitialized] = useState(false);
+ init().then(() => setInitialized(true))
+ return initialized && (
<>
@@ -20,4 +22,4 @@ const App = () => {
);
};
-export default App;
\ No newline at end of file
+export default App;
diff --git a/src/init.js b/src/init.js
new file mode 100644
index 0000000..22d98e4
--- /dev/null
+++ b/src/init.js
@@ -0,0 +1,13 @@
+// Copyright (c) 2025 Joseph Hale
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+
+import { initSettings } from './settings/useSettings';
+import BootSplash from 'react-native-bootsplash';
+
+export async function init() {
+ await initSettings();
+ BootSplash.hide({ fade: true }) // Hide the splash screen until after all other initialization is complete
+}
\ No newline at end of file