mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2025-02-21 16:56:52 +00:00
Save timezone to current timezone if no timezone is set
The preferences showed the detected timezone as the selected timezone if no timezone was null. Now we force set it in that case. Closes #815 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
9a289d65d3
commit
db6f88c0a0
1 changed files with 5 additions and 1 deletions
|
@ -144,7 +144,11 @@ export default class Preferences extends Vue {
|
|||
if (this.loggedUser?.settings?.timezone) {
|
||||
return this.loggedUser.settings.timezone;
|
||||
}
|
||||
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
const detectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
if (this.loggedUser?.settings?.timezone === null) {
|
||||
this.updateUserSettings({ timezone: detectedTimezone });
|
||||
}
|
||||
return detectedTimezone;
|
||||
}
|
||||
|
||||
set selectedTimezone(selectedTimezone: string) {
|
||||
|
|
Loading…
Reference in a new issue