mirror of https://github.com/vector-im/riot-web
Clean up after POC
parent
584ffbd327
commit
040802e29f
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue