From 3a67dc4c79bc69b60a5d8fb66f379546e7ff996d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Pfeuffer?= Date: Fri, 20 Dec 2019 15:33:13 +0100 Subject: [PATCH] Use prefix for own reducer type --- scm-ui/ui-webapp/src/repos/sources/modules/sources.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scm-ui/ui-webapp/src/repos/sources/modules/sources.ts b/scm-ui/ui-webapp/src/repos/sources/modules/sources.ts index 8abdec9fd5..7387c3d57f 100644 --- a/scm-ui/ui-webapp/src/repos/sources/modules/sources.ts +++ b/scm-ui/ui-webapp/src/repos/sources/modules/sources.ts @@ -6,6 +6,7 @@ import { getFailure } from "../../../modules/failure"; export const FETCH_SOURCES = "scm/repos/FETCH_SOURCES"; export const FETCH_SOURCES_PENDING = `${FETCH_SOURCES}_${types.PENDING_SUFFIX}`; +export const FETCH_UPDATES_PENDING = `${FETCH_SOURCES}_UPDATE_PENDING`; export const FETCH_SOURCES_SUCCESS = `${FETCH_SOURCES}_${types.SUCCESS_SUFFIX}`; export const FETCH_SOURCES_FAILURE = `${FETCH_SOURCES}_${types.FAILURE_SUFFIX}`; @@ -61,7 +62,7 @@ export function updateSourcesPending( currentSources: any ): Action { return { - type: "UPDATE_PENDING", + type: FETCH_UPDATES_PENDING, payload: { updatePending: true, sources: currentSources }, itemId: createItemId(repository, revision, path) }; @@ -97,7 +98,7 @@ export default function reducer( type: "UNKNOWN" } ): any { - if (action.itemId && (action.type === FETCH_SOURCES_SUCCESS || action.type === "UPDATE_PENDING")) { + if (action.itemId && (action.type === FETCH_SOURCES_SUCCESS || action.type === FETCH_UPDATES_PENDING)) { return { ...state, [action.itemId]: action.payload