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

Commit 4bff90e

Browse files
committed
Clean up after POC
1 parent 6e390fe commit 4bff90e

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/components/views/messages/IMediaBody.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,8 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
import EventTile from "../rooms/EventTile";
1817
import { MediaEventHelper } from "../../../utils/MediaEventHelper";
1918

2019
export interface IMediaBody {
2120
getMediaHelper(): MediaEventHelper;
2221
}
23-
24-
export function canTileDownload(tile: EventTile): boolean {
25-
if (!tile) return false;
26-
27-
// Cast so we can check for IMediaBody interface safely.
28-
// Note that we don't cast to the IMediaBody interface as that causes IDEs
29-
// to complain about conditions always being true.
30-
const tileAsAny = <any>tile;
31-
return !!tileAsAny.getMediaHelper;
32-
}

src/components/views/messages/MessageActionBar.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ import { replaceableComponent } from "../../../utils/replaceableComponent";
3232
import { canCancel } from "../context_menus/MessageContextMenu";
3333
import Resend from "../../../Resend";
3434
import { MatrixClientPeg } from "../../../MatrixClientPeg";
35-
import { canTileDownload } from "./IMediaBody";
36-
import {MediaEventHelper} from "../../../utils/MediaEventHelper";
35+
import { MediaEventHelper } from "../../../utils/MediaEventHelper";
3736

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

0 commit comments

Comments
 (0)