Commit e980be68 authored by Pradeep Murugesan's avatar Pradeep Murugesan Committed by Jesús Espino

GH-8995 added the flow types for timezone js (#560)

parent c2fbd399
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// @flow
import {getCurrentUser} from 'selectors/entities/users';
import {getUserTimezone} from 'selectors/entities/timezone';
import {updateMe} from 'actions/users';
import type {DispatchFunc, GetStateFunc} from '../types/actions';
export function autoUpdateTimezone(deviceTimezone) {
return async (dispatch, getState) => {
export function autoUpdateTimezone(deviceTimezone: string) {
return async (dispatch: DispatchFunc, getState: GetStateFunc) => {
const currentUer = getCurrentUser(getState());
const currentTimezone = getUserTimezone(getState(), currentUer.id);
const newTimezoneExists = currentTimezone.automaticTimezone !== deviceTimezone;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment