Add setting for skipping fbsource version check
Summary: Added a setting "Match local fbsource chekout", which inverserly corresponds to the `ignore_local_pin` setting in `flipper-launcher.toml`. Reviewed By: passy Differential Revision: D19030456 fbshipit-source-id: deaaf4e873a00bbc4e8bd3034353cf580df95a36
This commit is contained in:
committed by
Facebook Github Bot
parent
4db9388984
commit
be53990613
40
src/reducers/launcherSettings.tsx
Normal file
40
src/reducers/launcherSettings.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {Actions} from './index';
|
||||
|
||||
export type LauncherSettings = {
|
||||
ignoreLocalPin: boolean;
|
||||
};
|
||||
|
||||
export type Action = {
|
||||
type: 'UPDATE_LAUNCHER_SETTINGS';
|
||||
payload: LauncherSettings;
|
||||
};
|
||||
|
||||
export const defaultLauncherSettings: LauncherSettings = {
|
||||
ignoreLocalPin: false,
|
||||
};
|
||||
|
||||
export default function reducer(
|
||||
state: LauncherSettings = defaultLauncherSettings,
|
||||
action: Actions,
|
||||
): LauncherSettings {
|
||||
if (action.type === 'UPDATE_LAUNCHER_SETTINGS') {
|
||||
return action.payload;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
export function updateLauncherSettings(settings: LauncherSettings): Action {
|
||||
return {
|
||||
type: 'UPDATE_LAUNCHER_SETTINGS',
|
||||
payload: settings,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user