mobile: fix applock toggles working without verification

This commit is contained in:
Ammar Ahmed
2024-03-26 11:44:46 +05:00
parent 5f5209af8c
commit d59219e62b

View File

@@ -50,6 +50,7 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {
const onChangeSettings = async () => {
if (loading) return;
if (item.onVerify && !(await item.onVerify())) return;
if (item.modifer) {
setLoading(true);
await item.modifer(item.property || current);
@@ -115,7 +116,6 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {
break;
case "switch":
{
if (item.onVerify && !(await item.onVerify())) return;
onChangeSettings();
}
break;