进入自己的主页右上角显示设置

This commit is contained in:
xuwenyang 2020-01-04 16:02:01 +08:00
parent 2e8c40d119
commit 55a1003c90

View file

@ -132,6 +132,18 @@ export default class UserPage extends Component {
componentDidMount() {
if(this.userId) {
Api.getSelfInfoByStore()
.then(user => {
if(user && user.id == this.userId) {
Navigation.mergeOptions(this.props.componentId, {
topBar: {
rightButtons: [{
id: 'setting',
icon: Icon.navButtonSetting
}]
}
});
} else {
Api.getRelation(this.userId)
.then(re => {
this.followed = re;
@ -146,7 +158,8 @@ export default class UserPage extends Component {
});
}
});
}
});
}
this.notebookListener = DeviceEventEmitter.addListener(Event.updateNotebooks, (param) => {