mirror of
https://github.com/timepill/timepill-app.git
synced 2025-06-04 07:39: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() {
|
componentDidMount() {
|
||||||
if(this.userId) {
|
if(this.userId) {
|
||||||
Api.getRelation(this.userId)
|
Api.getSelfInfoByStore()
|
||||||
.then(re => {
|
.then(user => {
|
||||||
this.followed = re;
|
if(user && user.id == this.userId) {
|
||||||
if(this.followed) {
|
|
||||||
Navigation.mergeOptions(this.props.componentId, {
|
Navigation.mergeOptions(this.props.componentId, {
|
||||||
topBar: {
|
topBar: {
|
||||||
rightButtons: [{
|
rightButtons: [{
|
||||||
id: 'navButtonFollowSelected',
|
id: 'setting',
|
||||||
icon: Icon.navButtonFollowSelected
|
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) => {
|
this.notebookListener = DeviceEventEmitter.addListener(Event.updateNotebooks, (param) => {
|
||||||
|
|
Loading…
Reference in a new issue