Clean up after POC

pull/21833/head
Travis Ralston 2021-07-15 14:34:40 -06:00
parent 584ffbd327
commit 040802e29f
2 changed files with 1 additions and 13 deletions

View File

@ -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;
}

View File

@ -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();