Skip to content

Commit

Permalink
Remove unused prop from ResizeHandle - reverse (#10771)
Browse files Browse the repository at this point in the history
It was added by 928b6d4 and soon deprecated by e5d1b33
  • Loading branch information
luixxiul committed May 3, 2023
1 parent 9b7e786 commit 62569e2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/components/structures/LoggedInView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ class LoggedInView extends React.Component<IProps, IState> {
resizer.setClassNames({
handle: "mx_ResizeHandle",
vertical: "mx_ResizeHandle_vertical",
reverse: "mx_ResizeHandle_reverse",
});
return resizer;
}
Expand Down
6 changes: 1 addition & 5 deletions src/components/views/elements/ResizeHandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,17 @@ import React from "react"; // eslint-disable-line no-unused-vars
//see src/resizer for the actual resizing code, this is just the DOM for the resize handle
interface IResizeHandleProps {
vertical?: boolean;
reverse?: boolean;
id?: string;
passRef?: React.RefObject<HTMLDivElement>;
}

const ResizeHandle: React.FC<IResizeHandleProps> = ({ vertical, reverse, id, passRef }) => {
const ResizeHandle: React.FC<IResizeHandleProps> = ({ vertical, id, passRef }) => {
const classNames = ["mx_ResizeHandle"];
if (vertical) {
classNames.push("mx_ResizeHandle_vertical");
} else {
classNames.push("mx_ResizeHandle_horizontal");
}
if (reverse) {
classNames.push("mx_ResizeHandle_reverse");
}
return (
<div ref={passRef} className={classNames.join(" ")} data-id={id}>
<div />
Expand Down
3 changes: 1 addition & 2 deletions src/components/views/rooms/AppsDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export default class AppsDrawer extends React.Component<IProps, IState> {
const classNames = {
handle: "mx_ResizeHandle",
vertical: "mx_ResizeHandle_vertical",
reverse: "mx_ResizeHandle_reverse",
};
const collapseConfig = {
onResizeStart: () => {
Expand Down Expand Up @@ -267,7 +266,7 @@ export default class AppsDrawer extends React.Component<IProps, IState> {
if (i < 1) return app;
return (
<React.Fragment key={app.key}>
<ResizeHandle reverse={i > apps.length / 2} />
<ResizeHandle />
{app}
</React.Fragment>
);
Expand Down

0 comments on commit 62569e2

Please sign in to comment.