added notifications for hidden markers

This commit is contained in:
muerwre 2019-02-11 16:42:52 +07:00
parent 32e1b4c3fd
commit ba5e24a56d
12 changed files with 89 additions and 19 deletions

View file

@ -60,3 +60,5 @@ export const searchSetLoading = loading => ({ type: ACTIONS.SEARCH_SET_LOADING,
export const searchPutRoutes = payload => ({ type: ACTIONS.SEARCH_PUT_ROUTES, ...payload });
export const setMarkersShown = markers_shown => ({ type: ACTIONS.SET_MARKERS_SHOWN, markers_shown });

View file

@ -63,4 +63,6 @@ export const ACTIONS = ({
OPEN_MAP_DIALOG: 'OPEN_MAP_DIALOG',
SET_SPEED: 'SET_SPEED',
SET_MARKERS_SHOWN: 'SET_MARKERS_SHOWN',
}: { [key: String]: String });

View file

@ -159,6 +159,8 @@ const setSpeed = (state, { speed = 15 }) => ({
estimated: getEstimated(state.distance, speed),
});
const setMarkersShown = (state, { markers_shown = true }) => ({ ...state, markers_shown });
const HANDLERS = ({
[ACTIONS.SET_USER]: setUser,
[ACTIONS.SET_EDITING]: setEditing,
@ -195,6 +197,8 @@ const HANDLERS = ({
[ACTIONS.SEARCH_SET_LOADING]: searchSetLoading,
[ACTIONS.SET_PUBLIC]: setPublic,
[ACTIONS.SET_SPEED]: setSpeed,
[ACTIONS.SET_MARKERS_SHOWN]: setMarkersShown,
}: { [key: String]: Function });
export const INITIAL_STATE = {
@ -214,6 +218,7 @@ export const INITIAL_STATE = {
changed: false,
provider: DEFAULT_PROVIDER,
is_public: false,
markers_shown: true,
save_error: '',
save_finished: false,