From a9c21819255860f97e5174181a357999dfba5d49 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Sat, 30 Mar 2024 16:40:43 +0000
Subject: fix(mobile): Fix the non-smooth server address input field in signin

---
 apps/mobile/app/signin.tsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'apps/mobile/app/signin.tsx')

diff --git a/apps/mobile/app/signin.tsx b/apps/mobile/app/signin.tsx
index 8402bd43..283528df 100644
--- a/apps/mobile/app/signin.tsx
+++ b/apps/mobile/app/signin.tsx
@@ -16,6 +16,7 @@ import { api } from "@/lib/trpc";
 
 export default function Signin() {
   const { settings, setSettings } = useAppSettings();
+  const [serverAddress, setServerAddress] = useState(settings.address);
 
   const [error, setError] = useState<string | undefined>();
 
@@ -66,10 +67,13 @@ export default function Signin() {
             <Input
               className="w-full"
               placeholder="Server Address"
-              value={settings.address}
+              value={serverAddress}
               autoCapitalize="none"
               keyboardType="url"
-              onChangeText={(e) => setSettings({ ...settings, address: e })}
+              onChangeText={(e) => {
+                setServerAddress(e);
+                setSettings({ ...settings, address: e });
+              }}
             />
           </View>
           <View className="gap-2">
@@ -90,6 +94,8 @@ export default function Signin() {
               placeholder="Password"
               secureTextEntry
               value={formData.password}
+              autoCapitalize="none"
+              textContentType="password"
               onChangeText={(e) => setFormData((s) => ({ ...s, password: e }))}
             />
           </View>
-- 
cgit v1.3-1-g0d28

