diff --git a/android/app/build.gradle b/android/app/build.gradle
index a2c8bbc5..234c143c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -126,8 +126,8 @@ android {
applicationId "com.pepo.staging"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 17
- versionName "0.9.4"
+ versionCode 18
+ versionName "0.9.5"
missingDimensionStrategy 'react-native-camera', 'general'
}
splits {
diff --git a/ios/Cartfile b/ios/Cartfile
index 3a99b7ba..e7870de5 100644
--- a/ios/Cartfile
+++ b/ios/Cartfile
@@ -1 +1 @@
-github "ostdotcom/ost-wallet-sdk-ios" == 2.3.2
+github "ostdotcom/ost-wallet-sdk-ios" == 2.3.3
diff --git a/ios/Pepo2.xcodeproj/project.pbxproj b/ios/Pepo2.xcodeproj/project.pbxproj
index cc04b439..966bd440 100644
--- a/ios/Pepo2.xcodeproj/project.pbxproj
+++ b/ios/Pepo2.xcodeproj/project.pbxproj
@@ -5,6 +5,7 @@
};
objectVersion = 46;
objects = {
+
/* Begin PBXBuildFile section */
00029B4323329B55009E6919 /* TrustKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B76D86A2318FAAC007316D4 /* TrustKit.framework */; };
00029B4423329B63009E6919 /* OstWalletSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0050FDA022A8226800C2634F /* OstWalletSdk.framework */; };
@@ -1468,6 +1469,9 @@
com.apple.BackgroundModes = {
enabled = 1;
};
+ com.apple.DataProtection = {
+ enabled = 1;
+ };
com.apple.InAppPurchase = {
enabled = 1;
};
@@ -2340,6 +2344,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.pepo.staging;
PRODUCT_NAME = Pepo2;
PROVISIONING_PROFILE_SPECIFIER = "";
+ TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
diff --git a/ios/Pepo2/Info.plist b/ios/Pepo2/Info.plist
index 5f5c5407..db4a267d 100644
--- a/ios/Pepo2/Info.plist
+++ b/ios/Pepo2/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.9.4
+ 0.9.5
CFBundleSignature
????
CFBundleURLTypes
@@ -40,7 +40,7 @@
CFBundleVersion
- 18
+ 19
Fabric
APIKey
diff --git a/ios/Pepo2/Pepo2.entitlements b/ios/Pepo2/Pepo2.entitlements
index 956a0e32..cb66b001 100644
--- a/ios/Pepo2/Pepo2.entitlements
+++ b/ios/Pepo2/Pepo2.entitlements
@@ -9,5 +9,7 @@
applinks:stagingpepo.com
applinks:app.stagingpepo.com
+ com.apple.developer.default-data-protection
+ NSFileProtectionComplete
diff --git a/src/components/CommonComponents/TagsInput/CustomTextInput.js b/src/components/CommonComponents/TagsInput/CustomTextInput.js
index 3a897ce5..1234830e 100644
--- a/src/components/CommonComponents/TagsInput/CustomTextInput.js
+++ b/src/components/CommonComponents/TagsInput/CustomTextInput.js
@@ -8,12 +8,29 @@ const MAX_LENGTH = 500;
class CustomTextInput extends PureComponent {
constructor(props) {
super(props);
+ this.textInputRef = null;
}
+ setTextInputRef = (textInputRef) => {
+ this.textInputRef = textInputRef;
+ if ( this.props.value ) {
+ this.setInputText( this.props.value );
+ }
+ };
+
+ setInputText = ( text ) => {
+ if ( this.textInputRef ) {
+ this.textInputRef.setNativeProps({
+ "text": text
+ });
+ }
+ };
+
render() {
return (
{
@@ -21,7 +38,6 @@ class CustomTextInput extends PureComponent {
}}
multiline={true}
autoFocus={this.props.autoFocus}
- value={this.props.value}
placeholder={this.props.placeholderText}
multiline={true}
numberOfLines={3}
diff --git a/src/components/CommonComponents/TagsInput/index.js b/src/components/CommonComponents/TagsInput/index.js
index 22b11281..001c55ef 100644
--- a/src/components/CommonComponents/TagsInput/index.js
+++ b/src/components/CommonComponents/TagsInput/index.js
@@ -9,13 +9,14 @@ class TagsInput extends PureComponent {
super(props);
this.state = {
data: [],
- value: this.props.initialValue,
keyword: ''
};
+ this.value = this.props.initialValue;
this.reqTimer = 0;
this.wordIndex = -1;
this.indexWord = null;
this.isTrackingStarted = false;
+ this.customTextInputRef = null;
}
fetchHashTags = (keyword) => {
@@ -66,10 +67,15 @@ class TagsInput extends PureComponent {
this.changeValue(val);
};
+ setCustomInputRef = ( ref )=> {
+ this.customTextInputRef = ref;
+ }
+
changeValue = (val) => {
- this.setState({
- value: val
+ this.customTextInputRef.textInputRef.setNativeProps({
+ "text": val
});
+ this.value = val;
this.props.onChangeVal(val);
};
@@ -123,11 +129,11 @@ class TagsInput extends PureComponent {
onSuggestionTap(item) {
this.closeSuggestionsPanel();
- const wordToReplace = this.getWordAtIndex(this.state.value, this.wordIndex),
+ const wordToReplace = this.getWordAtIndex(this.value, this.wordIndex),
isHashTag = this.isHashTag(wordToReplace);
if (isHashTag) {
- const startIndex = this.getStartIndex(this.state.value, this.wordIndex),
- endIndex = this.getEndIndex(this.state.value, this.wordIndex),
+ const startIndex = this.getStartIndex(this.value, this.wordIndex),
+ endIndex = this.getEndIndex(this.value, this.wordIndex),
replaceString = ` #${item.text} `,
newString = this.replaceBetween(startIndex, endIndex, replaceString);
this.changeValue(newString);
@@ -135,7 +141,7 @@ class TagsInput extends PureComponent {
}
replaceBetween(start, end, replaceString) {
- return this.state.value.substring(0, start) + replaceString + this.state.value.substring(end);
+ return this.value.substring(0, start) + replaceString + this.value.substring(end);
}
getStartIndex(text, index) {
@@ -175,10 +181,11 @@ class TagsInput extends PureComponent {
renderItem={this._renderItem}
ListHeaderComponent={
{
- this.props.submitEvent(this.state.value);
+ this.props.submitEvent(this.value);
}}
locationGetter={this.locationGetter}
onChangeText={this.onChangeText}
diff --git a/src/components/CommonComponents/UserInfo/index.js b/src/components/CommonComponents/UserInfo/index.js
index a91b35eb..f77e135b 100644
--- a/src/components/CommonComponents/UserInfo/index.js
+++ b/src/components/CommonComponents/UserInfo/index.js
@@ -16,6 +16,7 @@ import InAppBrowser from '../../../services/InAppBrowser';
import profileLink from '../../../assets/profile_link.png';
import twitterLink from '../../../assets/twitter_link.png';
import Utilities from '../../../services/Utilities';
+import inlineStyles from '../../Home/styles';
const mapStateToProps = (state, ownProps) => {
return {
@@ -82,6 +83,25 @@ class UserInfo extends React.PureComponent {
);
};
+ onTagPressed = (tag) => {
+ let entity = reduxGetter.getBioIncudes(this.props.userId, tag);
+ if (!entity) {
+ return;
+ }
+
+ if(entity.kind === 'tags'){
+ this.props.navigation.push('VideoTags', {
+ "tagId": entity.id
+ });
+ }
+ };
+
+ isValidBioTag(userId, tappedText) {
+ let entity = reduxGetter.getBioIncudes(userId, tappedText);
+ return !!entity;
+ }
+
+
render() {
return (
@@ -129,7 +149,33 @@ class UserInfo extends React.PureComponent {
Received
- {!!this.props.bio && {this.props.bio}}
+ {!!this.props.bio &&
+ {this.props.bio.split(' ').map((item) => {
+
+ let onPressFunc = () => {};
+ let style = [inlineStyle.bioSection];
+ if (item.startsWith('#') && this.isValidBioTag(this.props.userId, item)) {
+ onPressFunc = this.onTagPressed;
+ style.push({fontFamily:'AvenirNext-DemiBold'});
+ let tagText = item.replace("#", "");
+ return(
+ {onPressFunc(item)} }
+ >
+ #{tagText + " "}
+
+ );
+
+
+ }
+
+ // Default return
+ return({item+ " "});
+
+ })}
+ }
+
{!!this.props.link && (
diff --git a/src/components/CommonComponents/UserInfo/styles.js b/src/components/CommonComponents/UserInfo/styles.js
index ef310f3d..2539e435 100644
--- a/src/components/CommonComponents/UserInfo/styles.js
+++ b/src/components/CommonComponents/UserInfo/styles.js
@@ -32,12 +32,14 @@ let stylesMap = {
fontFamily: 'AvenirNext-DemiBold'
},
bioSection: {
- textAlign: 'center',
- marginTop: 20,
- paddingHorizontal: 30,
color: Colors.valhalla,
fontSize: 14
},
+ bioSectionWrapper: {
+ marginTop: 20,
+ marginHorizontal: 30,
+ textAlign: 'center'
+ },
numericInfoWrapper: {
marginTop: 20,
flexDirection: 'row',
diff --git a/src/components/CustomTab/index.js b/src/components/CustomTab/index.js
index 0eebfab4..af1acfa1 100644
--- a/src/components/CustomTab/index.js
+++ b/src/components/CustomTab/index.js
@@ -28,7 +28,6 @@ const mapStateToProps = (state, ownProps) => {
};
let previousTabIndex = 0;
-let tabBeforeCaptureVideo = null;
function onTabPressed(navigation, tab) {
if (CurrentUser.getOstUserId()) {
@@ -38,30 +37,16 @@ function onTabPressed(navigation, tab) {
}
}
-function getStackbeforeVideoCapture(index) {
- for (let config in appConfig.tabConfig){
- if ( appConfig.tabConfig[config].navigationIndex == index ){
- return appConfig.tabConfig[config];
- }
- }
-
-}
-
let refreshTimeOut = 0;
function loginInFlow(navigation, tab) {
let currentTabIndex = tab.navigationIndex;
- if (tab.rootStack === 'CaptureVideo') {
- tabBeforeCaptureVideo = previousTabIndex;
+ if (tab.rootStack === 'CaptureVideo') {
utilities.handleVideoUploadModal(previousTabIndex, navigation);
return;
}
if (currentTabIndex == undefined || currentTabIndex == null) return;
- if (tabBeforeCaptureVideo != null && currentTabIndex == tabBeforeCaptureVideo ){
- navigation.dispatch(StackActions.popToTop());
- navigation.dispatch(StackActions.popToTop());
- tabBeforeCaptureVideo = null;
- } else if (previousTabIndex !== currentTabIndex) {
+ if (previousTabIndex !== currentTabIndex) {
tab.rootStack == 'Notification' && refreshActivity(tab.childStack);
navigation.navigate(tab.rootStack);
} else if (utilities.getLastChildRoutename(navigation.state) !== tab.childStack) {
diff --git a/src/components/FanVideoDetails/VideoDescription.js b/src/components/FanVideoDetails/VideoDescription.js
index fdca9339..8e6f1930 100644
--- a/src/components/FanVideoDetails/VideoDescription.js
+++ b/src/components/FanVideoDetails/VideoDescription.js
@@ -7,15 +7,10 @@ import TagsInput from '../CommonComponents/TagsInput';
class VideoDescription extends PureComponent {
constructor(props) {
super(props);
- this.state = {
- value: this.props.initialValue
- };
+ this.value = this.props.initialValue;
}
onChangeValue = (value) => {
- this.setState({
- value
- });
this.props.onChangeDesc(value);
};
@@ -26,7 +21,7 @@ class VideoDescription extends PureComponent {
{
return {
@@ -72,9 +73,9 @@ class FanVideoDetails extends Component {
constructor(props) {
super(props);
+ this.videoDesc = this.props.recordedVideo.video_desc;
+ this.videoLink = this.props.recordedVideo.video_link;
this.state = {
- videoDesc: '',
- videoLink: '',
viewStyle: {
paddingBottom: 10
},
@@ -124,28 +125,25 @@ class FanVideoDetails extends Component {
// if (!this.validLink()) return;
utilities.saveItem(`${CurrentUser.getUserId()}-accepted-camera-t-n-c`, true);
Store.dispatch(
- upsertRecordedVideo({ video_desc: this.state.videoDesc, video_link: this.state.videoLink, do_upload: true })
+ upsertRecordedVideo({ video_desc: this.videoDesc, video_link: this.videoLink, do_upload: true })
);
- this.props.navigation.navigate('HomeScreen');
+ this.props.navigation.dispatch(StackActions.popToTop());
+ this.props.navigation.dispatch(StackActions.popToTop());
+ this.props.navigation.navigate('HomeScreen');
};
onChangeDesc = (desc) => {
- this.setState({
- videoDesc: desc
- });
- //Done for the value to be accessible in static navigationOptions
- this.props.navigation.setParams({
+ this.videoDesc = desc;
+ //Done for the value to be accessible in static navigationOptions
+ this.props.navigation.setParams({
videoDesc: desc
});
};
onChangeLink = (link) => {
- this.setState({
- videoLink: link,
- error: ''
- });
- //Done for the value to be accessible in static navigationOptions
- this.props.navigation.setParams({
+ this.videoLink = link;
+ //Done for the value to be accessible in static navigationOptions
+ this.props.navigation.setParams({
videoLink: link
});
};
@@ -157,10 +155,10 @@ class FanVideoDetails extends Component {
};
validLink = () => {
- if (!this.state.videoLink) return true;
+ if (!this.videoLink) return true;
//synced with backend
if (
- !this.state.videoLink.match(
+ !this.videoLink.match(
/^(http(s)?:\/\/)([a-zA-Z0-9-_@:%+~#=]{1,256}\.)+[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=*]*)$/i
)
) {
diff --git a/src/components/FullScreenVideoCollection/FullScreeVideoRow.js b/src/components/FullScreenVideoCollection/FullScreeVideoRow.js
index 79dfc590..0dbf318a 100644
--- a/src/components/FullScreenVideoCollection/FullScreeVideoRow.js
+++ b/src/components/FullScreenVideoCollection/FullScreeVideoRow.js
@@ -53,6 +53,19 @@ class FullScreeVideoRow extends PureComponent {
}
};
+ onDescriptionClick = ( tapEntity , tapText ) => {
+ if (!tapEntity) {
+ return;
+ }
+
+ if( tapEntity.kind === 'tags'){
+ this.props.navigation.push('VideoTags', {
+ "tagId": tapEntity.id
+ });
+ }
+
+ }
+
render() {
return (
@@ -89,6 +102,7 @@ class FullScreeVideoRow extends PureComponent {
userId={this.userId}
videoId={this.videoId}
onWrapperClick={this.navigateToUserProfile}
+ onDescriptionClick={this.onDescriptionClick}
/>
)}
diff --git a/src/components/FullScreenVideoCollection/index.js b/src/components/FullScreenVideoCollection/index.js
index ae082139..4028438f 100644
--- a/src/components/FullScreenVideoCollection/index.js
+++ b/src/components/FullScreenVideoCollection/index.js
@@ -133,7 +133,8 @@ class FullScreenVideoCollection extends PureComponent{
return ;
+ payload={payload}
+ /> ;
};
onViewableItemsChanged = (data) => {
diff --git a/src/components/Home/BottomStatus.js b/src/components/Home/BottomStatus.js
index e327df86..2e6248aa 100644
--- a/src/components/Home/BottomStatus.js
+++ b/src/components/Home/BottomStatus.js
@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
import { withNavigation } from 'react-navigation';
import inlineStyles from './styles';
-import { TouchableWithoutFeedback } from 'react-native-gesture-handler';
+import { TouchableWithoutFeedback, TouchableOpacity } from 'react-native-gesture-handler';
import reduxGetter from '../../services/ReduxGetters';
import multipleClickHandler from '../../services/MultipleClickHandler';
@@ -24,6 +24,7 @@ const mapStateToProps = (state, ownProps) => {
class BottomStatus extends PureComponent {
constructor(props) {
super(props);
+ this.videoDescriptionId = reduxGetter.getVideoDescriptionId(this.props.videoId);
}
onWrapperClick = (e) => {
@@ -32,30 +33,60 @@ class BottomStatus extends PureComponent {
onLinkClick = () => {
InAppBrowser.openBrowser(this.props.link);
+ };
+
+ onTagPressed = (tag) => {
+ let entity = reduxGetter.getTappedIncludesEntity(this.videoDescriptionId, tag);
+ this.props.onDescriptionClick && this.props.onDescriptionClick(entity, tag);
+ };
+
+ isValidTag(videoId, tappedText) {
+ let entity = reduxGetter.getTappedIncludesEntity(videoId, tappedText);
+ return !!entity
}
render() {
return (
- this.onWrapperClick())} pointerEvents={'auto'}>
+
+ this.onWrapperClick())} pointerEvents={'auto'}>
{`@${this.props.userName}`}
+
{this.props.description ? (
- {this.props.description}
+ {this.props.description.split(' ').map((item) => {
+ if (item.startsWith('#') && this.isValidTag(this.videoDescriptionId, item)) {
+ let tagText = item.replace("#", "");
+ return(
+ {this.onTagPressed(item)}}
+ >#{tagText+" "}
+ );
+ }else {
+ return({item+ " "});
+ }
+ })}
) : (
)
}
-
+
{this.props.link ? (
{
@@ -76,7 +107,7 @@ class BottomStatus extends PureComponent {
)}
);
- }
+ };
}
export default connect(mapStateToProps)(withNavigation(BottomStatus));
diff --git a/src/components/Home/HomeFeedRow.js b/src/components/Home/HomeFeedRow.js
index 4b785459..7814e81a 100644
--- a/src/components/Home/HomeFeedRow.js
+++ b/src/components/Home/HomeFeedRow.js
@@ -56,6 +56,21 @@ class HomeFeedRow extends PureComponent {
}
};
+ onDescriptionClick = ( tapEntity , tapText ) => {
+ if (utilities.checkActiveUser()) {
+ if (!tapEntity) {
+ return;
+ }
+
+ if( tapEntity.kind === 'tags'){
+ this.props.navigation.push('VideoTags', {
+ "tagId": tapEntity.id
+ });
+ }
+
+ }
+ };
+
render() {
return (
@@ -90,7 +105,7 @@ class HomeFeedRow extends PureComponent {
/>
-
+
);
diff --git a/src/components/Home/VideoWrapper.js b/src/components/Home/VideoWrapper.js
index afa8797a..76b27141 100644
--- a/src/components/Home/VideoWrapper.js
+++ b/src/components/Home/VideoWrapper.js
@@ -35,6 +35,7 @@ class VideoWrapper extends PureComponent {
this.isPixelCalledOnEnd = false;
this.minTimeConsideredForView = 1;
this.source = {};
+ this.currentPauseStatus = true; //Default value.
this.videoContext = {
userId: null,
@@ -113,6 +114,11 @@ class VideoWrapper extends PureComponent {
playVideo() {
if (this.props.isActive && this.state.paused) {
this.setState({ paused: false });
+ return;
+ }
+ if ( this.isPaused() != this.currentPauseStatus ) {
+ //Force render.
+ this.forceUpdate();
}
}
@@ -206,6 +212,13 @@ class VideoWrapper extends PureComponent {
this.isPixelCalledOnEnd = true;
};
+ getIsVideoPausedStatus = () => {
+ //NOTE: NEVER CALL THIS METHOD FROM ANYWHERE ELSE>
+ //CALLED from paused prop of video.
+ this.currentPauseStatus = this.isPaused();
+ return this.currentPauseStatus;
+ }
+
render() {
return (
@@ -215,7 +228,7 @@ class VideoWrapper extends PureComponent {
poster={this.props.videoImgUrl}
posterResizeMode={this.props.posterResizeMode || 'cover'}
style={[inlineStyles.fullHeightWidthSkipFont, this.props.style]}
- paused={this.isPaused()}
+ paused={this.getIsVideoPausedStatus()}
resizeMode={this.props.resizeMode || 'cover'}
source={{ uri: this.props.videoUrl }}
repeat={this.props.repeat || true}
diff --git a/src/components/Notification/NotificationItem.js b/src/components/Notification/NotificationItem.js
index df26bf6b..80093993 100644
--- a/src/components/Notification/NotificationItem.js
+++ b/src/components/Notification/NotificationItem.js
@@ -172,7 +172,20 @@ class NotificationItem extends Component {
}else if( AppConfig.pepoCornsActivityKinds.includes(this.props.kind)){
return
}else{
- return ;
+ let includesObj = this.props.heading && this.props.heading["includes"] || {} ,
+ userObj ;
+ for(let key in includesObj ){
+ userObj = includesObj[key] || null;
+ break ;
+ }
+ if(userObj){
+ return this.includesTextNavigate(userObj))}>
+
+
+ }else {
+ return ;
+ }
+
}
}
diff --git a/src/components/Transaction/TransactionScreen.js b/src/components/Transaction/TransactionScreen.js
index 70616b39..11506e71 100644
--- a/src/components/Transaction/TransactionScreen.js
+++ b/src/components/Transaction/TransactionScreen.js
@@ -257,9 +257,12 @@ class TransactionScreen extends Component {
return ostErrors.getUIErrorMessage('bt_amount_decimal_allowed_error');
}
btAmount = btAmount && Number(btAmount);
- if (!btAmount || btAmount < validMinAmount || btAmount > this.state.balance) {
+ if (!btAmount || btAmount < validMinAmount) {
return ostErrors.getUIErrorMessage('bt_amount_error');
}
+ if( btAmount && btAmount > this.state.balance ){
+ return ostErrors.getUIErrorMessage('bt_exceeds_bal_amount_error');
+ }
return undefined;
}
diff --git a/src/components/UserVideoHistory/UserVideoHistoryRow.js b/src/components/UserVideoHistory/UserVideoHistoryRow.js
index d3b87eea..9a3b88a1 100644
--- a/src/components/UserVideoHistory/UserVideoHistoryRow.js
+++ b/src/components/UserVideoHistory/UserVideoHistoryRow.js
@@ -50,6 +50,19 @@ class UserVideoHistoryRow extends PureComponent {
shareVideo.perform();
};
+ onDescriptionClick = ( tapEntity , tapText ) => {
+
+ if (!tapEntity) {
+ return;
+ }
+
+ if(tapEntity.kind === 'tags'){
+ this.props.navigation.push('VideoTags', {
+ "tagId": tapEntity.id
+ });
+ }
+ };
+
render() {
return (
@@ -86,6 +99,7 @@ class UserVideoHistoryRow extends PureComponent {
userId={this.props.userId}
videoId={this.props.videoId}
onWrapperClick={this.props.onWrapperClick}
+ onDescriptionClick={this.onDescriptionClick}
/>
)}
diff --git a/src/components/UserVideoHistory/index.js b/src/components/UserVideoHistory/index.js
index 4f45cadb..85808e50 100644
--- a/src/components/UserVideoHistory/index.js
+++ b/src/components/UserVideoHistory/index.js
@@ -16,11 +16,12 @@ const maxVideosThreshold = 3;
class UserVideoHistoryScreen extends PureComponent{
- static navigationOptions = (options) => {
- return {
- header: null
- };
+ static navigationOptions = (options) => {
+ return {
+ headerBackTitle: null,
+ header: null
};
+ };
constructor(props){
super(props);
diff --git a/src/components/VideoTags/index.js b/src/components/VideoTags/index.js
index 709d7a68..83f7c56d 100644
--- a/src/components/VideoTags/index.js
+++ b/src/components/VideoTags/index.js
@@ -10,6 +10,7 @@ import PepoApi from "../../services/PepoApi";
import deepGet from 'lodash/get';
import EmptySearchResult from '../../components/CommonComponents/EmptySearchResult';
import BackArrow from '../CommonComponents/BackArrow';
+import DataContract from "../../constants/DataContract";
const getPageTitle = (tagId, hashTag) => {
let pageTitle = "";
@@ -26,7 +27,8 @@ const getPageTitle = (tagId, hashTag) => {
class VideoTags extends PureComponent {
static navigationOptions = (options) => {
const tagId = options.navigation.getParam('tagId');
- const pageTitle = getPageTitle(tagId);
+ const hashTag = options.navigation.getParam('hashTag') || null;
+ const pageTitle = getPageTitle(tagId, hashTag);
return {
headerBackTitle: null,
@@ -68,10 +70,10 @@ class VideoTags extends PureComponent {
new PepoApi(`/tags/${tagId}`)
.get()
.then((res)=>{
- let hashTag = deepGet(res, 'data.tag');
- const pageTitle = getPageTitle(tagId, hashTag);
+ let result_type = deepGet(res, DataContract.common.resultType),
+ hashTag = deepGet(res, `data.${result_type}` );
if (res && res.success){
- this.props.navigation.setParams({ headerTitle: pageTitle });
+ this.props.navigation.setParams({ hashTag: hashTag });
}
})
}
diff --git a/src/services/OstErrors.js b/src/services/OstErrors.js
index 3bba8f83..7d837bea 100644
--- a/src/services/OstErrors.js
+++ b/src/services/OstErrors.js
@@ -39,7 +39,8 @@ const UIErros = {
redemption_error : "Failed to redeem, please try again later",
max_pepocorns: `Sorry, you don't have enough Pepo Coins to buy this many ${Utilities.getPepoCornsName()}`,
price_point_validation_failed: `Sorry, you don't have enough Pepo Coins to buy this many ${Utilities.getPepoCornsName()}`,
- min_pepocorns: `Minimum amount allowed is 1 ${Utilities.getPepoCornsName()}.`
+ min_pepocorns: `Minimum amount allowed is 1 ${Utilities.getPepoCornsName()}.`,
+ bt_exceeds_bal_amount_error : `Sorry, you don't have enough Pepo Coins for this transactions.`
};
const UIWhitelistedErrorCode = {
diff --git a/src/services/ReduxGetters.js b/src/services/ReduxGetters.js
index 9589b765..26581708 100644
--- a/src/services/ReduxGetters.js
+++ b/src/services/ReduxGetters.js
@@ -82,9 +82,15 @@ class ReduxGetters {
return unescape(deepGet(state, `user_profile_entities.id_${id}.bio.text`));
}
+ getBioIncudes(userId, tappedText) {
+ let lowercasedTappedText = tappedText.toLowerCase();
+ let state = Store.getState();
+ return deepGet(state, `user_profile_entities.id_${userId}.bio.includes.${lowercasedTappedText}`);
+ }
+
canBlockUser(id ,state){
state = state || Store.getState();
- return !!deepGet(state, `user_allowed_action_entities.id_${id}.can_block` , true) ;
+ return !!deepGet(state, `user_allowed_action_entities.id_${id}.can_block` , true) ;
}
getEmail(id, state) {
@@ -117,6 +123,12 @@ class ReduxGetters {
return deepGet(state, `video_stat_entities.id_${id}.description_id`);
}
+ getTappedIncludesEntity(videoId, tappedText) {
+ let lowercasedText = tappedText.toLowerCase();
+ let state = Store.getState();
+ return deepGet(state, `video_description_entities.id_${videoId}.includes.${lowercasedText}`);
+ }
+
getVideoLink(id, state) {
state = state || Store.getState();
return unescape(deepGet(state, `link_entities.id_${id}.url`));
diff --git a/src/theme/ostsdk/ost-wallet-sdk-config.js b/src/theme/ostsdk/ost-wallet-sdk-config.js
index dc87320f..92dec57a 100644
--- a/src/theme/ostsdk/ost-wallet-sdk-config.js
+++ b/src/theme/ostsdk/ost-wallet-sdk-config.js
@@ -4,5 +4,6 @@ export default {
"REQUEST_TIMEOUT_DURATION": 60,
"SESSION_BUFFER_TIME": 3600,
"PRICE_POINT_CURRENCY_SYMBOL": "USD",
- "USE_SEED_PASSWORD": true
+ "USE_SEED_PASSWORD": true,
+ "ENABLE_IOS_DEVICE_RESTORE": true
}