You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Clean up after POC
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user