Fix android not loading

This commit is contained in:
koalasat
2025-05-29 23:42:31 +02:00
parent 66cee50a6c
commit b35d8ba861
2 changed files with 3 additions and 2 deletions

View File

@ -82,9 +82,9 @@ const EncryptedChat: React.FC<Props> = ({
const wrappedEvent = nip17.wrapEvent(slot?.nostrSecKey, recipient, content); const wrappedEvent = nip17.wrapEvent(slot?.nostrSecKey, recipient, content);
const oneMonth = 2419200; const oneMonth = 2419200;
wrappedEvent.tags.push(['expiration', (wrappedEvent.created_at + oneMonth).toString()]); wrappedEvent.tags.push(['expiration', (wrappedEvent.created_at + oneMonth).toString()]);
federation.roboPool.sendEvent(wrappedEvent); federation.roboPool.sendEvent(wrappedEvent);
} catch (error) { } catch (error) {

View File

@ -226,6 +226,7 @@ export const AppContextProvider = ({ children }: AppContextProviderProps): React
}, [settings.fontSize, settings.mode, settings.lightQRs]); }, [settings.fontSize, settings.mode, settings.lightQRs]);
useEffect(() => { useEffect(() => {
setSettings(getSettings());
void i18n.changeLanguage(settings.language); void i18n.changeLanguage(settings.language);
window.addEventListener('torStatus', (event) => { window.addEventListener('torStatus', (event) => {
// Trick to improve UX on Android webview: delay the "Connected to TOR" status by 5 secs to avoid long waits on the first request. // Trick to improve UX on Android webview: delay the "Connected to TOR" status by 5 secs to avoid long waits on the first request.