FIX: Set current user timezone when saving profile timezone (#9155)
If you are changing your own profile timezone, then on save we set the current user timezone, in case this property needs to be accessed again before the user is reloaded.
This commit is contained in:
parent
218d3f5f44
commit
e3bbcb27d0
|
@ -93,6 +93,12 @@ export default Controller.extend(PreferencesTabController, {
|
||||||
return model
|
return model
|
||||||
.save(this.saveAttrNames)
|
.save(this.saveAttrNames)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
// update the timezone in memory so we can use the new
|
||||||
|
// one if we change routes without reloading the user
|
||||||
|
if (this.currentUser.id === this.model.id) {
|
||||||
|
this.currentUser.timezone = this.model.user_option.timezone;
|
||||||
|
}
|
||||||
|
|
||||||
cookAsync(model.get("bio_raw"))
|
cookAsync(model.get("bio_raw"))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
model.set("bio_cooked");
|
model.set("bio_cooked");
|
||||||
|
|
Loading…
Reference in New Issue