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

Commit

Permalink
Clean up after POC
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Jul 15, 2021
1 parent 6e390fe commit 4bff90e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
11 changes: 0 additions & 11 deletions src/components/views/messages/IMediaBody.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import EventTile from "../rooms/EventTile";
import { MediaEventHelper } from "../../../utils/MediaEventHelper";

export interface IMediaBody {
getMediaHelper(): MediaEventHelper;
}

export function canTileDownload(tile: EventTile): boolean {
if (!tile) return false;

// Cast so we can check for IMediaBody interface safely.
// Note that we don't cast to the IMediaBody interface as that causes IDEs
// to complain about conditions always being true.
const tileAsAny = <any>tile;
return !!tileAsAny.getMediaHelper;
}
3 changes: 1 addition & 2 deletions src/components/views/messages/MessageActionBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ import { replaceableComponent } from "../../../utils/replaceableComponent";
import { canCancel } from "../context_menus/MessageContextMenu";
import Resend from "../../../Resend";
import { MatrixClientPeg } from "../../../MatrixClientPeg";
import { canTileDownload } from "./IMediaBody";
import {MediaEventHelper} from "../../../utils/MediaEventHelper";
import { MediaEventHelper } from "../../../utils/MediaEventHelper";

const OptionsButton = ({ mxEvent, getTile, getReplyThread, permalinkCreator, onFocusChange }) => {
const [menuDisplayed, button, openMenu, closeMenu] = useContextMenu();
Expand Down

0 comments on commit 4bff90e

Please sign in to comment.