From 9c99b4989dc389d0cd9fc5c2bc18bc70deae385a Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Mon, 13 Jan 2020 17:34:29 +0500 Subject: [PATCH] allow bottom button to be hidden --- apps/mobile/ios/Notes.xcodeproj/project.pbxproj | 16 ++++++++++++++++ apps/mobile/ios/Podfile | 1 + apps/mobile/ios/Podfile.lock | 2 +- apps/mobile/src/components/Container/index.js | 4 ++-- apps/mobile/src/views/Home/index.js | 4 ---- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/apps/mobile/ios/Notes.xcodeproj/project.pbxproj b/apps/mobile/ios/Notes.xcodeproj/project.pbxproj index 35acb6fa3..8f9266854 100644 --- a/apps/mobile/ios/Notes.xcodeproj/project.pbxproj +++ b/apps/mobile/ios/Notes.xcodeproj/project.pbxproj @@ -50,6 +50,19 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 65424EB023CC4DE200B593D6 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 00E356EE1AD99517003FC87E /* NotesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NotesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -288,6 +301,7 @@ 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 8190C2904E505A29F2953971 /* [CP] Copy Pods Resources */, + 65424EB023CC4DE200B593D6 /* Embed Frameworks */, ); buildRules = ( ); @@ -744,6 +758,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; + "FRAMEWORK_SEARCH_PATHS[arch=*]" = "../node_modules/react-native-fast-storage/ios"; INFOPLIST_FILE = Notes/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( @@ -764,6 +779,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; + "FRAMEWORK_SEARCH_PATHS[arch=*]" = "../node_modules/react-native-fast-storage/ios"; INFOPLIST_FILE = Notes/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( diff --git a/apps/mobile/ios/Podfile b/apps/mobile/ios/Podfile index 74caf7885..f4ab619d5 100644 --- a/apps/mobile/ios/Podfile +++ b/apps/mobile/ios/Podfile @@ -34,6 +34,7 @@ target 'Notes' do pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' + target 'NotesTests' do inherit! :search_paths # Pods for testing diff --git a/apps/mobile/ios/Podfile.lock b/apps/mobile/ios/Podfile.lock index c4d60113b..cdb455b10 100644 --- a/apps/mobile/ios/Podfile.lock +++ b/apps/mobile/ios/Podfile.lock @@ -381,6 +381,6 @@ SPEC CHECKSUMS: RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4 Yoga: ba3d99dbee6c15ea6bbe3783d1f0cb1ffb79af0f -PODFILE CHECKSUM: c7f3c4928c6d0c850545a0a28079ac3abeed60a4 +PODFILE CHECKSUM: 7cd3068f3c42e6d85b0135aaebe910c2bb876b5d COCOAPODS: 1.8.4 diff --git a/apps/mobile/src/components/Container/index.js b/apps/mobile/src/components/Container/index.js index ac3438239..e028a8892 100644 --- a/apps/mobile/src/components/Container/index.js +++ b/apps/mobile/src/components/Container/index.js @@ -24,10 +24,10 @@ export const AnimatedSafeAreaView = Animatable.createAnimatableComponent( ); export const Container = ({ - navigation, children, bottomButtonOnPress, bottomButtonText, + noBottomButton = false, }) => { // State const {colors} = useAppContext(); @@ -72,7 +72,7 @@ export const Container = ({ }}> {children} - {buttonHide ? null : ( + {buttonHide || noBottomButton ? null : ( { const {colors, setMenuOpen, selectionMode, notes} = useAppContext(); const [text, setText] = useState(''); const [hideHeader, setHideHeader] = useState(false); - const [buttonHide, setButtonHide] = useState(false); const [keyword, setKeyword] = useState(''); const [searchResults, setSearchResults] = useState([]); // Variables @@ -141,9 +140,6 @@ export const Home = ({navigation}) => { { - //fetchNotes(); - }} onScroll={onScroll} isSearch={searchResults.length > 0 ? true : false} notes={searchResults.length > 0 ? searchResults : notes}