From b29f7ec4d56617ec4e89bf6ee915d17ee94fb110 Mon Sep 17 00:00:00 2001 From: Chad Curtis Date: Mon, 20 Apr 2026 19:12:06 -0500 Subject: [PATCH] Fix white status bar text on light theme (iOS) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit App.tsx had a useEffect that unconditionally set SystemBarsStyle.Dark (white icons) on mount, overriding the theme-aware logic in main.tsx that had already set the correct style. On light themes this produced white-on-white status bar text. Remove the hardcoded override entirely — main.tsx handles initial detection and MutationObservers cover all subsequent theme changes. --- src/App.tsx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index c245f1d0..d7f2bab1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,12 +1,10 @@ // NOTE: This file should normally not be modified unless you are adding a new provider. // To add new routes, edit the AppRouter.tsx file. -import { Capacitor, SystemBars, SystemBarsStyle } from "@capacitor/core"; import { NostrLoginProvider } from "@nostrify/react/login"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { InferSeoMetaPlugin } from "@unhead/addons"; import { createHead, UnheadProvider } from "@unhead/react/client"; -import { useEffect } from "react"; import { AppProvider } from "@/components/AppProvider"; import { DMProvider, type DMConfig } from "@/components/DMProvider"; import { InitialSyncGate } from "@/components/InitialSyncGate"; @@ -191,17 +189,6 @@ const defaultConfig: AppConfig = { export function App() { useNsecPasteGuard(); - useEffect(() => { - // Initialize system bars for mobile apps. - // On Android 16+ (API 36), edge-to-edge is enforced by the OS so - // setOverlaysWebView / setBackgroundColor no longer work. The new - // SystemBars API (bundled with @capacitor/core 8+) is the replacement. - if (Capacitor.isNativePlatform()) { - SystemBars.setStyle({ style: SystemBarsStyle.Dark }).catch(() => { - // SystemBars may not be available on all platforms - }); - } - }, []); return (