allow bottom button to be hidden

This commit is contained in:
ammarahm-ed
2020-01-13 17:34:29 +05:00
parent 7aec61198b
commit 9c99b4989d
5 changed files with 20 additions and 7 deletions

View File

@@ -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 = "<group>"; };
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 = (

View File

@@ -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

View File

@@ -381,6 +381,6 @@ SPEC CHECKSUMS:
RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4
Yoga: ba3d99dbee6c15ea6bbe3783d1f0cb1ffb79af0f
PODFILE CHECKSUM: c7f3c4928c6d0c850545a0a28079ac3abeed60a4
PODFILE CHECKSUM: 7cd3068f3c42e6d85b0135aaebe910c2bb876b5d
COCOAPODS: 1.8.4

View File

@@ -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 : (
<TouchableOpacity
onPress={bottomButtonOnPress}
activeOpacity={opacity}

View File

@@ -20,7 +20,6 @@ export const Home = ({navigation}) => {
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}) => {
<NotesList
isGrouped={true}
refresh={() => {
//fetchNotes();
}}
onScroll={onScroll}
isSearch={searchResults.length > 0 ? true : false}
notes={searchResults.length > 0 ? searchResults : notes}