diff --git a/lib/hooks/keyserver-reachability.js b/lib/hooks/keyserver-reachability.js --- a/lib/hooks/keyserver-reachability.js +++ b/lib/hooks/keyserver-reachability.js @@ -5,7 +5,7 @@ import { connectionSelector } from '../selectors/keyserver-selectors.js'; import { - updateDisconnectedBarActionType, + updateKeyserverReachabilityActionType, type ConnectionStatus, } from '../types/socket-types.js'; import { useSelector, useDispatch } from '../utils/redux-utils.js'; @@ -23,7 +23,7 @@ return; } dispatch({ - type: updateDisconnectedBarActionType, + type: updateKeyserverReachabilityActionType, payload: { visible: newDisconnected, keyserverID: ashoatKeyserverID }, }); }, diff --git a/lib/reducers/keyserver-reducer.js b/lib/reducers/keyserver-reducer.js --- a/lib/reducers/keyserver-reducer.js +++ b/lib/reducers/keyserver-reducer.js @@ -35,7 +35,7 @@ incrementalStateSyncActionType, updateConnectionStatusActionType, setLateResponseActionType, - updateDisconnectedBarActionType, + updateKeyserverReachabilityActionType, setConnectionIssueActionType, } from '../types/socket-types.js'; import { updateTypes } from '../types/update-types-enum.js'; @@ -546,7 +546,7 @@ }, keyserverStoreOperations: [operation], }; - } else if (action.type === updateDisconnectedBarActionType) { + } else if (action.type === updateKeyserverReachabilityActionType) { const { keyserverID } = action.payload; const operation: ReplaceKeyserverOperation = { type: 'replace_keyserver', diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js --- a/lib/types/redux-types.js +++ b/lib/types/redux-types.js @@ -106,7 +106,7 @@ StateSyncIncrementalActionPayload, UpdateConnectionStatusPayload, SetLateResponsePayload, - UpdateDisconnectedBarPayload, + UpdateKeyserverReachabilityPayload, } from './socket-types.js'; import { type ClientStore } from './store-ops-types.js'; import type { SubscriptionUpdateResult } from './subscription-types.js'; @@ -890,8 +890,8 @@ +payload: SetLateResponsePayload, } | { - +type: 'UPDATE_DISCONNECTED_BAR', - +payload: UpdateDisconnectedBarPayload, + +type: 'UPDATE_KEYSERVER_REACHABILITY', + +payload: UpdateKeyserverReachabilityPayload, } | { +type: 'REQUEST_ACCESS_STARTED', diff --git a/lib/types/socket-types.js b/lib/types/socket-types.js --- a/lib/types/socket-types.js +++ b/lib/types/socket-types.js @@ -542,8 +542,9 @@ +keyserverID: string, }; -export const updateDisconnectedBarActionType = 'UPDATE_DISCONNECTED_BAR'; -export type UpdateDisconnectedBarPayload = { +export const updateKeyserverReachabilityActionType = + 'UPDATE_KEYSERVER_REACHABILITY'; +export type UpdateKeyserverReachabilityPayload = { +visible: boolean, +keyserverID: string, };