Cleaning up promise returns with void
This commit is contained in:
parent
356f604323
commit
299bab4e6a
@ -10,7 +10,7 @@ import themes from '@/assets/themes'
|
|||||||
import log from "@/util/log"
|
import log from "@/util/log"
|
||||||
|
|
||||||
// Prevent the splash screen from auto-hiding before asset loading is complete.
|
// Prevent the splash screen from auto-hiding before asset loading is complete.
|
||||||
SplashScreen.preventAutoHideAsync();
|
void SplashScreen.preventAutoHideAsync();
|
||||||
|
|
||||||
export default function RootLayout() {
|
export default function RootLayout() {
|
||||||
return (
|
return (
|
||||||
@ -34,7 +34,7 @@ function InnerRootLayout() {
|
|||||||
});
|
});
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
SplashScreen.hideAsync();
|
void SplashScreen.hideAsync();
|
||||||
}
|
}
|
||||||
}, [loaded]);
|
}, [loaded]);
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
loadUserData();
|
void loadUserData();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -90,14 +90,14 @@ export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
saveUserData();
|
void saveUserData();
|
||||||
}, [userDataChanged]);
|
}, [userDataChanged]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleAppStateChange = (nextAppState: string) => {
|
const handleAppStateChange = (nextAppState: string) => {
|
||||||
if (appState.match(/inactive|background/) && nextAppState === "active") {
|
if (appState.match(/inactive|background/) && nextAppState === "active") {
|
||||||
if (!isLoading) {
|
if (!isLoading) {
|
||||||
fetchCurrentStatus();
|
void fetchCurrentStatus();
|
||||||
} else {
|
} else {
|
||||||
log.debug("Waiting for loading to complete before fetching status...");
|
log.debug("Waiting for loading to complete before fetching status...");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user