Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanfbrito committed Nov 10, 2023
1 parent 871d832 commit 5d3a5eb
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
1 change: 0 additions & 1 deletion src/servers/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export type Server = {
isSupportedVersion?: boolean;
supportedVersionsSource?: 'server' | 'cloud' | 'builtin';
supportedVersions?: SupportedVersions;
expirationMessage?: MessageTranslated;
expirationMessageLastTimeShown?: Date;
};

Expand Down
7 changes: 0 additions & 7 deletions src/servers/reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
WEBVIEW_SERVER_UNIQUE_ID_UPDATED,
WEBVIEW_SERVER_IS_SUPPORTED_VERSION,
WEBVIEW_SERVER_VERSION_UPDATED,
SUPPORTED_VERSION_EXPIRATION_MESSAGE_UPDATED,
SUPPORTED_VERSION_DIALOG_DISMISS,
WEBVIEW_SIDEBAR_CUSTOM_THEME_CHANGED,
WEBVIEW_SERVER_SUPPORTED_VERSIONS_SOURCE_UPDATED,
Expand Down Expand Up @@ -65,7 +64,6 @@ type ServersActionTypes =
| ActionOf<typeof WEBVIEW_SERVER_UNIQUE_ID_UPDATED>
| ActionOf<typeof WEBVIEW_SERVER_IS_SUPPORTED_VERSION>
| ActionOf<typeof WEBVIEW_SERVER_VERSION_UPDATED>
| ActionOf<typeof SUPPORTED_VERSION_EXPIRATION_MESSAGE_UPDATED>
| ActionOf<typeof SUPPORTED_VERSION_DIALOG_DISMISS>
| ActionOf<typeof WEBVIEW_SERVER_SUPPORTED_VERSIONS_SOURCE_UPDATED>;

Expand Down Expand Up @@ -126,11 +124,6 @@ export const servers: Reducer<Server[], ServersActionTypes> = (
return upsert(state, { url, supportedVersions });
}

case SUPPORTED_VERSION_EXPIRATION_MESSAGE_UPDATED: {
const { url, expirationMessage } = action.payload;
return upsert(state, { url, expirationMessage });
}

case WEBVIEW_SERVER_SUPPORTED_VERSIONS_SOURCE_UPDATED: {
const { url, supportedVersionsSource } = action.payload;
return upsert(state, { url, supportedVersionsSource });
Expand Down
9 changes: 0 additions & 9 deletions src/ui/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ export const WEBVIEW_SERVER_IS_SUPPORTED_VERSION =
export const WEBVIEW_SERVER_SUPPORTED_VERSIONS_SOURCE_UPDATED =
'webview/server-supported-versions-source-updated';
export const WEBVIEW_SERVER_VERSION_UPDATED = 'webview/version-updated';
export const SUPPORTED_VERSION_DIALOG_OPEN = 'supported-versions-dialog/open';
export const SUPPORTED_VERSION_DIALOG_DISMISS =
'supported-versions-dialog/dismiss';
export const SUPPORTED_VERSION_EXPIRATION_MESSAGE_UPDATED =
'supported-versions/expiration-message-updated';
export const WEBVIEW_SERVER_RELOADED = 'webview/server-reloaded';

export type UiActionTypeToPayloadMap = {
Expand Down Expand Up @@ -205,13 +202,7 @@ export type UiActionTypeToPayloadMap = {
url: Server['url'];
version: Server['version'];
};
[SUPPORTED_VERSION_DIALOG_OPEN]: void;
[SUPPORTED_VERSION_DIALOG_DISMISS]: { url: Server['url'] };

[SUPPORTED_VERSION_EXPIRATION_MESSAGE_UPDATED]: {
url: Server['url'];
expirationMessage: Server['expirationMessage'];
};
[WEBVIEW_SERVER_SUPPORTED_VERSIONS_SOURCE_UPDATED]: {
url: Server['url'];
supportedVersionsSource: Server['supportedVersionsSource'];
Expand Down
13 changes: 1 addition & 12 deletions src/ui/reducers/openDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ import {
import { SCREEN_SHARING_DIALOG_DISMISSED } from '../../screenSharing/actions';
import type { ActionOf } from '../../store/actions';
import { UPDATES_NEW_VERSION_AVAILABLE } from '../../updates/actions';
import type { SUPPORTED_VERSION_DIALOG_DISMISS } from '../actions';
import {
ABOUT_DIALOG_DISMISSED,
MENU_BAR_ABOUT_CLICKED,
SUPPORTED_VERSION_DIALOG_DISMISS,
SUPPORTED_VERSION_DIALOG_OPEN,
UPDATE_DIALOG_DISMISSED,
UPDATE_DIALOG_INSTALL_BUTTON_CLICKED,
UPDATE_DIALOG_REMIND_UPDATE_LATER_CLICKED,
Expand All @@ -43,7 +42,6 @@ type OpenDialogAction =
| ActionOf<typeof OUTLOOK_CALENDAR_ASK_CREDENTIALS>
| ActionOf<typeof OUTLOOK_CALENDAR_DIALOG_DISMISSED>
| ActionOf<typeof OUTLOOK_CALENDAR_SET_CREDENTIALS>
| ActionOf<typeof SUPPORTED_VERSION_DIALOG_OPEN>
| ActionOf<typeof SUPPORTED_VERSION_DIALOG_DISMISS>;

export const openDialog: Reducer<string | null, OpenDialogAction> = (
Expand All @@ -54,15 +52,6 @@ export const openDialog: Reducer<string | null, OpenDialogAction> = (
case MENU_BAR_ABOUT_CLICKED:
return 'about';

case SUPPORTED_VERSION_DIALOG_OPEN:
return 'supported-version';

case SUPPORTED_VERSION_DIALOG_DISMISS:
if (state === 'supported-version') {
return null;
}
return state;

case WEBVIEW_SCREEN_SHARING_SOURCE_REQUESTED:
return 'screen-sharing';

Expand Down

0 comments on commit 5d3a5eb

Please sign in to comment.