Skip to content

Commit

Permalink
Merge pull request #1822 from ecency/development
Browse files Browse the repository at this point in the history
3.0.12
  • Loading branch information
feruzm authored Jan 8, 2021
2 parents fcc216c + a237efc commit 1ce429b
Show file tree
Hide file tree
Showing 154 changed files with 5,534 additions and 1,331 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ ACTIVITY_WEBSOCKET_URL=
BACKEND_URL=
ECENCY_BACKEND_API=
NEW_IMAGE_API=
OLD_IMAGE_API=
PIN_KEY=
DEFAULT_PIN=
SEARCH_API_TOKEN=
Expand Down
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.11"
versionName "3.0.12"
resValue "string", "build_config_package", "app.esteem.mobile.android"
multiDexEnabled true
// react-native-image-crop-picker
Expand Down
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.11</string>
<string>3.0.12</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2561</string>
<string>2562</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.11</string>
<string>3.0.12</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2561</string>
<string>2562</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/Ecency.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2561;
CURRENT_PROJECT_VERSION = 2562;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 75B6RXTKGT;
HEADER_SEARCH_PATHS = (
Expand Down Expand Up @@ -1180,7 +1180,7 @@
CODE_SIGN_ENTITLEMENTS = Ecency/Ecency.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2561;
CURRENT_PROJECT_VERSION = 2562;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 75B6RXTKGT;
HEADER_SEARCH_PATHS = (
Expand Down
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.11</string>
<string>3.0.12</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.11</string>
<string>3.0.12</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2561</string>
<string>2562</string>
</dict>
</plist>
14 changes: 10 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ PODS:
- react-native-config/App (= 1.3.3)
- react-native-config/App (1.3.3):
- React
- react-native-date-picker (3.2.7):
- React-Core
- react-native-matomo-sdk (0.4.1):
- MatomoTracker (~> 7)
- React (~> 0.60)
Expand Down Expand Up @@ -401,8 +403,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):
Expand Down Expand Up @@ -446,6 +448,7 @@ DEPENDENCIES:
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- "react-native-cameraroll (from `../node_modules/@react-native-community/cameraroll`)"
- react-native-config (from `../node_modules/react-native-config`)
- react-native-date-picker (from `../node_modules/react-native-date-picker`)
- react-native-matomo-sdk (from `../node_modules/react-native-matomo-sdk`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-receive-sharing-intent (from `../node_modules/react-native-receive-sharing-intent`)
Expand Down Expand Up @@ -555,6 +558,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-community/cameraroll"
react-native-config:
:path: "../node_modules/react-native-config"
react-native-date-picker:
:path: "../node_modules/react-native-date-picker"
react-native-matomo-sdk:
:path: "../node_modules/react-native-matomo-sdk"
react-native-netinfo:
Expand Down Expand Up @@ -668,6 +673,7 @@ SPEC CHECKSUMS:
React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0
react-native-cameraroll: e2917a5e62da9f10c3d525e157e25e694d2d6dfa
react-native-config: 9a061347e0136fdb32d43a34d60999297d672361
react-native-date-picker: 5b66e04e7ed02478feb77a41d254ba24f120f956
react-native-matomo-sdk: 025c54f92e1e26a4d0acee7c3f28cb0fc7e4729c
react-native-netinfo: a53b00d949b6456913aaf507d9dba90c4008c611
react-native-receive-sharing-intent: feba0a332a07977549a85aa58b496eb44368366a
Expand Down Expand Up @@ -696,7 +702,7 @@ SPEC CHECKSUMS:
RNGestureHandler: b6b359bb800ae399a9c8b27032bdbf7c18f08a08
RNIap: b4c77c8bc4501203f4b743126a05da23f10f40b4
RNImageCropPicker: 9d1a7eea4f8368fc479cbd2bf26459bd3c74d9aa
RNReanimated: 7de2dca51deacff78bb880f63c1389a24311b376
RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad
RNScreens: b748efec66e095134c7166ca333b628cd7e6f3e2
RNSVG: 8ba35cbeb385a52fd960fd28db9d7d18b4c2974f
RNVectorIcons: 368d6d8b8301224e5ffb6254191f4f8876c2be0d
Expand All @@ -708,4 +714,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 1f30c7da5061dbc47185442a6ab4a3c95ac48c04

COCOAPODS: 1.9.1
COCOAPODS: 1.10.0
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.11</string>
<string>3.0.12</string>
<key>CFBundleVersion</key>
<string>2561</string>
<string>2562</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ecency",
"version": "3.0.11",
"version": "3.0.12",
"displayName": "Ecency",
"private": true,
"rnpm": {
Expand Down Expand Up @@ -69,7 +69,7 @@
"react-native-autoheight-webview": "^1.5.2",
"react-native-config": "luggit/react-native-config#master",
"react-native-dark-mode": "^0.2.2",
"react-native-datepicker": "ecency/react-native-datepicker",
"react-native-date-picker": "^3.2.7",
"react-native-extended-stylesheet": "^0.10.0",
"react-native-fast-image": "^8.3.2",
"react-native-gesture-handler": "^1.4.1",
Expand Down
4 changes: 4 additions & 0 deletions src/components/basicHeader/view/basicHeaderStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,8 @@ export default EStyleSheet.create({
fontWeight: '500',
width: '$deviceWidth / 1.4',
},
dateTimeModal: {
backgroundColor: '$primaryBackgroundColor',
alignItems: 'center',
},
});
48 changes: 38 additions & 10 deletions src/components/basicHeader/view/basicHeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { View, Text, ActivityIndicator, SafeAreaView } from 'react-native';
import { injectIntl } from 'react-intl';
import ActionSheet from 'react-native-actionsheet';
import { useSelector } from 'react-redux';
import moment from 'moment';

// Components
import { TextButton, Modal, BeneficiaryModal } from '../..';
Expand Down Expand Up @@ -48,6 +49,8 @@ const BasicHeaderView = ({
}) => {
const [isInputVisible, setIsInputVisible] = useState(false);
const [beneficiaryModal, setBeneficiaryModal] = useState(false);
const [showScheduleModal, setShowScheduleModal] = useState(false);
const [scheduledDate, setScheduledDate] = useState('');

const username = useSelector((state) => state.account.currentAccount.name);

Expand Down Expand Up @@ -78,7 +81,7 @@ const BasicHeaderView = ({
const _handleSettingMenuSelect = (index) => {
switch (index) {
case 0:
scheduleRef.current.onPressDate();
setShowScheduleModal(true);
break;
case 1:
rewardMenuRef.current.show();
Expand Down Expand Up @@ -123,9 +126,19 @@ const BasicHeaderView = ({
};

const _handleDatePickerChange = (datePickerValue) => {
if (handleDatePickerChange) {
handleDatePickerChange(datePickerValue);
setScheduledDate(datePickerValue);
};

const _onPressDone = () => {
let dateString = scheduledDate;

if (dateString === '') {
dateString = moment().format();
}

setScheduledDate('');
handleDatePickerChange(dateString);
setShowScheduleModal(false);
};

return (
Expand All @@ -149,18 +162,11 @@ const BasicHeaderView = ({
disabled={disabled}
/>
)}
<DateTimePicker
type="date-time"
onSubmit={_handleDatePickerChange}
disabled={!isFormValid}
ref={scheduleRef}
/>
{!isInputVisible && (
<Text style={[title && styles.title, quickTitle && styles.quickTitle]}>
{quickTitle || title}
</Text>
)}

{isHasDropdown && (
<View>
{dropdownComponent ? (
Expand Down Expand Up @@ -264,6 +270,28 @@ const BasicHeaderView = ({
handleOnSaveBeneficiaries={_handleOnSaveBeneficiaries}
/>
</Modal>
<Modal
isFullScreen={false}
isOpen={showScheduleModal}
isBottomModal
isTransparent
isRadius
coverScreen={false}
title={intl.formatMessage({ id: 'editor.schedule_modal_title' })}
hasRightText
rightText="Done"
onPressRightText={_onPressDone}
onBackdropPress={() => setShowScheduleModal(false)}
>
<SafeAreaView style={styles.dateTimeModal}>
<DateTimePicker
type="datetime"
onChanged={_handleDatePickerChange}
disabled={!isFormValid}
ref={scheduleRef}
/>
</SafeAreaView>
</Modal>
<ActionSheet
ref={settingMenuRef}
options={[
Expand Down
4 changes: 4 additions & 0 deletions src/components/basicUIElements/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Tag from './view/tag/tagContainer';
import TextWithIcon from './view/textWithIcon/textWithIconView';
import UserListItem from './view/userListItem/userListItem';
import WalletLineItem from './view/walletLineItem/walletLineItemView';
import CommunityListItem from './view/communityListItem/communityListItem';
import Separator from './view/separator/separatorView';

// Placeholders
import ListItemPlaceHolder from './view/placeHolder/listItemPlaceHolderView';
Expand Down Expand Up @@ -40,8 +42,10 @@ export {
Tag,
TextWithIcon,
UserListItem,
CommunityListItem,
WalletDetailsPlaceHolder,
WalletLineItem,
WalletUnclaimedPlaceHolder,
CommunitiesPlaceHolder,
Separator,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import React, { useState } from 'react';
import { View, Text, TouchableOpacity, ActivityIndicator } from 'react-native';
import { useIntl } from 'react-intl';

import styles from './communityListItemStyles';

import { Tag } from '../../index';

const CommunityListItem = ({
index,
handleOnPress,
handleOnLongPress,
title,
about,
admins,
id,
authors,
posts,
subscribers,
isNsfw,
name,
handleSubscribeButtonPress,
isSubscribed,
isLoggedIn,
isLoadingRightAction,
}) => {
const intl = useIntl();

const _handleSubscribeButtonPress = () => {
handleSubscribeButtonPress({ isSubscribed, communityId: name });
};

return (
<TouchableOpacity
onLongPress={() => handleOnLongPress && handleOnLongPress()}
onPress={() => handleOnPress && handleOnPress(name)}
>
<View style={[styles.itemWrapper, index % 2 !== 0 && styles.itemWrapperGray]}>
<View style={styles.content}>
<View style={styles.header}>
<Text style={styles.title}>{title}</Text>
{isLoggedIn &&
(isLoadingRightAction ? (
<View style={styles.joinTag}>
<ActivityIndicator style={styles.activityIndicator} />
</View>
) : (
<Tag
style={styles.subscribeButton}
textStyle={isSubscribed && styles.subscribeButtonText}
value={
!isSubscribed
? intl.formatMessage({
id: 'search_result.communities.subscribe',
})
: intl.formatMessage({
id: 'search_result.communities.unsubscribe',
})
}
isPin={!isSubscribed}
isFilter
onPress={_handleSubscribeButtonPress}
/>
))}
</View>
{!!about && <Text style={styles.about}>{about}</Text>}
<View style={styles.separator} />
<Text style={styles.stats}>
{`${subscribers.toString()} ${intl.formatMessage({
id: 'search_result.communities.subscribers',
})}${authors.toString()} ${intl.formatMessage({
id: 'search_result.communities.posters',
})}${posts} ${intl.formatMessage({
id: 'search_result.communities.posts',
})}`}
</Text>
</View>
</View>
</TouchableOpacity>
);
};

export default CommunityListItem;
Loading

0 comments on commit 1ce429b

Please sign in to comment.