diff --git a/android/app/build.gradle b/android/app/build.gradle
index cf19f1a82..67840c99b 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -143,7 +143,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch
- versionName "3.0.10"
+ versionName "3.0.11"
resValue "string", "build_config_package", "app.esteem.mobile.android"
multiDexEnabled true
// react-native-image-crop-picker
diff --git a/ios/Ecency-tvOS/Info.plist b/ios/Ecency-tvOS/Info.plist
index 678c2bacb..fe4dfce45 100644
--- a/ios/Ecency-tvOS/Info.plist
+++ b/ios/Ecency-tvOS/Info.plist
@@ -15,11 +15,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 3.0.10
+ 3.0.11
CFBundleSignature
????
CFBundleVersion
- 2560
+ 2561
LSRequiresIPhoneOS
NSAppTransportSecurity
diff --git a/ios/Ecency-tvOSTests/Info.plist b/ios/Ecency-tvOSTests/Info.plist
index 3fa1b4cf0..ba19aa2c3 100644
--- a/ios/Ecency-tvOSTests/Info.plist
+++ b/ios/Ecency-tvOSTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 3.0.10
+ 3.0.11
CFBundleSignature
????
CFBundleVersion
- 2560
+ 2561
diff --git a/ios/Ecency.xcodeproj/project.pbxproj b/ios/Ecency.xcodeproj/project.pbxproj
index 0cab5b242..cf1d2b846 100644
--- a/ios/Ecency.xcodeproj/project.pbxproj
+++ b/ios/Ecency.xcodeproj/project.pbxproj
@@ -1104,7 +1104,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 2560;
+ CURRENT_PROJECT_VERSION = 2561;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 75B6RXTKGT;
HEADER_SEARCH_PATHS = (
@@ -1180,7 +1180,7 @@
CODE_SIGN_ENTITLEMENTS = Ecency/Ecency.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 2560;
+ CURRENT_PROJECT_VERSION = 2561;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 75B6RXTKGT;
HEADER_SEARCH_PATHS = (
diff --git a/ios/Ecency/Info.plist b/ios/Ecency/Info.plist
index bbbfdb41d..1b191734a 100644
--- a/ios/Ecency/Info.plist
+++ b/ios/Ecency/Info.plist
@@ -19,7 +19,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 3.0.10
+ 3.0.11
CFBundleSignature
????
CFBundleURLTypes
diff --git a/ios/EcencyTests/Info.plist b/ios/EcencyTests/Info.plist
index c36cb9504..00f956b68 100644
--- a/ios/EcencyTests/Info.plist
+++ b/ios/EcencyTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 3.0.10
+ 3.0.11
CFBundleSignature
????
CFBundleVersion
- 2560
+ 2561
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 5eb2add02..8febb30a1 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -401,8 +401,8 @@ PODS:
- React-Core
- React-RCTImage
- RSKImageCropper
- - RNReanimated (1.10.2):
- - React
+ - RNReanimated (1.13.2):
+ - React-Core
- RNScreens (2.10.1):
- React
- RNSVG (9.13.6):
@@ -696,7 +696,7 @@ SPEC CHECKSUMS:
RNGestureHandler: b6b359bb800ae399a9c8b27032bdbf7c18f08a08
RNIap: b4c77c8bc4501203f4b743126a05da23f10f40b4
RNImageCropPicker: 9d1a7eea4f8368fc479cbd2bf26459bd3c74d9aa
- RNReanimated: 7de2dca51deacff78bb880f63c1389a24311b376
+ RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad
RNScreens: b748efec66e095134c7166ca333b628cd7e6f3e2
RNSVG: 8ba35cbeb385a52fd960fd28db9d7d18b4c2974f
RNVectorIcons: 368d6d8b8301224e5ffb6254191f4f8876c2be0d
diff --git a/ios/eshare/Info.plist b/ios/eshare/Info.plist
index 382e827c0..d939105dc 100644
--- a/ios/eshare/Info.plist
+++ b/ios/eshare/Info.plist
@@ -17,9 +17,9 @@
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
- 3.0.10
+ 3.0.11
CFBundleVersion
- 2560
+ 2561
NSExtension
NSExtensionAttributes
diff --git a/package.json b/package.json
index 880a83ddf..e4df8e940 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ecency",
- "version": "3.0.10",
+ "version": "3.0.11",
"displayName": "Ecency",
"private": true,
"rnpm": {
diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json
index 374a2c14e..dd1241509 100644
--- a/src/config/locales/en-US.json
+++ b/src/config/locales/en-US.json
@@ -527,15 +527,16 @@
"others": "Others",
"communities": {
"title": "Communities",
- "subscribe": "Subscribe",
- "unsubscribe": "Unsubscribe",
- "subscribers": "Subscribers",
+ "subscribe": "Join",
+ "unsubscribe": "Leave",
+ "subscribers": "Members",
"posters": "Posters",
"posts": "Posts"
},
"communities_filter": {
+ "my": "My Communities",
"rank": "Rank",
- "subs": "Subscribers",
+ "subs": "Members",
"new": "New"
},
"post_result_filter": {
diff --git a/src/screens/searchResult/container/communitiesContainer.js b/src/screens/searchResult/container/communitiesContainer.js
index dd4e522d1..e3f65d20f 100644
--- a/src/screens/searchResult/container/communitiesContainer.js
+++ b/src/screens/searchResult/container/communitiesContainer.js
@@ -17,22 +17,32 @@ const CommunitiesContainer = ({
isLoggedIn,
}) => {
const [data, setData] = useState();
- const [filterIndex, setFilterIndex] = useState(0);
+ const [filterIndex, setFilterIndex] = useState(1);
const [query, setQuery] = useState('');
const [sort, setSort] = useState('rank');
const [allSubscriptions, setAllSubscriptions] = useState([]);
const [noResult, setNoResult] = useState(false);
useEffect(() => {
+ let isCancelled = false;
setData([]);
- getCommunities('', 100, query, sort).then((res) => {
- if (!isEmpty(res)) {
- setData(res);
- setNoResult(false);
- } else {
- setNoResult(true);
- }
- });
+ if (sort === 'my') {
+ setNoResult(true);
+ } else {
+ getCommunities('', 100, query, sort).then((res) => {
+ if (!isCancelled) {
+ if (!isEmpty(res)) {
+ setData(res);
+ setNoResult(false);
+ } else {
+ setNoResult(true);
+ }
+ }
+ });
+ }
+ return () => {
+ isCancelled = true;
+ };
}, [query, sort]);
useEffect(() => {
@@ -42,13 +52,17 @@ const CommunitiesContainer = ({
}, [searchValue]);
useEffect(() => {
- if (data) {
+ let isCancelled = false;
+ if (data && !isCancelled) {
getSubscriptions(currentAccount.username).then((result) => {
if (result) {
setAllSubscriptions(result);
}
});
}
+ return () => {
+ isCancelled = true;
+ };
}, [data]);
// Component Functions
diff --git a/src/screens/searchResult/screen/communities.js b/src/screens/searchResult/screen/communities.js
index 1c4633e9b..d80580842 100644
--- a/src/screens/searchResult/screen/communities.js
+++ b/src/screens/searchResult/screen/communities.js
@@ -1,20 +1,35 @@
import React from 'react';
import { useIntl } from 'react-intl';
+import { FlatList, View, Text, TouchableOpacity } from 'react-native';
import get from 'lodash/get';
// Components
-import { FilterBar } from '../../../components';
+import { FilterBar, UserAvatar } from '../../../components';
import CommunitiesList from './communitiesList';
+import { CommunitiesPlaceHolder } from '../../../components/basicUIElements';
import CommunitiesContainer from '../container/communitiesContainer';
+import styles from './otherResultsStyles';
+import DEFAULT_IMAGE from '../../../assets/no_image.png';
+import Tag from '../../../components/basicUIElements/view/tag/tagView';
-const filterOptions = ['rank', 'subs', 'new'];
+const filterOptions = ['my', 'rank', 'subs', 'new'];
const CommunitiesScreen = ({ navigation, searchValue }) => {
const intl = useIntl();
const activeVotes = get(navigation, 'state.params.activeVotes');
+ const _renderEmptyContent = () => {
+ return (
+ <>
+
+
+
+ >
+ );
+ };
+
return (
{({
@@ -41,14 +56,49 @@ const CommunitiesScreen = ({ navigation, searchValue }) => {
selectedOptionIndex={filterIndex}
onDropdownSelect={(index) => handleOnVotersDropdownSelect(index, filterOptions[index])}
/>
-
+ {filterIndex !== 0 && (
+
+ )}
+ {filterIndex === 0 && allSubscriptions && allSubscriptions.length > 0 && (
+ `${item}-${ind}`}
+ renderItem={({ item, index }) => (
+
+
+ handleOnPress(item[0])}>
+
+
+ handleOnPress(item[0])}>
+ {item[1]}
+
+
+
+
+ handleSubscribeButtonPress({ isSubscribed: true, communityId: item[0] })
+ }
+ />
+
+
+ )}
+ ListEmptyComponent={_renderEmptyContent}
+ />
+ )}
>
)}
diff --git a/src/screens/searchResult/screen/communitiesListItemStyles.js b/src/screens/searchResult/screen/communitiesListItemStyles.js
index d28760b23..19880705c 100644
--- a/src/screens/searchResult/screen/communitiesListItemStyles.js
+++ b/src/screens/searchResult/screen/communitiesListItemStyles.js
@@ -30,25 +30,29 @@ export default EStyleSheet.create({
fontSize: 14,
fontFamily: '$primaryFont',
marginTop: 5,
+ paddingTop: 10,
color: '$primaryBlack',
},
separator: {
width: 100,
alignSelf: 'center',
backgroundColor: '$primaryDarkGray',
- height: 0.5,
- marginVertical: 5,
+ height: 1,
+ marginVertical: 10,
},
stats: {
fontSize: 14,
fontFamily: '$primaryFont',
color: '$primaryDarkGray',
+ paddingBottom: 10,
},
subscribeButton: {
borderWidth: 1,
+ maxWidth: 75,
borderColor: '$primaryBlue',
},
subscribeButtonText: {
+ textAlign: 'center',
color: '$primaryBlue',
},
header: {
diff --git a/src/screens/searchResult/screen/otherResultsStyles.js b/src/screens/searchResult/screen/otherResultsStyles.js
index 82503bc86..7ae77aa17 100644
--- a/src/screens/searchResult/screen/otherResultsStyles.js
+++ b/src/screens/searchResult/screen/otherResultsStyles.js
@@ -21,4 +21,23 @@ export default EStyleSheet.create({
marginLeft: 10,
color: '$primaryBlack',
},
+ communityWrapper: {
+ paddingHorizontal: 16,
+ paddingTop: 16,
+ paddingBottom: 8,
+ borderRadius: 8,
+ backgroundColor: '$primaryBackgroundColor',
+ flexDirection: 'row',
+ alignItems: 'center',
+ flex: 1,
+ },
+ subscribeButton: {
+ maxWidth: 75,
+ borderWidth: 1,
+ borderColor: '$primaryBlue',
+ },
+ subscribeButtonText: {
+ textAlign: 'center',
+ color: '$primaryBlue',
+ },
});
diff --git a/yarn.lock b/yarn.lock
index 4b753dc22..ce659fbed 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7615,9 +7615,9 @@ react-native-qrcode-svg@^6.0.3:
qrcode "^1.3.2"
react-native-reanimated@^1.3.0:
- version "1.10.2"
- resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-1.10.2.tgz#012fd0ddb5f64c82b5df66d4d0e19cb9e95e4b41"
- integrity sha512-Bg/FvpK3todfdW8u77M6xKR/n0f6h/z3FVdVbYJR3j47Xibb5BKlrWkG/tc5IE4syePrxK8Nkq0Ja2+tscnUlQ==
+ version "1.13.2"
+ resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-1.13.2.tgz#1ae5457b24b4913d173a5a064bb28eae7783d293"
+ integrity sha512-O+WhgxSjOIzcVdAAvx+h2DY331Ek1knKlaq+jsNLpC1fhRy9XTdOObovgob/aF2ve9uJfPEawCx8381g/tUJZQ==
dependencies:
fbjs "^1.0.0"