Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Fix settings screen flicker issue (#771)

Leendert de Borst01adb3df0722
diff --git a/mobile-app/app/(tabs)/(settings)/index.tsx b/mobile-app/app/(tabs)/(settings)/index.tsx
index 736b08467..e91f1f506 100644
--- a/mobile-app/app/(tabs)/(settings)/index.tsx
+++ b/mobile-app/app/(tabs)/(settings)/index.tsx
@@ -20,7 +20,7 @@ export default function SettingsScreen() {
const scrollY = useRef(new Animated.Value(0)).current;
const scrollViewRef = useRef<ScrollView>(null);
const [autoLockDisplay, setAutoLockDisplay] = useState<string>('');
-
+ const [authMethodDisplay, setAuthMethodDisplay] = useState<string>('');
useEffect(() => {
const loadAutoLockDisplay = async () => {
const autoLockTimeout = await getAutoLockTimeout();
@@ -38,8 +38,14 @@ export default function SettingsScreen() {
setAutoLockDisplay(display);
};
+ const loadAuthMethodDisplay = async () => {
+ const authMethod = await getAuthMethodDisplay();
+ setAuthMethodDisplay(authMethod);
+ };
+
loadAutoLockDisplay();
- }, [getAutoLockTimeout]);
+ loadAuthMethodDisplay();
+ }, [getAutoLockTimeout, getAuthMethodDisplay]);
const handleLogout = async () => {
await webApi.logout();
@@ -191,7 +197,7 @@ export default function SettingsScreen() {
</View>
<View style={[styles.settingItemContent]}>
<ThemedText style={styles.settingItemText}>Vault Unlock Method</ThemedText>
- <ThemedText style={styles.settingItemValue}>{getAuthMethodDisplay()}</ThemedText>
+ <ThemedText style={styles.settingItemValue}>{authMethodDisplay}</ThemedText>
<Ionicons name="chevron-forward" size={20} color={colors.textMuted} />
</View>
</TouchableOpacity>