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

Commit

Permalink
Remove feature_many_integration_managers
Browse files Browse the repository at this point in the history
Rationale: If we want this feature, design will do it properly.
  • Loading branch information
turt2live committed May 6, 2022
1 parent aa664b8 commit 2aec197
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 358 deletions.
1 change: 0 additions & 1 deletion res/css/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
@import "./views/dialogs/_SpacePreferencesDialog.scss";
@import "./views/dialogs/_SpaceSettingsDialog.scss";
@import "./views/dialogs/_SpotlightDialog.scss";
@import "./views/dialogs/_TabbedIntegrationManagerDialog.scss";
@import "./views/dialogs/_TermsDialog.scss";
@import "./views/dialogs/_UntrustedDeviceDialog.scss";
@import "./views/dialogs/_UploadConfirmDialog.scss";
Expand Down
62 changes: 0 additions & 62 deletions res/css/views/dialogs/_TabbedIntegrationManagerDialog.scss

This file was deleted.

176 changes: 0 additions & 176 deletions src/components/views/dialogs/TabbedIntegrationManagerDialog.tsx

This file was deleted.

7 changes: 2 additions & 5 deletions src/components/views/right_panel/RoomSummaryCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,8 @@ const AppsSection: React.FC<IAppsSectionProps> = ({ room }) => {
if (!managers.hasManager()) {
managers.openNoManagerDialog();
} else {
if (SettingsStore.getValue("feature_many_integration_managers")) {
managers.openAll(room);
} else {
managers.getPrimaryManager().open(room);
}
// noinspection JSIgnoredPromiseFromCall
managers.getPrimaryManager().open(room);
}
};

Expand Down
21 changes: 6 additions & 15 deletions src/components/views/rooms/Stickerpicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import AccessibleButton from '../elements/AccessibleButton';
import WidgetUtils, { IWidgetEvent } from '../../../utils/WidgetUtils';
import PersistedElement from "../elements/PersistedElement";
import { IntegrationManagers } from "../../../integrations/IntegrationManagers";
import SettingsStore from "../../../settings/SettingsStore";
import ContextMenu, { ChevronFace } from "../../structures/ContextMenu";
import { WidgetType } from "../../../widgets/WidgetType";
import { WidgetMessagingStore } from "../../../stores/widgets/WidgetMessagingStore";
Expand Down Expand Up @@ -339,20 +338,12 @@ export default class Stickerpicker extends React.PureComponent<IProps, IState> {
* Launch the integration manager on the stickers integration page
*/
private launchManageIntegrations = (): void => {
// TODO: Open the right integration manager for the widget
if (SettingsStore.getValue("feature_many_integration_managers")) {
IntegrationManagers.sharedInstance().openAll(
this.props.room,
`type_${WidgetType.STICKERPICKER.preferred}`,
this.state.widgetId,
);
} else {
IntegrationManagers.sharedInstance().getPrimaryManager().open(
this.props.room,
`type_${WidgetType.STICKERPICKER.preferred}`,
this.state.widgetId,
);
}
// noinspection JSIgnoredPromiseFromCall
IntegrationManagers.sharedInstance().getPrimaryManager().open(
this.props.room,
`type_${WidgetType.STICKERPICKER.preferred}`,
this.state.widgetId,
);
};

public render(): JSX.Element {
Expand Down
6 changes: 0 additions & 6 deletions src/dispatcher/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,6 @@ export enum Action {
*/
OpenReportEventDialog = "open_report_event_dialog",

/**
* Fired when the tabbed integration manager dialog needs to be opened.
* Payload: OpenTabbedIntegrationManagerDialogPayload
*/
OpenTabbedIntegrationManagerDialog = "open_tabbed_imanager_dialog",

/**
* Fired when something within the application has determined that a logout,
* or logout-like behaviour, needs to happen. Specifically meant to target
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,6 @@
"Thank you for trying the beta, please go into as much detail as you can so we can improve it.": "Thank you for trying the beta, please go into as much detail as you can so we can improve it.",
"Video rooms (under active development)": "Video rooms (under active development)",
"Render simple counters in room header": "Render simple counters in room header",
"Multiple integration managers (requires manual setup)": "Multiple integration managers (requires manual setup)",
"Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)",
"Support adding custom themes": "Support adding custom themes",
"Show message previews for reactions in DMs": "Show message previews for reactions in DMs",
Expand Down
24 changes: 0 additions & 24 deletions src/integrations/IntegrationManagers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,14 @@ import { logger } from "matrix-js-sdk/src/logger";
import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client";

import type { MatrixEvent } from "matrix-js-sdk/src/models/event";
import type { Room } from "matrix-js-sdk/src/models/room";
import SdkConfig from '../SdkConfig';
import Modal from '../Modal';
import { IntegrationManagerInstance, Kind } from "./IntegrationManagerInstance";
import IntegrationsImpossibleDialog from "../components/views/dialogs/IntegrationsImpossibleDialog";
import IntegrationsDisabledDialog from "../components/views/dialogs/IntegrationsDisabledDialog";
import WidgetUtils from "../utils/WidgetUtils";
import { MatrixClientPeg } from "../MatrixClientPeg";
import SettingsStore from "../settings/SettingsStore";
import { compare } from "../utils/strings";
import defaultDispatcher from "../dispatcher/dispatcher";
import {
OpenTabbedIntegrationManagerDialogPayload,
} from "../dispatcher/payloads/OpenTabbedIntegrationManagerDialogPayload";
import { Action } from "../dispatcher/actions";

const KIND_PREFERENCE = [
// Ordered: first is most preferred, last is least preferred.
Expand Down Expand Up @@ -181,23 +174,6 @@ export class IntegrationManagers {
Modal.createTrackedDialog('Integrations impossible', '', IntegrationsImpossibleDialog);
}

openAll(room: Room = null, screen: string = null, integrationId: string = null): void {
if (!SettingsStore.getValue("integrationProvisioning")) {
return this.showDisabledDialog();
}

if (this.managers.length === 0) {
return this.openNoManagerDialog();
}

defaultDispatcher.dispatch(<OpenTabbedIntegrationManagerDialogPayload>{
action: Action.OpenTabbedIntegrationManagerDialog,
room,
screen,
integrationId,
});
}

showDisabledDialog(): void {
Modal.createTrackedDialog('Integrations disabled', '', IntegrationsDisabledDialog);
}
Expand Down
Loading

0 comments on commit 2aec197

Please sign in to comment.