mobile: minor fixes

This commit is contained in:
Ammar Ahmed
2024-02-10 21:16:26 +05:00
committed by Abdullah Atta
parent 5ea0254849
commit dddbc671fb
4 changed files with 39 additions and 20 deletions

View File

@@ -46,6 +46,8 @@ import { Toast } from "../../toast";
import { IconButton } from "../../ui/icon-button";
import Input from "../../ui/input";
import Seperator from "../../ui/seperator";
import { useUserStore } from "../../../stores/use-user-store";
import BiometicService from "../../../services/biometrics";
export const AppLockPassword = () => {
const { colors } = useThemeColors();
@@ -319,6 +321,15 @@ export const AppLockPassword = () => {
}
clearAppLockVerificationCipher();
SettingsService.setProperty("appLockHasPasswordSecurity", false);
if (!useUserStore.getState().user) {
if (
!(await BiometicService.isBiometryAvailable()) ||
!SettingsService.getProperty("biometricsAuthEnabled")
) {
SettingsService.setProperty("appLockEnabled", false);
}
}
}
SettingsService.setProperty(

View File

@@ -170,13 +170,15 @@ export default function List(props: ListProps) {
keyboardShouldPersistTaps="always"
keyboardDismissMode="interactive"
refreshControl={
<RefreshControl
tintColor={colors.primary.accent}
colors={[colors.primary.accent]}
progressBackgroundColor={colors.secondary.background}
onRefresh={_onRefresh}
refreshing={false}
/>
props.isRenderedInActionSheet ? null : (
<RefreshControl
tintColor={colors.primary.accent}
colors={[colors.primary.accent]}
progressBackgroundColor={colors.secondary.background}
onRefresh={_onRefresh}
refreshing={false}
/>
)
}
ListEmptyComponent={
props.placeholder ? (

View File

@@ -159,7 +159,7 @@ export function ListItemWrapper(props: ListItemWrapperProps) {
case "note": {
return (
<>
{groupHeader && previousIndex.current === index ? (
{groupHeader && previousIndex.current === index && !isSheet ? (
<SectionHeader
screen={props.renderedInRoute}
item={groupHeader}
@@ -194,7 +194,7 @@ export function ListItemWrapper(props: ListItemWrapperProps) {
case "notebook":
return (
<>
{groupHeader && previousIndex.current === index ? (
{groupHeader && previousIndex.current === index && !isSheet ? (
<SectionHeader
screen={props.renderedInRoute}
item={groupHeader}
@@ -222,7 +222,7 @@ export function ListItemWrapper(props: ListItemWrapperProps) {
case "reminder":
return (
<>
{groupHeader && previousIndex.current === index ? (
{groupHeader && previousIndex.current === index && !isSheet ? (
<SectionHeader
screen={props.renderedInRoute}
item={groupHeader}
@@ -248,7 +248,7 @@ export function ListItemWrapper(props: ListItemWrapperProps) {
case "tag":
return (
<>
{groupHeader && previousIndex.current === index ? (
{groupHeader && previousIndex.current === index && !isSheet ? (
<SectionHeader
screen={props.renderedInRoute}
item={groupHeader}

View File

@@ -790,9 +790,8 @@ export const settingsGroups: SettingSection[] = [
sections: [
{
id: "app-lock-mode",
name: "Enable app lock",
description:
"Select the mode for the desired level of app lock security.",
name: "App lock",
description: "Keep intruders away with app lock security.",
icon: "lock",
type: "switch",
property: "appLockEnabled",
@@ -891,14 +890,14 @@ export const settingsGroups: SettingSection[] = [
id: "app-lock-timer",
name: "App lock timeout",
description:
"Set the time after which the app should lock in background",
"Set the time after which the app should lock when in background",
type: "component",
component: "applock-timer"
},
{
id: "app-lock-pin",
name: "Setup app lock password",
description: "Setup a new app lock password for app lock",
description: "Set up a password or pin for app lock",
hidden: () => {
return !!SettingsService.getProperty(
"appLockHasPasswordSecurity"
@@ -912,7 +911,7 @@ export const settingsGroups: SettingSection[] = [
{
id: "app-lock-pin-change",
name: "Change app lock pin",
description: "Set up a new pin for the app lock",
description: "Set up a password or pin for app lock",
hidden: () => {
return !SettingsService.getProperty("appLockHasPasswordSecurity");
},
@@ -923,9 +922,16 @@ export const settingsGroups: SettingSection[] = [
},
{
id: "app-lock-pin-remove",
name: "Remove app lock pin",
description:
"Remove app lock pin, app lock will fallback to using account password to unlock the app",
name: `Remove app lock ${
SettingsService.getProperty("applockKeyboardType") === "numeric"
? "pin"
: "password"
}`,
description: `Remove app lock ${
SettingsService.getProperty("applockKeyboardType") === "numeric"
? "pin"
: "password"
}, app lock will fallback to using account password to unlock the app`,
hidden: () => {
return !SettingsService.getProperty("appLockHasPasswordSecurity");
},