Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 66fe255

Browse files
committed
Make dead code analysis lint happier
1 parent f9e1e13 commit 66fe255

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/components/structures/MatrixChat.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ import { RightPanelPhases } from "../../stores/right-panel/RightPanelStorePhases
134134
import RightPanelStore from "../../stores/right-panel/RightPanelStore";
135135
import { TimelineRenderingType } from "../../contexts/RoomContext";
136136
import { UseCaseSelection } from '../views/elements/UseCaseSelection';
137-
import { Filter, openSpotlight } from '../views/dialogs/spotlight/SpotlightDialog';
137+
import SpotlightDialog, { Filter } from '../views/dialogs/spotlight/SpotlightDialog';
138138
import { OpenSpotlightPayload } from '../../dispatcher/payloads/OpenSpotlightPayload';
139139
import { ValidatedServerConfig } from '../../utils/ValidatedServerConfig';
140140
import { isLocalRoom } from '../../utils/localRoom/isLocalRoom';
@@ -700,7 +700,10 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
700700
this.viewSomethingBehindModal();
701701
break;
702702
case Action.OpenSpotlight: {
703-
openSpotlight({ initialText: payload.initialText, initialFilter: payload.initialFilter });
703+
Modal.createDialog(SpotlightDialog, {
704+
initialText: payload.initialText,
705+
initialFilter: payload.initialFilter,
706+
}, "mx_SpotlightDialog_wrapper", false, true);
704707

705708
// View the welcome or home page if we need something to look at
706709
this.viewSomethingBehindModal();

src/components/views/dialogs/spotlight/SpotlightDialog.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ interface SpotlightProps {
102102
initialFilter?: Filter;
103103
}
104104

105-
export function openSpotlight(props: SpotlightProps = {}) {
106-
Modal.createDialog(RovingSpotlightDialog, props, "mx_SpotlightDialog_wrapper", false, true);
107-
}
108-
109105
function refIsForRecentlyViewed(ref: RefObject<HTMLElement>): boolean {
110106
return ref.current?.id?.startsWith("mx_SpotlightDialog_button_recentlyViewed_") === true;
111107
}
@@ -1249,3 +1245,5 @@ const RovingSpotlightDialog: React.FC<IDialogProps & SpotlightProps> = (props) =
12491245
{ () => <SpotlightDialog {...props} /> }
12501246
</RovingTabIndexProvider>;
12511247
};
1248+
1249+
export default RovingSpotlightDialog;

0 commit comments

Comments
 (0)