actually add LocationView

This commit is contained in:
Bruno Windels 2022-01-14 15:50:19 +01:00
parent 052ff02571
commit b578f4ac84

View File

@ -26,8 +26,9 @@ import {SimpleTile} from "../../../../../domain/session/room/timeline/tiles/Simp
import {GapView} from "./timeline/GapView.js"; import {GapView} from "./timeline/GapView.js";
export type TileView = GapView | AnnouncementView | TextMessageView | export type TileView = GapView | AnnouncementView | TextMessageView |
ImageView | VideoView | FileView | MissingAttachmentView | RedactedView; ImageView | VideoView | FileView | LocationView | MissingAttachmentView | RedactedView;
// TODO: this is what works for a ctor but doesn't actually check we constrain the returned ctors to the types above
type TileViewConstructor = (this: TileView, SimpleTile) => void; type TileViewConstructor = (this: TileView, SimpleTile) => void;
export function viewClassForEntry(entry: SimpleTile): TileViewConstructor | undefined { export function viewClassForEntry(entry: SimpleTile): TileViewConstructor | undefined {
switch (entry.shape) { switch (entry.shape) {