Skip to content

Commit

Permalink
Merge pull request #1941 from ecency/development
Browse files Browse the repository at this point in the history
3.0.18
  • Loading branch information
feruzm authored Apr 30, 2021
2 parents a25d55f + 434c09d commit 24d6ac3
Show file tree
Hide file tree
Showing 173 changed files with 6,490 additions and 3,263 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch
versionName "3.0.17"
versionName "3.0.18"
resValue "string", "build_config_package", "app.esteem.mobile.android"
multiDexEnabled true
// react-native-image-crop-picker
Expand Down
Binary file modified android/app/debug.keystore
Binary file not shown.
4 changes: 2 additions & 2 deletions ios/Ecency-tvOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.17</string>
<string>3.0.18</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2796</string>
<string>2797</string>
<key>LSRequiresIPhoneOS</key>
<true />
<key>NSAppTransportSecurity</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/Ecency-tvOSTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.17</string>
<string>3.0.18</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2796</string>
<string>2797</string>
</dict>
</plist>
296 changes: 129 additions & 167 deletions ios/Ecency.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ios/Ecency/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.17</string>
<string>3.0.18</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/EcencyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.17</string>
<string>3.0.18</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2796</string>
<string>2797</string>
</dict>
</plist>
12 changes: 11 additions & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ PODS:
- Folly (= 2018.10.22.00)
- RCTRequired (= 0.61.5)
- React-Core (= 0.61.5)
- RCTYouTube (2.0.1):
- React
- YoutubePlayer-in-WKWebView (~> 0.3.1)
- React (0.61.5):
- React-Core (= 0.61.5)
- React-Core/DevSupport (= 0.61.5)
Expand Down Expand Up @@ -427,6 +430,7 @@ PODS:
- toolbar-android (0.1.0-rc.2):
- React
- Yoga (1.14.0)
- YoutubePlayer-in-WKWebView (0.3.5)

DEPENDENCIES:
- appcenter-analytics (from `../node_modules/appcenter-analytics/ios`)
Expand All @@ -443,6 +447,7 @@ DEPENDENCIES:
- lottie-react-native (from `../node_modules/lottie-react-native`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
- RCTYouTube (from `../node_modules/react-native-youtube`)
- React (from `../node_modules/react-native/`)
- React-Core (from `../node_modules/react-native/`)
- React-Core/DevSupport (from `../node_modules/react-native/`)
Expand Down Expand Up @@ -517,6 +522,7 @@ SPEC REPOS:
- SDWebImage
- SDWebImageWebPCoder
- TOCropViewController
- YoutubePlayer-in-WKWebView

EXTERNAL SOURCES:
appcenter-analytics:
Expand Down Expand Up @@ -547,6 +553,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/Libraries/RCTRequired"
RCTTypeSafety:
:path: "../node_modules/react-native/Libraries/TypeSafety"
RCTYouTube:
:path: "../node_modules/react-native-youtube"
React:
:path: "../node_modules/react-native/"
React-Core:
Expand Down Expand Up @@ -674,6 +682,7 @@ SPEC CHECKSUMS:
Protobuf: 0cde852566359049847168e51bd1c690e0f70056
RCTRequired: b153add4da6e7dbc44aebf93f3cf4fcae392ddf1
RCTTypeSafety: 9aa1b91d7f9310fc6eadc3cf95126ffe818af320
RCTYouTube: 4509d59a7de050dd0c7c6cb1f427d37678d63b5c
React: b6a59ef847b2b40bb6e0180a97d0ca716969ac78
React-Core: 688b451f7d616cc1134ac95295b593d1b5158a04
React-CoreModules: d04f8494c1a328b69ec11db9d1137d667f916dcb
Expand Down Expand Up @@ -723,7 +732,8 @@ SPEC CHECKSUMS:
TOCropViewController: 3105367e808b7d3d886a74ff59bf4804e7d3ab38
toolbar-android: 85f3ef4d691469f2d304e7dee4bca013aa1ba1ff
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b
YoutubePlayer-in-WKWebView: cfbf46da51d7370662a695a8f351e5fa1d3e1008

PODFILE CHECKSUM: fe3729fa5bd9034637b0c0653446c2895b1c839d

COCOAPODS: 1.9.3
COCOAPODS: 1.10.1
4 changes: 2 additions & 2 deletions ios/eshare/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>3.0.17</string>
<string>3.0.18</string>
<key>CFBundleVersion</key>
<string>2796</string>
<string>2797</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ecency",
"version": "3.0.17",
"version": "3.0.18",
"displayName": "Ecency",
"private": true,
"rnpm": {
Expand All @@ -27,7 +27,7 @@
},
"dependencies": {
"@babel/runtime": "^7.5.5",
"@ecency/render-helper": "^2.1.0",
"@ecency/render-helper": "^2.1.4",
"@esteemapp/dhive": "0.15.0",
"@esteemapp/react-native-autocomplete-input": "^4.2.1",
"@esteemapp/react-native-modal-popover": "^0.0.15",
Expand Down Expand Up @@ -67,7 +67,8 @@
"react-native": "0.61.5",
"react-native-actions-sheet": "^0.4.2",
"react-native-actionsheet": "ecency/react-native-actionsheet",
"react-native-autoheight-webview": "^1.5.7",
"react-native-animatable": "^1.3.3",
"react-native-autoheight-webview": "^1.5.8",
"react-native-config": "luggit/react-native-config#master",
"react-native-dark-mode": "^0.2.2",
"react-native-date-picker": "^3.2.7",
Expand Down Expand Up @@ -103,6 +104,7 @@
"react-native-version": "^4.0.0",
"react-native-version-number": "^0.3.5",
"react-native-webview": "^11.2.1",
"react-native-youtube": "^2.0.1",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"react-navigation-redux-helpers": "^4.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/components/checkbox/view/checkboxStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default EStyleSheet.create({
bigSquare: {
height: 20,
width: 20,
borderWidth: 2,
borderColor: '$primaryBlue',
borderWidth: 1,
borderColor: '$primaryDarkGray',
alignItems: 'center',
justifyContent: 'center',
},
Expand Down
148 changes: 148 additions & 0 deletions src/components/customiseFiltersModal/customiseFiltersModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
import React, { forwardRef, Ref, useImperativeHandle, useRef, useState } from 'react';
import { useIntl } from 'react-intl';
import { TouchableOpacity } from 'react-native';
import { KeyboardAvoidingView, Platform, View, Text } from 'react-native';
import ActionSheet from 'react-native-actions-sheet';
import EStyleSheet from 'react-native-extended-stylesheet';
import {useDispatch, useSelector} from 'react-redux';
import { CheckBox } from '..';
import { DEFAULT_FEED_FILTERS, FEED_SCREEN_FILTER_MAP } from '../../constants/options/filters';

import { ThemeContainer } from '../../containers';
import { setFeedScreenFilters } from '../../redux/actions/postsAction';
import { TextButton } from '../buttons';
import styles from './customiseFiltersModalStyles';


export interface CustomiseFiltersModalRef {
show:()=>void;
}


const getFeedScreenFilterIndex = (key:string) => Object.keys(FEED_SCREEN_FILTER_MAP).indexOf(key)


const CustomiseFiltersModal = (props:any, ref:Ref<CustomiseFiltersModalRef>) => {
const sheetModalRef = useRef<ActionSheet>();
const dispatch = useDispatch();

const feedScreenFilters = useSelector(state => state.posts.feedScreenFilters || DEFAULT_FEED_FILTERS);

const [selectedFilters, setSelectedFilters] = useState<Map<string, number>>(
new Map(feedScreenFilters.map((key:string)=>[
key,
getFeedScreenFilterIndex(key)
]))
);

const intl = useIntl();


useImperativeHandle(ref, () => ({
show: () => {
sheetModalRef.current?.setModalVisible(true);
},
}));


const _onClose = () => {
sheetModalRef.current?.setModalVisible(false);
}

//save snippet based on editor type
const _onApply = () => {
if(selectedFilters.size !== 3){
alert(intl.formatMessage({id:'alert.wrong_filter_count'}));
return;
}
const entries = Array.from(selectedFilters.entries());
entries.sort((a, b)=>a[1]<b[1]?-1:1);

dispatch(setFeedScreenFilters(entries.map((e)=>e[0])));
_onClose();
}


const _renderOptions = () => {
const options = [];
for(const key in FEED_SCREEN_FILTER_MAP){
if(FEED_SCREEN_FILTER_MAP.hasOwnProperty(key)){
const isSelected = selectedFilters.has(key);

const _onPress = () => {
if(isSelected){
selectedFilters.delete(key);
}else{
var index = getFeedScreenFilterIndex(key);
selectedFilters.set(key, index);
}
setSelectedFilters(new Map([...selectedFilters]));
}

options.push((
<TouchableOpacity key={key} onPress={_onPress}>
<View style={styles.checkView}>
<Text style={styles.informationText}>
{intl.formatMessage({
id:FEED_SCREEN_FILTER_MAP[key]
})}
</Text>
<CheckBox locked isChecked={isSelected} />
</View>
</TouchableOpacity>
))
}
}

return (
<View style={styles.textContainer}>
{options}
</View>
)
}


const _renderContent = (
<ThemeContainer>
{({isDarkTheme})=>(
<KeyboardAvoidingView
style={styles.container}
keyboardVerticalOffset={Platform.OS == 'ios' ? 64 : null}
behavior={Platform.OS === 'ios' ? 'padding' : null}
>
<Text style={styles.title}>Customise Filters</Text>

{_renderOptions()}



<View style={styles.actionPanel}>
<TextButton
text={'APPLY'}
onPress={_onApply}
textStyle={styles.btnText}
style={styles.button}
/>
</View>

</KeyboardAvoidingView>
)}
</ThemeContainer>
)

return (
<ActionSheet
ref={sheetModalRef}
containerStyle={styles.sheetContent}
indicatorColor={EStyleSheet.value('$primaryWhiteLightBackground')}
onClose={_onClose}
>
{_renderContent}
</ActionSheet>

);
};

export default forwardRef(CustomiseFiltersModal);


Loading

0 comments on commit 24d6ac3

Please sign in to comment.