...
|
...
|
@@ -50,8 +50,8 @@ import { |
|
|
} from './reducers/app/appActions';
|
|
|
|
|
|
import {
|
|
|
syncUser,
|
|
|
} from './reducers/home/homeActions';
|
|
|
setUid,
|
|
|
} from './reducers/user/userActions';
|
|
|
|
|
|
import Immutable, {List, Record} from 'immutable';
|
|
|
|
...
|
...
|
@@ -90,10 +90,19 @@ export default function community(platform) { |
|
|
|
|
|
let YH_Community = React.createClass({
|
|
|
|
|
|
contanerIsYohoBuy() {
|
|
|
return parseInt(this.props.container) === 1;
|
|
|
},
|
|
|
|
|
|
render() {
|
|
|
|
|
|
const store = configureStore(getInitialState());
|
|
|
|
|
|
ReactNative.NativeModules.YH_CommunityHelper.uid()
|
|
|
.then(uid => {
|
|
|
store.dispatch(setUid(parseInt(uid)));
|
|
|
});
|
|
|
|
|
|
//Connect w/ the Router
|
|
|
const NewRouter = connect()(Router);
|
|
|
|
...
|
...
|
@@ -104,8 +113,12 @@ export default function community(platform) { |
|
|
store.dispatch(setChannel(this.props.channel));
|
|
|
store.dispatch(mergeCachedPosting());
|
|
|
|
|
|
let navBarStyle = contaner === 2 ? {backgroundColor: 'gray',} : null;
|
|
|
let extraTitleStyle = contaner === 2 ? {color: 'black',} : null;
|
|
|
let navBarStyle = this.contanerIsYohoBuy() ? null : {backgroundColor: 'white',};
|
|
|
let extraTitleStyle = this.contanerIsYohoBuy() ? null : {color: 'black',};
|
|
|
|
|
|
let backImage = this.contanerIsYohoBuy() ? require('./images/home/menu_back1.png') : require('./images/home/menu_back2.png');
|
|
|
let leftImage = this.contanerIsYohoBuy() ? require('./images/home/menu_burger1.png') : require('./images/home/menu_burger2.png');
|
|
|
let rightImage = this.contanerIsYohoBuy() ? require('./images/home/menu_write1.png') : require('./images/home/menu_write2.png');
|
|
|
|
|
|
// setup the router table with App selected as the initial component
|
|
|
return (
|
...
|
...
|
@@ -120,6 +133,7 @@ export default function community(platform) { |
|
|
titleStyle={[styles.navTitle, extraTitleStyle]}
|
|
|
leftButtonStyle={styles.leftButton}
|
|
|
rightButtonStyle={styles.rightButton}
|
|
|
backButtonImage={backImage}
|
|
|
getSceneStyle={(props) => {
|
|
|
return this.navPushStyle(props);
|
|
|
}}
|
...
|
...
|
@@ -132,14 +146,14 @@ export default function community(platform) { |
|
|
component={HomeContainer}
|
|
|
initial={true}
|
|
|
leftTitle={null}
|
|
|
leftButtonImage={require('./images/home/menu_burger1.png')}
|
|
|
leftButtonImage={leftImage}
|
|
|
onLeft={() => {
|
|
|
ReactNative.NativeModules.YH_CommunityHelper.toggleDrawer();
|
|
|
}}
|
|
|
rightTitle={null}
|
|
|
rightButtonImage={require('./images/home/menu_write.png')}
|
|
|
rightButtonImage={rightImage}
|
|
|
onRight={this.homeOnRight}
|
|
|
renderTitle={parseInt(this.props.container) === 1 ? this.renderHomeTitle : null}
|
|
|
renderTitle={this.contanerIsYohoBuy() ? this.renderHomeTitle : null}
|
|
|
getPostingState={
|
|
|
() => {
|
|
|
return store.getState().posting.inPosting;
|
...
|
...
|
@@ -154,7 +168,7 @@ export default function community(platform) { |
|
|
component={SectionContainer}
|
|
|
initial={false}
|
|
|
rightTitle={null}
|
|
|
rightButtonImage={require('./images/home/menu_write.png')}
|
|
|
rightButtonImage={rightImage}
|
|
|
onRight={this.homeOnRight}
|
|
|
getTitle={(childState) => {
|
|
|
let name = store.getState().section.get('name');
|
...
|
...
|
|