Skip to content

Add contacts import nitro module #54459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 71 commits into
base: main
Choose a base branch
from

Conversation

perunt
Copy link
Contributor

@perunt perunt commented Dec 23, 2024

Explanation of Change

https://github.com/Expensify/Mobile-Expensify/pull/13516 - use this PR for Mobile-Expensify

During the revert of the NitroModules PR, we identified two main issues affecting our iOS builds. First, there was a mismatch between the minimum iOS deployment target (set to 13.4) and our app's requirement (iOS 15). Second, we discovered build failures specific to iOS simulators due to a known Swift compiler issue.
While investigating, we found that our CI environment was running an older version of Xcode (15.2), which contributed to the build failures. We've addressed this by updating our CI configuration to use newer macOS runners and updating the Ruby GitHub Action version.
To move forward cleanly, we'll be splitting this into two separate PRs:

  • CI infrastructure update for newer Xcode support
  • Re-introduction of ContactsModule with correct iOS configuration

After implementing these changes in isolation, our test builds are now passing successfully.

revert #54421

Fixed Issues

$ #47938
PROPOSAL:

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

@perunt
Copy link
Contributor Author

perunt commented Jan 6, 2025

I didn't test the Hybrid App as I don't have access yet

@perunt perunt marked this pull request as ready for review January 6, 2025 12:38
@perunt perunt requested a review from a team as a code owner January 6, 2025 12:38
@melvin-bot melvin-bot bot requested review from DylanDylann and shawnborton and removed request for a team January 6, 2025 12:38
Copy link

melvin-bot bot commented Jan 6, 2025

@shawnborton @DylanDylann One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@staszekscp
Copy link
Contributor

Hey! I've created a PR with adjustments so everything works fine with HybridApp

@mateuuszzzzz
Copy link
Contributor

mateuuszzzzz commented Jan 7, 2025

Hi! @perunt what's your Xcode version locally? I'm testing PR on HybridApp and I cannot build for simulators (it builds fine on physical device tho). My version is 16.2 (16C5032a)

I'm also curious about swiftc version. Here is mine: swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)

The key information here is that some people might encounter issues when building on a simulator, while others might not, depending on their Swift compiler version. This can block HybridApp development for people without physical iPhone

@mateuuszzzzz
Copy link
Contributor

mateuuszzzzz commented Jan 7, 2025

Nevertheless I think this is not a serious issue and we can proceed further with this PR and its HybridApp part 😅

People experiencing issues with the Swift compiler can try downgrading their Xcode version or using a physical device if available. cc: @Julesssss

@mateuuszzzzz
Copy link
Contributor

I think only remaining thing is to bump Xcode on CI infrastructure. I have this PR that was created before Christmas: #54424
I will sync it with main later today

blimpich
blimpich previously approved these changes Jan 7, 2025
Copy link
Contributor

@blimpich blimpich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tentatively approving, seems like we need to confirm first that this doesn't break hybrid app for simulator's as per above comments.

@blimpich
Copy link
Contributor

blimpich commented Jan 7, 2025

Also I think we need to merge main due to xcode being bumped, which is why the validate github actions check is failing.

@perunt
Copy link
Contributor Author

perunt commented Jan 10, 2025

I'm still dealing with Android errors after bumping RN. I'll ping you once it's done

@perunt perunt marked this pull request as ready for review April 22, 2025 13:37
@perunt
Copy link
Contributor Author

perunt commented Apr 22, 2025

@roryabraham thanks for your review! I’ve made some adjustments and moved the module to the Expensify namespace. I’ve also structured the code based on your comments. However, I left a few comments since I wasn't sure what exactly you meant

@blimpich
Copy link
Contributor

@DylanDylann can you give this another look?

Copy link
Contributor

🚧 @roryabraham has triggered a test app build. You can view the workflow run here.

Copy link
Contributor

🚧 @roryabraham has triggered a test app build. You can view the workflow run here.

Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪

Android 🤖 iOS 🍎
Android 🤖🔄 iOS 🍎🔄
❌ FAILED ❌ ❌ FAILED ❌
The QR code can't be generated, because the Android build failed The QR code can't be generated, because the iOS build failed
Desktop 💻 Web 🕸️
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/54459/NewExpensify.dmg https://54459.pr-testing.expensify.com
Desktop Web

👀 View the workflow run that generated this build 👀

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good work, this feels much closer to me


class HybridContactsModule : HybridContactsModuleSpec() {
@Volatile
private var estimatedMemorySize: Long = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what would happen if we just remove this memory management code? Both Java and JavaScript are garbage-collected languages, so I'm wondering if this is truly required or if it could be a pre-optimization

"specs-debug": "npm run --filter=\"**\" typescript && npx nitro-codegen --logLevel=\"debug\"",
"specs": "npx nitro-codegen"
},
"author": "Marc Rousavy <[email protected]> (https://github.com/mrousavy)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"author": "Marc Rousavy <[email protected]> (https://github.com/mrousavy)",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The author field is a required option here. I can put Expensify there

@@ -74,20 +87,25 @@ function MoneyRequestParticipantsSelector({
}: MoneyRequestParticipantsSelectorProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
const [softPermissionModalVisible, setSoftPermissionModalVisible] = useState(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember that booleans should start with is, has, should, etc...

Suggested change
const [softPermissionModalVisible, setSoftPermissionModalVisible] = useState(false);
const [isSoftPermissionModalVisible, setSoftPermissionModalVisible] = useState(false);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, what do you mean by "soft permission"? What makes it "soft"? Would it be clearer to just call it isContactPermissionModalVisible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Soft permission" refers to an app-controlled dialog that appears before triggering the actual system permission request.
It's called "soft" because it gives users context about why contact access is needed before showing the system's "hard" permission dialog. We use it for location and some other stuff

import {getContactPermission} from '@libs/ContactPermission';
import type {ContactPermissionModalProps} from './types';

function ContactPermissionModal({startPermissionFlow, resetPermissionFlow, onDeny, onGrant}: ContactPermissionModalProps) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can substantially simplify this implementation:

diff --git a/src/components/ContactPermissionModal/index.native.tsx b/src/components/ContactPermissionModal/index.native.tsx
index 825c8bc4afb..2c5343974b0 100644
--- a/src/components/ContactPermissionModal/index.native.tsx
+++ b/src/components/ContactPermissionModal/index.native.tsx
@@ -1,4 +1,4 @@
-import React, {useEffect, useState} from 'react';
+import React, {useCallback, useEffect, useState} from 'react';
 import {InteractionManager} from 'react-native';
 import {RESULTS} from 'react-native-permissions';
 import ConfirmModal from '@components/ConfirmModal';
@@ -8,49 +8,41 @@ import useThemeStyles from '@hooks/useThemeStyles';
 import {getContactPermission} from '@libs/ContactPermission';
 import type {ContactPermissionModalProps} from './types';
 
-function ContactPermissionModal({startPermissionFlow, resetPermissionFlow, onDeny, onGrant}: ContactPermissionModalProps) {
+function ContactPermissionModal({onGrant}: ContactPermissionModalProps) {
     const [isModalVisible, setIsModalVisible] = useState(false);
 
     const styles = useThemeStyles();
     const {translate} = useLocalize();
 
     useEffect(() => {
-        if (!startPermissionFlow) {
-            return;
-        }
         getContactPermission().then((status) => {
             if (status === RESULTS.GRANTED || status === RESULTS.LIMITED) {
-                return onGrant();
+                onGrant();
+                return;
             }
             if (status === RESULTS.BLOCKED) {
                 return;
             }
             setIsModalVisible(true);
         });
-        // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps -- We only want to run this effect when startPermissionFlow changes
-    }, [startPermissionFlow]);
+        // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps -- We only want to run this effect on mount
+    }, []);
 
-    const handleGrantPermission = () => {
+    const grantPermission = useCallback(() => {
         setIsModalVisible(false);
         InteractionManager.runAfterInteractions(onGrant);
-    };
-
-    const handleDenyPermission = () => {
-        onDeny(RESULTS.DENIED);
-        setIsModalVisible(false);
-    };
+    }, [onGrant]);
 
-    const handleCloseModal = () => {
+    const close = useCallback(() => {
         setIsModalVisible(false);
-        resetPermissionFlow();
-    };
+    }, []);
 
     return (
         <ConfirmModal
             isVisible={isModalVisible}
-            onConfirm={handleGrantPermission}
-            onCancel={handleDenyPermission}
-            onBackdropPress={handleCloseModal}
+            onConfirm={grantPermission}
+            onCancel={close}
+            onBackdropPress={close}
             confirmText={translate('common.continue')}
             cancelText={translate('common.notNow')}
             prompt={translate('contact.importContactsText')}
diff --git a/src/components/ContactPermissionModal/types.ts b/src/components/ContactPermissionModal/types.ts
index 5c831410656..d8cef3876d1 100644
--- a/src/components/ContactPermissionModal/types.ts
+++ b/src/components/ContactPermissionModal/types.ts
@@ -1,17 +1,6 @@
-import type {PermissionStatus} from 'react-native-permissions';
-
 type ContactPermissionModalProps = {
     /** A callback to call when the permission has been granted */
     onGrant: () => void;
-
-    /** A callback to call when the permission has been denied */
-    onDeny: (permission: PermissionStatus) => void;
-
-    /** Should start the permission flow? */
-    startPermissionFlow: boolean;
-
-    /** Reset the permission flow */
-    resetPermissionFlow: () => void;
 };
 
 export default {};
diff --git a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx
index ecbac67678a..c70abd23865 100644
--- a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx
+++ b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx
@@ -87,7 +87,6 @@ function MoneyRequestParticipantsSelector({
 }: MoneyRequestParticipantsSelectorProps) {
     const {translate} = useLocalize();
     const styles = useThemeStyles();
-    const [softPermissionModalVisible, setSoftPermissionModalVisible] = useState(false);
     const [contactPermissionState, setContactPermissionState] = useState<PermissionStatus>(RESULTS.UNAVAILABLE);
     const showImportContacts = !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED);
     const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState('');
@@ -105,7 +104,7 @@ function MoneyRequestParticipantsSelector({
         shouldInitialize: didScreenTransitionEnd,
     });
     const [contacts, setContacts] = useState<Array<SearchOption<PersonalDetails>>>([]);
-    const [textInputAutoFocus, setTextInputAutoFocus] = useState(softPermissionModalVisible);
+    const [textInputAutoFocus, setTextInputAutoFocus] = useState(false);
     const cleanSearchTerm = useMemo(() => debouncedSearchTerm.trim().toLowerCase(), [debouncedSearchTerm]);
     const offlineMessage: string = isOffline ? `${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}` : '';
 
@@ -304,12 +303,8 @@ function MoneyRequestParticipantsSelector({
     }, []);
 
     useEffect(() => {
-        setSoftPermissionModalVisible(true);
         getContactPermission().then((status) => {
             setContactPermissionState(status);
-            if (status !== RESULTS.BLOCKED && status !== RESULTS.UNAVAILABLE) {
-                setSoftPermissionModalVisible(true);
-            }
         });
     }, []);
 
@@ -459,12 +454,7 @@ function MoneyRequestParticipantsSelector({
         ) : null;
     }, [showImportContacts, inputHelperText, translate, styles, goToSettings]);
 
-    const handleSoftPermissionDeny = useCallback(() => {
-        setSoftPermissionModalVisible(false);
-    }, []);
-
     const handleSoftPermissionGrant = useCallback(() => {
-        setSoftPermissionModalVisible(false);
         InteractionManager.runAfterInteractions(handleContactImport);
         setTextInputAutoFocus(true);
     }, [handleContactImport]);
@@ -563,14 +553,7 @@ function MoneyRequestParticipantsSelector({
 
     return (
         <>
-            {softPermissionModalVisible && (
-                <ContactPermissionModal
-                    startPermissionFlow={softPermissionModalVisible}
-                    resetPermissionFlow={handleSoftPermissionDeny}
-                    onGrant={handleSoftPermissionGrant}
-                    onDeny={handleSoftPermissionDeny}
-                />
-            )}
+            <ContactPermissionModal onGrant={handleSoftPermissionGrant} />
             <SelectionList
                 onConfirm={handleConfirmSelection}
                 sections={areOptionsInitialized ? sections : CONST.EMPTY_ARRAY}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach is generally the same as the one we use in the app, so we’ll probably need to update it everywhere later

Hmm, but wait a minute, it looks like you completely removed startPermissionFlow.
Are you planning to remove it entirely, or just move it higher up in the component where it's used?
Also, it doesn't handle changing permissions anymore.
Just curious - was this generated by some kind of AI helper checker?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, if I were you, I'd use some. You’ve got tons of PRs to review every day 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't use any AI to generate this diff - I created it manually (although I admit I didn't test).

it looks like you completely removed startPermissionFlow

yeah, that was the intention. My version simplifies things in a couple ways:

  1. Remove startPermissionFlow. Instead, ContactPermissionModal just checks for permissions on mount, and if we haven't asked before, it renders the soft permissions modal.
  2. That removes the need to manage the modal state in the parent component

@roryabraham
Copy link
Contributor

Also, it looks like those test builds failed, so we should look into that

@perunt
Copy link
Contributor Author

perunt commented Apr 23, 2025

Also, it looks like those test builds failed, so we should look into that

That's odd. I checked both platforms before marking this PR as ready for review. Let me try it again

@perunt
Copy link
Contributor Author

perunt commented Apr 23, 2025

Just checked the Hybrid App on iOS and Android and it's working well. I assume it'll be fine if we run it again

Copy link
Contributor

🚧 @roryabraham has triggered a test app build. You can view the workflow run here.

Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪

Android 🤖 iOS 🍎
Android 🤖🔄 iOS 🍎🔄
❌ FAILED ❌ ❌ FAILED ❌
The QR code can't be generated, because the Android build failed The QR code can't be generated, because the iOS build failed
Desktop 💻 Web 🕸️
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/54459/NewExpensify.dmg https://54459.pr-testing.expensify.com
Desktop Web

👀 View the workflow run that generated this build 👀

@blimpich
Copy link
Contributor

Error: could not build module 'NitroModules'
#include <NitroModules/JSIConverter.hpp>
         ^
Error: could not build Objective-C module 'ExpensifyNitroUtils'

Hmm, seems like the iOS build failed with this error. @perunt could you take a look and see why this might be? The GH says that the Android build also failed but looking at the workflow it looks like it actually built fine.

@@ -0,0 +1,27 @@
import {ContactsNitroModule} from '@expensify/nitro-utils';
import type {Contact} from '@expensify/nitro-utils';
import {CONTACT_FIELDS} from '@expensify/nitro-utils/src/specs/ContactsModule.nitro';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move CONTACT_FIELDS defination to the modules/ExpensifyNitroUtils/src/index.ts file? Then we don't need to import from the deep file in the module

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If do that we also should remove "@expensify/nitro-utils/*": ["modules/ExpensifyNitroUtils/*"] line in tsconfig.json

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we still define CONTACT_FIELDS in ContactsModule.nitro but we export it to outside of module in the index.ts file

.then((deviceContacts) => ({
contactList: Array.isArray(deviceContacts) ? deviceContacts : [],
permissionStatus,
}));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be better to add a catch block here

.catch((error) => {
+            console.error('Error importing contacts:', error);
+            return {
+                contactList: [],
+                permissionStatus,
+            };
+        });

s.license = package["license"]
s.authors = package["author"]

s.platforms = { :ios => min_ios_version_supported }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is min_ios_version_supported defined automatically somewhere?

thumbnailImageData?: string;
};

type ContactFields = 'FIRST_NAME' | 'LAST_NAME' | 'PHONE_NUMBERS' | 'EMAIL_ADDRESSES' | 'IMAGE_DATA';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type ContactFields = 'FIRST_NAME' | 'LAST_NAME' | 'PHONE_NUMBERS' | 'EMAIL_ADDRESSES' | 'IMAGE_DATA';
type ContactFields = keyof typeof CONTACT_FIELDS;

Comment on lines +306 to +314
useEffect(() => {
setSoftPermissionModalVisible(true);
getContactPermission().then((status) => {
setContactPermissionState(status);
if (status !== RESULTS.BLOCKED && status !== RESULTS.UNAVAILABLE) {
setSoftPermissionModalVisible(true);
}
});
}, []);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This useEffect is confused to me. we always set setSoftPermissionModalVisible is true initially

return onGrant();
}
if (status === RESULTS.BLOCKED) {
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call onDeny here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants