Skip to content

Commit

Permalink
Merge pull request #156 from ostdotcom/team/video-replies-final-v2
Browse files Browse the repository at this point in the history
Team/video replies final v2
  • Loading branch information
Rachin Kapoor authored Nov 29, 2019
2 parents caa53a8 + 089942b commit f04ad9e
Show file tree
Hide file tree
Showing 176 changed files with 7,274 additions and 1,858 deletions.
123 changes: 78 additions & 45 deletions RootNavigationContainer.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { View, Dimensions, Easing, Animated } from 'react-native';
import { View, Platform } from 'react-native';
import { Root } from 'native-base';
import { createSwitchNavigator, createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import NavigationAnimation from "./src/helpers/NavigationAnimation";
import { createBottomTabNavigator } from 'react-navigation-tabs';
import deepGet from 'lodash/get';

import NavigationService from './src/services/NavigationService';
import AuthLoading from './src/components/AuthLoading';
Expand Down Expand Up @@ -39,6 +39,7 @@ import { NotificationToastComponent } from './src/theme/components/NotificationT
import SocketManager from './src/services/SocketManager';
import SearchScreen from './src/components/Search';
import FanVideoDetails from './src/components/FanVideoDetails';
import FanVideoReplyDetails from './src/components/FanVideoReplyDetails';
import WalletSettingScreen from './src/components/WalletSetting';
import StoreProductsScreen from './src/components/StoreProducts';
import PaymentWorker from './src/components/PaymentWorker';
Expand All @@ -56,14 +57,24 @@ import CouchMarks from './src/components/CouchMarks';
import RedemptiomScreen from './src/components/Redemption';
import VideoTags from './src/components/VideoTags';
import FullScreenVideoCollection from './src/components/FullScreenVideoCollection';
import VideoReplies from './src/components/VideoReplies';
import FullScreenReplyCollection from './src/components/FullScreenReplyCollection';
import VideoReplyPlayer from './src/components/CommonComponents/VideoReplyPlayer';

const customTabHiddenRoutes = [
'CaptureVideo',
'FanVideoDetails',
'FanVideoReplyDetails',
'InviteCodeScreen',
'AddEmailScreen',
'InAppBrowserComponent',
'CouchMarks'
'CouchMarks',
'VideoReplies',
'FullScreenReplyCollection',
'FullScreenVideoCollection',
'UserVideoHistory',
'VideoPlayer',
'VideoReplyPlayer'
];

const modalStackConfig = {
Expand All @@ -80,38 +91,44 @@ const modalStackConfig = {

const txModalConfig = {
transparentCard: true,
cardStyle: { backgroundColor: 'rgba(0,0,0,0.5)' },
cardStyle: { backgroundColor: 'rgba(0,0,0,0)' },
gesturesEnabled: false,
transitionConfig: () => ({
transitionSpec: {
duration: 300,
easing: Easing.out(Easing.poly(4)),
timing: Animated.timing
},
screenInterpolator: (sceneProps) => {
const { layout, position, scene } = sceneProps;
const { index } = scene;
transitionConfig: (transitionProps, prevTransitionProps) => {
return NavigationAnimation.defaultTransition();
}
};

const height = layout.initHeight;
const translateY = position.interpolate({
inputRange: [index - 1, index, index + 1],
outputRange: [height, 0, 0]
});
const cardStackConfig = {
transparentCard: true,
cardStyle: { backgroundColor: 'rgba(0,0,0,0)' },
transitionConfig: ( transitionProps, prevTransitionProps ) => {
const scenes = transitionProps["scenes"];
const prevScene = scenes[scenes.length - 2];
const nextScene = scenes[scenes.length - 1];

const opacity = position.interpolate({
inputRange: [index - 1, index - 0.99, index],
outputRange: [0, 1, 1]
});
if (nextScene.route.routeName === 'VideoReplies') {
return NavigationAnimation.fromBottom();
}

return { opacity, transform: [{ translateY }] };
if(Platform.OS == "ios"){
if (prevScene
&& prevScene.route.routeName === 'VideoReplies'
&& nextScene.route.routeName === 'FullScreenReplyCollection') {
return NavigationAnimation.fromBottom();
}
}
})
};

}
}


const CaptureVideoStack = createStackNavigator(
{
CaptureVideo: CaptureVideo,
FanVideoDetails: FanVideoDetails
FanVideoDetails: FanVideoDetails,
FanVideoReplyDetails: FanVideoReplyDetails,
WalletSettingScreen: WalletSettingScreen,
WalletDetails: WalletDetails
},
{
headerLayoutPreset: 'center'
Expand All @@ -134,11 +151,19 @@ const HomePushStack = createStackNavigator(
UserVideoHistory: UserVideoHistory,
SupportingListScreen: SupportingListScreen,
SupportersListScreen: SupportersListScreen,
VideoPlayer: VideoPlayer,
VideoReplyPlayer: VideoReplyPlayer,
VideoTags: VideoTags,
FullScreenVideoCollection: FullScreenVideoCollection
WalletSettingScreen: WalletSettingScreen,
WalletDetails: WalletDetails,
FullScreenVideoCollection: FullScreenVideoCollection,
VideoReplies:VideoReplies ,
FullScreenReplyCollection: FullScreenReplyCollection
},
{
headerLayoutPreset: 'center'
initialRouteName: 'HomeScreen',
headerLayoutPreset: 'center' ,
...cardStackConfig
}
);

Expand Down Expand Up @@ -166,13 +191,19 @@ const NotificationPushStack = createStackNavigator(
UsersProfileScreen: UsersProfileScreen,
UserVideoHistory: UserVideoHistory,
VideoPlayer: VideoPlayer,
VideoReplyPlayer: VideoReplyPlayer,
SupportingListScreen: SupportingListScreen,
SupportersListScreen: SupportersListScreen,
VideoTags: VideoTags,
FullScreenVideoCollection: FullScreenVideoCollection
WalletSettingScreen: WalletSettingScreen,
WalletDetails: WalletDetails,
FullScreenVideoCollection: FullScreenVideoCollection,
VideoReplies:VideoReplies ,
FullScreenReplyCollection: FullScreenReplyCollection
},
{
headerLayoutPreset: 'center'
headerLayoutPreset: 'center',
...cardStackConfig
}
);

Expand All @@ -199,14 +230,19 @@ const ProfilePushStack = createStackNavigator(
BioScreen: BioScreen,
EmailScreen: EmailScreen,
ReferAndEarn: ReferAndEarn,
VideoPlayer: VideoPlayer,
VideoReplyPlayer: VideoReplyPlayer,
Invites: Invites,
WalletSettingScreen: WalletSettingScreen,
WalletDetails: WalletDetails,
VideoTags: VideoTags,
FullScreenVideoCollection: FullScreenVideoCollection
FullScreenVideoCollection: FullScreenVideoCollection,
VideoReplies:VideoReplies ,
FullScreenReplyCollection: FullScreenReplyCollection
},
{
headerLayoutPreset: 'center'
headerLayoutPreset: 'center',
...cardStackConfig
}
);

Expand All @@ -222,17 +258,7 @@ const ProfileStack = createStackNavigator(
StoreProductsScreen: StoreProductsScreen,
RedemptiomScreen: RedemptiomScreen
},
{
headerLayoutPreset: 'center',
headerMode: 'none',
mode: 'modal',
navigationOptions: ({ navigation }) => {
return {
tabBarVisible: deepGet(navigation, 'state.index') === 0
};
},
...txModalConfig
}
{ ...modalStackConfig, ...txModalConfig }
);

const SearchPushStack = createStackNavigator(
Expand All @@ -242,11 +268,18 @@ const SearchPushStack = createStackNavigator(
SupportingListScreen: SupportingListScreen,
SupportersListScreen: SupportersListScreen,
UserVideoHistory: UserVideoHistory,
VideoPlayer: VideoPlayer,
VideoReplyPlayer: VideoReplyPlayer,
VideoTags: VideoTags,
FullScreenVideoCollection: FullScreenVideoCollection
WalletSettingScreen: WalletSettingScreen,
WalletDetails: WalletDetails,
FullScreenVideoCollection: FullScreenVideoCollection,
VideoReplies:VideoReplies ,
FullScreenReplyCollection: FullScreenReplyCollection,
},
{
headerLayoutPreset: 'center'
headerLayoutPreset: 'center',
...cardStackConfig
}
);

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ android {
applicationId "com.pepo.staging"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 19
versionName "0.9.6"
versionCode 20
versionName "1.0.0"
missingDimensionStrategy 'react-native-camera', 'general'
}
splits {
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* @format
*/
import * as foo from "./src/helpers/Logger";
import { AppRegistry } from 'react-native';
import AppContainer from './AppContainer';
import { name as appName } from './app.json';
Expand Down
2 changes: 1 addition & 1 deletion ios/Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ostdotcom/ost-wallet-sdk-ios" == 2.3.4
github "ostdotcom/ost-wallet-sdk-ios" == 2.3.5
5 changes: 2 additions & 3 deletions ios/Pepo2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
};
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 */; };
Expand Down Expand Up @@ -2314,7 +2313,7 @@
"$(inherited)",
"\"$(SRCROOT)/Pepo2\"",
);
MARKETING_VERSION = 0.9.7;
MARKETING_VERSION = 1.0.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -2377,7 +2376,7 @@
"$(inherited)",
"\"$(SRCROOT)/Pepo2\"",
);
MARKETING_VERSION = 0.9.7;
MARKETING_VERSION = 1.0.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
1 change: 1 addition & 0 deletions ios/Pepo2/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ - (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull N
restorationHandler:restorationHandler];

return handled;

}


Expand Down
2 changes: 1 addition & 1 deletion ios/Pepo2/InfoPlist/com.pepo.staging-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.9.7</string>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/Pepo2/InfoPlist/com.pepo.v2.production-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.9.7</string>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/Pepo2/InfoPlist/com.pepo.v2.sandbox-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.9.7</string>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
Loading

0 comments on commit f04ad9e

Please sign in to comment.