mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Make RelinkDialog supersede the NetworkDialog
This commit is contained in:
committed by
Scott Nonnenberg
parent
1b5c36a9a8
commit
752cd75c54
@@ -13,9 +13,9 @@ export const hasNetworkDialog = createSelector(
|
||||
{ isOnline, socketStatus, withinConnectingGracePeriod }: NetworkStateType,
|
||||
isRegistrationDone: boolean
|
||||
): boolean =>
|
||||
!isOnline ||
|
||||
!isRegistrationDone ||
|
||||
(socketStatus === WebSocket.CONNECTING && !withinConnectingGracePeriod) ||
|
||||
socketStatus === WebSocket.CLOSED ||
|
||||
socketStatus === WebSocket.CLOSING
|
||||
isRegistrationDone &&
|
||||
(!isOnline ||
|
||||
(socketStatus === WebSocket.CONNECTING && !withinConnectingGracePeriod) ||
|
||||
socketStatus === WebSocket.CLOSED ||
|
||||
socketStatus === WebSocket.CLOSING)
|
||||
);
|
||||
|
||||
@@ -3,12 +3,10 @@ import { mapDispatchToProps } from '../actions';
|
||||
import { RelinkDialog } from '../../components/RelinkDialog';
|
||||
import { StateType } from '../reducer';
|
||||
import { getIntl } from '../selectors/user';
|
||||
import { hasNetworkDialog } from '../selectors/network';
|
||||
import { isDone } from '../../util/registration';
|
||||
|
||||
const mapStateToProps = (state: StateType) => {
|
||||
return {
|
||||
hasNetworkDialog: hasNetworkDialog(state),
|
||||
i18n: getIntl(state),
|
||||
isRegistrationDone: isDone(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user