Extract location utils from components (#8152)

* extract util functions from MLocationBody

Signed-off-by: Kerry Archibald <kerrya@element.io>

* disassemble mlocationbody

Signed-off-by: Kerry Archibald <kerrya@element.io>

* tidy and add copyrights

Signed-off-by: Kerry Archibald <kerrya@element.io>

* move types and utils from components/location to utils

Signed-off-by: Kerry Archibald <kerrya@element.io>

* i18n

Signed-off-by: Kerry Archibald <kerrya@element.io>

* empty line

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-03-25 15:36:22 +01:00 committed by GitHub
parent 0d513b3a2d
commit 1397652f52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 496 additions and 350 deletions

View file

@ -47,8 +47,8 @@ import { ComposerInsertPayload } from "../../../dispatcher/payloads/ComposerInse
import { WidgetLayoutStore } from '../../../stores/widgets/WidgetLayoutStore';
import EndPollDialog from '../dialogs/EndPollDialog';
import { isPollEnded } from '../messages/MPollBody';
import { createMapSiteLink } from "../messages/MLocationBody";
import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload";
import { createMapSiteLink } from '../../../utils/location';
export function canCancel(status: EventStatus): boolean {
return status === EventStatus.QUEUED || status === EventStatus.NOT_SENT || status === EventStatus.ENCRYPTING;