mirror of
https://github.com/timepill/timepill-app.git
synced 2025-06-02 14:59:14 +08:00
进入自己的主页右上角显示设置
This commit is contained in:
parent
2e8c40d119
commit
55a1003c90
1 changed files with 20 additions and 7 deletions
|
@ -132,21 +132,34 @@ export default class UserPage extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
if(this.userId) {
|
||||
Api.getRelation(this.userId)
|
||||
.then(re => {
|
||||
this.followed = re;
|
||||
if(this.followed) {
|
||||
Api.getSelfInfoByStore()
|
||||
.then(user => {
|
||||
if(user && user.id == this.userId) {
|
||||
Navigation.mergeOptions(this.props.componentId, {
|
||||
topBar: {
|
||||
rightButtons: [{
|
||||
id: 'navButtonFollowSelected',
|
||||
icon: Icon.navButtonFollowSelected
|
||||
id: 'setting',
|
||||
icon: Icon.navButtonSetting
|
||||
}]
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Api.getRelation(this.userId)
|
||||
.then(re => {
|
||||
this.followed = re;
|
||||
if(this.followed) {
|
||||
Navigation.mergeOptions(this.props.componentId, {
|
||||
topBar: {
|
||||
rightButtons: [{
|
||||
id: 'navButtonFollowSelected',
|
||||
icon: Icon.navButtonFollowSelected
|
||||
}]
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
this.notebookListener = DeviceEventEmitter.addListener(Event.updateNotebooks, (param) => {
|
||||
|
|
Loading…
Reference in a new issue