fix(app): preserve persisted theme styles after startup

Module-level style composites could materialize the temporary adaptive theme before persisted settings loaded. Keep Unistyles reads in render and guard against eager module-scope access.
This commit is contained in:
Mohamed Boudra
2026-07-18 17:45:02 +02:00
parent c0622a7046
commit e0e50c9a8e
31 changed files with 188 additions and 133 deletions
@@ -55,7 +55,7 @@ function ProviderUsageBody({
}) {
if (view.kind === "loading") {
return (
<View style={EMPTY_CARD_STYLE}>
<View style={[settingsStyles.card, styles.emptyCard]}>
<Text style={styles.emptyText}>{providerUsageCopy.loading}</Text>
</View>
);
@@ -73,7 +73,7 @@ function ProviderUsageBody({
if (view.payload.providers.length === 0) {
return (
<View style={EMPTY_CARD_STYLE}>
<View style={[settingsStyles.card, styles.emptyCard]}>
<Text style={styles.emptyText}>{providerUsageCopy.empty}</Text>
</View>
);
@@ -92,5 +92,3 @@ const styles = StyleSheet.create((theme) => ({
fontSize: theme.fontSize.sm,
},
}));
const EMPTY_CARD_STYLE = [settingsStyles.card, styles.emptyCard];