From 117358af4ddea39e71efd27c1b00d2db04845641 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Mon, 30 Dec 2024 13:46:20 +0530 Subject: [PATCH 1/5] fix: get theme from device --- app.json | 6 ++++-- app/_layout.tsx | 8 ++++++-- lib/state/appStore.ts | 6 +++--- package.json | 1 + yarn.lock | 13 +++++++++++++ 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/app.json b/app.json index 5d8fd3b..8fa1a88 100644 --- a/app.json +++ b/app.json @@ -50,7 +50,8 @@ }, "infoPlist": { "LSMinimumSystemVersion": "12.0" - } + }, + "userInterfaceStyle": "automatic" }, "android": { "package": "com.getalby.mobile", @@ -60,7 +61,8 @@ "backgroundImage": "./assets/adaptive-icon-bg.png", "monochromeImage": "./assets/monochromatic.png" }, - "permissions": ["android.permission.CAMERA"] + "permissions": ["android.permission.CAMERA"], + "userInterfaceStyle": "automatic" }, "extra": { "eas": { diff --git a/app/_layout.tsx b/app/_layout.tsx index e34d644..2b10fed 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -69,10 +69,14 @@ export default function RootLayout() { const loadTheme = React.useCallback((): Promise => { return new Promise((resolve) => { const theme = useAppStore.getState().theme; - setColorScheme(theme); + if (theme) { + setColorScheme(theme); + } else { + useAppStore.getState().setTheme(isDarkColorScheme ? "dark" : "light"); + } resolve(); }); - }, [setColorScheme]); + }, [isDarkColorScheme, setColorScheme]); React.useEffect(() => { const init = async () => { diff --git a/lib/state/appStore.ts b/lib/state/appStore.ts index ce227e0..1fee427 100644 --- a/lib/state/appStore.ts +++ b/lib/state/appStore.ts @@ -12,7 +12,7 @@ interface AppState { readonly addressBookEntries: AddressBookEntry[]; readonly isSecurityEnabled: boolean; readonly isOnboarded: boolean; - readonly theme: Theme; + readonly theme?: Theme; readonly balanceDisplayMode: BalanceDisplayMode; setUnlocked: (unlocked: boolean) => void; setTheme: (theme: Theme) => void; @@ -45,7 +45,7 @@ const isSecurityEnabledKey = "isSecurityEnabled"; export const lastActiveTimeKey = "lastActiveTime"; export type BalanceDisplayMode = "sats" | "fiat" | "hidden"; -export type Theme = "system" | "light" | "dark"; +export type Theme = "light" | "dark"; type Wallet = { name?: string; @@ -176,7 +176,7 @@ export const useAppStore = create()((set, get) => { const isSecurityEnabled = secureStorage.getItem(isSecurityEnabledKey) === "true"; - const theme = (secureStorage.getItem(themeKey) as Theme) || "system"; + const theme = (secureStorage.getItem(themeKey) as Theme) || null; const balanceDisplayMode = (secureStorage.getItem(balanceDisplayModeKey) as BalanceDisplayMode) || "sats"; diff --git a/package.json b/package.json index 402050f..fa0ff6c 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "expo-router": "~4.0.11", "expo-secure-store": "~14.0.0", "expo-status-bar": "~2.0.0", + "expo-system-ui": "~4.0.6", "lottie-react-native": "7.1.0", "message-port-polyfill": "^0.2.0", "nativewind": "^4.0.1", diff --git a/yarn.lock b/yarn.lock index 3ed274e..e962198 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1947,6 +1947,11 @@ resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.3.tgz#8d4de4a8671385c53b2d202ef0137632abcf747d" integrity sha512-Yrpmrh4IDEupUUM/dqVxhAN8QW1VEUR3Qrk2lzJC1jB2s46hDe0hrMP2vs12YJqlzshteOthjwXQlY0TgIzgbg== +"@react-native/normalize-colors@0.76.5": + version "0.76.5" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.5.tgz#a33560736311aefcf1d3cb594597befe81a9a53c" + integrity sha512-6QRLEok1r55gLqj+94mEWUENuU5A6wsr2OoXpyq/CgQ7THWowbHtru/kRGRr6o3AQXrVnZheR60JNgFcpNYIug== + "@react-native/virtualized-lists@0.76.3": version "0.76.3" resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.76.3.tgz#9865f9e3770c101476564dc2436018f82adfb4b3" @@ -4573,6 +4578,14 @@ expo-status-bar@~2.0.0: resolved "https://registry.yarnpkg.com/expo-status-bar/-/expo-status-bar-2.0.0.tgz#dd99adc2ace12a24c92718cd0f97b93347103393" integrity sha512-vxxdpvpNDMTEc5uTiIrbTvySKKUsOACmfl8OZuUdjNle05oGqwtq3v5YObwym/njSByjoyuZX8UpXBZnxvarwQ== +expo-system-ui@~4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/expo-system-ui/-/expo-system-ui-4.0.6.tgz#23d172e346dbe478f31e36019c2570242e7c0762" + integrity sha512-JWmw0aaNIB8YxA6bXgH6nClyledZaAG5VNzoRvmXT4+j3MY4waAHSSSdVV71bUgjchT/2KOAcibZ/EeosJONug== + dependencies: + "@react-native/normalize-colors" "0.76.5" + debug "^4.3.2" + expo@~52.0.14: version "52.0.14" resolved "https://registry.yarnpkg.com/expo/-/expo-52.0.14.tgz#e99a921dc5caff4b5b68fa96069ba7c3e64c4d17" From 2dd48822f19d54b26088fdf0fc8570cc3fb934b0 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Mon, 30 Dec 2024 16:05:54 +0530 Subject: [PATCH 2/5] fix: use splash screen config plugin --- app.json | 13 ++++++++----- app/_layout.tsx | 5 +++-- package.json | 1 + yarn.lock | 29 +++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/app.json b/app.json index 5d8fd3b..80a816b 100644 --- a/app.json +++ b/app.json @@ -7,14 +7,17 @@ "orientation": "portrait", "icon": "./assets/icon.png", "userInterfaceStyle": "automatic", - "splash": { - "image": "./assets/splash.png", - "resizeMode": "cover", - "backgroundColor": "#0B0930" - }, "newArchEnabled": true, "assetBundlePatterns": ["**/*"], "plugins": [ + [ + "expo-splash-screen", + { + "backgroundColor": "#0B0930", + "image": "./assets/icon.png", + "imageWidth": "150" + } + ], [ "expo-local-authentication", { diff --git a/app/_layout.tsx b/app/_layout.tsx index e34d644..528fceb 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -6,7 +6,8 @@ import { } from "@react-navigation/native"; import { PortalHost } from "@rn-primitives/portal"; import * as Font from "expo-font"; -import { Slot, SplashScreen } from "expo-router"; +import { Slot } from "expo-router"; +import * as SplashScreen from "expo-splash-screen"; import { StatusBar } from "expo-status-bar"; import { swrConfiguration } from "lib/swr"; import * as React from "react"; @@ -80,7 +81,7 @@ export default function RootLayout() { await Promise.all([loadTheme(), loadFonts(), checkBiometricStatus()]); } finally { setResourcesLoaded(true); - SplashScreen.hideAsync(); + SplashScreen.hide(); } }; diff --git a/package.json b/package.json index 402050f..207330e 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "expo-local-authentication": "~15.0.1", "expo-router": "~4.0.11", "expo-secure-store": "~14.0.0", + "expo-splash-screen": "^0.29.18", "expo-status-bar": "~2.0.0", "lottie-react-native": "7.1.0", "message-port-polyfill": "^0.2.0", diff --git a/yarn.lock b/yarn.lock index 3ed274e..072f278 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1200,6 +1200,23 @@ semver "^7.6.0" xml2js "0.6.0" +"@expo/prebuild-config@^8.0.23": + version "8.0.23" + resolved "https://registry.yarnpkg.com/@expo/prebuild-config/-/prebuild-config-8.0.23.tgz#2ec6d5464f35d308bdb94ba75b7e6aba0ebb507d" + integrity sha512-Zf01kFiN2PISmLb0DhIAJh76v3J2oYUKSjiAtGZLOH0HUz59by/qdyU4mGHWdeyRdCCrLUA21Rct2MBykvRMsg== + dependencies: + "@expo/config" "~10.0.4" + "@expo/config-plugins" "~9.0.10" + "@expo/config-types" "^52.0.0" + "@expo/image-utils" "^0.6.0" + "@expo/json-file" "^9.0.0" + "@react-native/normalize-colors" "0.76.5" + debug "^4.3.1" + fs-extra "^9.0.0" + resolve-from "^5.0.0" + semver "^7.6.0" + xml2js "0.6.0" + "@expo/rudder-sdk-node@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@expo/rudder-sdk-node/-/rudder-sdk-node-1.1.1.tgz#6aa575f346833eb6290282118766d4919c808c6a" @@ -1947,6 +1964,11 @@ resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.3.tgz#8d4de4a8671385c53b2d202ef0137632abcf747d" integrity sha512-Yrpmrh4IDEupUUM/dqVxhAN8QW1VEUR3Qrk2lzJC1jB2s46hDe0hrMP2vs12YJqlzshteOthjwXQlY0TgIzgbg== +"@react-native/normalize-colors@0.76.5": + version "0.76.5" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.5.tgz#a33560736311aefcf1d3cb594597befe81a9a53c" + integrity sha512-6QRLEok1r55gLqj+94mEWUENuU5A6wsr2OoXpyq/CgQ7THWowbHtru/kRGRr6o3AQXrVnZheR60JNgFcpNYIug== + "@react-native/virtualized-lists@0.76.3": version "0.76.3" resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.76.3.tgz#9865f9e3770c101476564dc2436018f82adfb4b3" @@ -4568,6 +4590,13 @@ expo-secure-store@~14.0.0: resolved "https://registry.yarnpkg.com/expo-secure-store/-/expo-secure-store-14.0.0.tgz#cf6eb7f73e619f8907d5a073e2f438927b5fc2ab" integrity sha512-VyhtRFXP+7hQmHhKlHIOWid1Q/IRpM7Uif32tZHLZHvQ6FNz2cUkr26XWGvCa7btYbrR6OL++FBFZYjbIcRZTw== +expo-splash-screen@^0.29.18: + version "0.29.18" + resolved "https://registry.yarnpkg.com/expo-splash-screen/-/expo-splash-screen-0.29.18.tgz#96ccce3d5a03389a9061743903b0a77c22a16796" + integrity sha512-bTBY+LF6YtYen2j60yGNh2SX/tG4UXZAyBCMMriOSiZZ7LSCs3ARyEufaSiWk+ckWShTeMqItOnaAN/CAF8MJA== + dependencies: + "@expo/prebuild-config" "^8.0.23" + expo-status-bar@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/expo-status-bar/-/expo-status-bar-2.0.0.tgz#dd99adc2ace12a24c92718cd0f97b93347103393" From 951f7d42371ab68467d00fc5c457170660dea32b Mon Sep 17 00:00:00 2001 From: im-adithya Date: Mon, 30 Dec 2024 19:20:44 +0530 Subject: [PATCH 3/5] chore: remove splash png --- assets/splash.png | Bin 15004 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 assets/splash.png diff --git a/assets/splash.png b/assets/splash.png deleted file mode 100644 index ae04ebf2613732fe8dc3327d554d31269fe8abe3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15004 zcmeI3Wl$Vl^XLb6f(H+aySqbx;O_1OCpaN!u;A|Q?kpZ81ef6M9yGXfH*ejK|9U?> zx9VSYtDgR_H9O}_pYC6GpEEmW=bN(P2Q*|tWB>rrWTYij0RRpb0FajuVIXJB1UKFR z0JNd9yt*Xh>+AnlLh+95uf6Mzlw_cnmlrxpavBQChld9mau6d81wA#*$;8K}r>FM< z40nrmcXxNJj7$&9_J5{rxLIh}7^t3B95`55Ihd$6H#P)$`Sg`JU)CJ1=4@|nZjO$Q zxY#*VrCF;}Rn(M~dAYb(mX{}g{W?E8o1K{v5foygqyIf>CBj3`LPwdKoikLcrzj`S z$4+BnXeccyDJd?lDbK$C!)&?Rbf(oPDNyFmpFbxjC(e$JIT7;GB21&Bqk{tj2D*CU zA|mqQ%(c}ur6ncv9mc=FhPql>A#U%LBv}p*4*Guls4TAt4-Ip7aor!b{8^-%AG zVIeg+<$2ZdqlKlpiRmXZ0c(9eK`z>;h=|=mi|u}MIcXUa4era!%e~#*qJqMfJPkV| z{`lCq*y!kp&ys=8;-SI8UjqUhZ0*Jx42t8G(nDqaoy4}cwmUmIn!#WnZ*MOT4=puy z3mu-9HAmZz*1hFA^_gk~F$!y|tKFsAO*!grmO?$<-HioL@nZZ(&xM~o>_66` zp<(joKd=D*CnF-U{|7w_UtysB+C%m_FQxp?_2B-C=fA=G7tepAqwz1EfARcR0{^w~ z-|YF{!PDvO7fu(s&FeePJXEwIzUwQOD3)+^c?>paa)?7rdZb4}6GxS$NcuG>)Jl{O zGU(4@!+*v5@kYpMc?^%koBM2jV*lwOYvT4k`^@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dt+;(~=3CC=!RD?yP^xUsiszGzb) z&)|z}Sx1G%zzq9#&qdz=3fQRoOTt`xtgoRf&3?VZP?^csOY@91{9_HC7g3p zftrSC`)Re_t^j9>Ag;!=vGA{N{zVaq!=n~|NtHhWcNgmt|}fvocX$3$qC6^LzL&WZKt~h0DLDKPANNMJhJmGu`h^YiQFC%*?IZ~9E#ig1`4|& z>_ z9XdQ;|72G*cvKs=>q7ytNV9$>YEBzL74^vK!&=zZ>a-)(uKg$EKr8_$*-%CItp{Ed zNw;Eal7y~>evz^D=q!RiDpIZM15^?E|d`>)RWkr=;4fx%1+2CE;5z1>5Zr5Z$=QU!ZDnIScrRFLu6_$qfw+K3%C3>1~A zn)98?%oP-=DzFJ90kQ)6WJ@Y%7Hed@wN2PvS>#(;SQ{tRsz6AUH!R(05BUkjW%kxB zAFG$x6d6S>l^aylzTaM9hBR+G>!>v*9p_t794j|yQv5kecV{sOr)sd=CC&^5x@*NPh<%N+mH6|GK8(qfz4Sl5NB#uiy`%Lrj1TV#6(@votQS2`X#?UG2yl}d0v`jO*IknIJ(BL?r= z=w31mNvOm^H3VoiDg{)i_r4*<1wW7d48Y{Sp)*}H|Ac#-31v+em!2RmG;FBS^dCR+mI?^md?QFT&=Ono5(HbU|GmtU7>iH0)Lmh2dWX!ga7~l From eca2d15ff0e896e6e66b4920d221299e6f554f4f Mon Sep 17 00:00:00 2001 From: im-adithya Date: Mon, 30 Dec 2024 14:21:27 +0530 Subject: [PATCH 4/5] fix: screen header right buttons --- pages/Home.tsx | 12 +++++++----- pages/Transactions.tsx | 2 +- pages/send/PaymentSuccess.tsx | 1 + pages/settings/wallets/SetupWallet.tsx | 8 ++++---- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/pages/Home.tsx b/pages/Home.tsx index ea926ca..4a32b44 100644 --- a/pages/Home.tsx +++ b/pages/Home.tsx @@ -65,11 +65,13 @@ export function Home() { ( - - - - - + { + router.push("/settings"); + }} + > + + )} /> diff --git a/pages/Transactions.tsx b/pages/Transactions.tsx index 0f3ab2f..b241eb6 100644 --- a/pages/Transactions.tsx +++ b/pages/Transactions.tsx @@ -75,7 +75,7 @@ export function Transactions() { animation="slide_from_bottom" right={() => ( { + onPressIn={() => { router.back(); }} > diff --git a/pages/send/PaymentSuccess.tsx b/pages/send/PaymentSuccess.tsx index 3be99ce..c11a127 100644 --- a/pages/send/PaymentSuccess.tsx +++ b/pages/send/PaymentSuccess.tsx @@ -1,6 +1,7 @@ import { openURL } from "expo-linking"; import { router, useLocalSearchParams } from "expo-router"; import { LNURLPaymentSuccessAction } from "lib/lnurl"; +import React from "react"; import { ScrollView, View } from "react-native"; import { Tick } from "~/animations/Tick"; import { Receiver } from "~/components/Receiver"; diff --git a/pages/settings/wallets/SetupWallet.tsx b/pages/settings/wallets/SetupWallet.tsx index 4bad391..315dbdb 100644 --- a/pages/settings/wallets/SetupWallet.tsx +++ b/pages/settings/wallets/SetupWallet.tsx @@ -4,7 +4,7 @@ import * as Clipboard from "expo-clipboard"; import { router, useLocalSearchParams } from "expo-router"; import { useAppStore } from "lib/state/appStore"; import React from "react"; -import { Pressable, TouchableOpacity, View } from "react-native"; +import { TouchableOpacity, View } from "react-native"; import Toast from "react-native-toast-message"; import Alert from "~/components/Alert"; import DismissableKeyboardView from "~/components/DismissableKeyboardView"; @@ -153,8 +153,8 @@ export function SetupWallet() { title="Setup Wallet Connection" right={() => walletIdWithConnection !== -1 ? ( - { + { useAppStore .getState() .setSelectedWalletId(walletIdWithConnection); @@ -165,7 +165,7 @@ export function SetupWallet() { }} > - + ) : ( From f068acbc13dae88599cd6ee7bb0ebc2b9a2e6e7d Mon Sep 17 00:00:00 2001 From: im-adithya Date: Mon, 30 Dec 2024 19:37:49 +0530 Subject: [PATCH 5/5] chore: add touchable opacity to show transactions button --- pages/Home.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pages/Home.tsx b/pages/Home.tsx index 4a32b44..5715d2a 100644 --- a/pages/Home.tsx +++ b/pages/Home.tsx @@ -147,12 +147,14 @@ export function Home() { - - + + + +