Fix cyclic imports
parent
26d8c4d2e6
commit
01aadb460d
|
@ -24,7 +24,7 @@ import MultiInviter, { CompletionStates } from './utils/MultiInviter';
|
||||||
import Modal from './Modal';
|
import Modal from './Modal';
|
||||||
import * as sdk from './';
|
import * as sdk from './';
|
||||||
import { _t } from './languageHandler';
|
import { _t } from './languageHandler';
|
||||||
import InviteDialog, { KIND_DM, KIND_INVITE } from "./components/views/dialogs/InviteDialog";
|
import InviteDialog, { KIND_DM, KIND_INVITE, Member } from "./components/views/dialogs/InviteDialog";
|
||||||
import CommunityPrototypeInviteDialog from "./components/views/dialogs/CommunityPrototypeInviteDialog";
|
import CommunityPrototypeInviteDialog from "./components/views/dialogs/CommunityPrototypeInviteDialog";
|
||||||
import { CommunityPrototypeStore } from "./stores/CommunityPrototypeStore";
|
import { CommunityPrototypeStore } from "./stores/CommunityPrototypeStore";
|
||||||
import BaseAvatar from "./components/views/avatars/BaseAvatar";
|
import BaseAvatar from "./components/views/avatars/BaseAvatar";
|
||||||
|
@ -189,26 +189,3 @@ export function showAnyInviteErrors(
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the interface that is expected by various components in the Invite Dialog and RoomInvite.
|
|
||||||
// It is a bit awkward because it also matches the RoomMember class from the js-sdk with some extra support
|
|
||||||
// for 3PIDs/email addresses.
|
|
||||||
export abstract class Member {
|
|
||||||
/**
|
|
||||||
* The display name of this Member. For users this should be their profile's display
|
|
||||||
* name or user ID if none set. For 3PIDs this should be the 3PID address (email).
|
|
||||||
*/
|
|
||||||
public abstract get name(): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The ID of this Member. For users this should be their user ID. For 3PIDs this should
|
|
||||||
* be the 3PID address (email).
|
|
||||||
*/
|
|
||||||
public abstract get userId(): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the MXC URL of this Member's avatar. For users this should be their profile's
|
|
||||||
* avatar MXC URL or null if none set. For 3PIDs this should always be null.
|
|
||||||
*/
|
|
||||||
public abstract getMxcAvatarUrl(): string;
|
|
||||||
}
|
|
||||||
|
|
|
@ -40,7 +40,6 @@ import createRoom, {
|
||||||
import {
|
import {
|
||||||
IInviteResult,
|
IInviteResult,
|
||||||
inviteMultipleToRoom,
|
inviteMultipleToRoom,
|
||||||
Member,
|
|
||||||
showAnyInviteErrors,
|
showAnyInviteErrors,
|
||||||
showCommunityInviteDialog,
|
showCommunityInviteDialog,
|
||||||
} from "../../../RoomInvite";
|
} from "../../../RoomInvite";
|
||||||
|
@ -83,6 +82,29 @@ export const KIND_CALL_TRANSFER = "call_transfer";
|
||||||
const INITIAL_ROOMS_SHOWN = 3; // Number of rooms to show at first
|
const INITIAL_ROOMS_SHOWN = 3; // Number of rooms to show at first
|
||||||
const INCREMENT_ROOMS_SHOWN = 5; // Number of rooms to add when 'show more' is clicked
|
const INCREMENT_ROOMS_SHOWN = 5; // Number of rooms to add when 'show more' is clicked
|
||||||
|
|
||||||
|
// This is the interface that is expected by various components in the Invite Dialog and RoomInvite.
|
||||||
|
// It is a bit awkward because it also matches the RoomMember class from the js-sdk with some extra support
|
||||||
|
// for 3PIDs/email addresses.
|
||||||
|
export abstract class Member {
|
||||||
|
/**
|
||||||
|
* The display name of this Member. For users this should be their profile's display
|
||||||
|
* name or user ID if none set. For 3PIDs this should be the 3PID address (email).
|
||||||
|
*/
|
||||||
|
public abstract get name(): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ID of this Member. For users this should be their user ID. For 3PIDs this should
|
||||||
|
* be the 3PID address (email).
|
||||||
|
*/
|
||||||
|
public abstract get userId(): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the MXC URL of this Member's avatar. For users this should be their profile's
|
||||||
|
* avatar MXC URL or null if none set. For 3PIDs this should always be null.
|
||||||
|
*/
|
||||||
|
public abstract getMxcAvatarUrl(): string;
|
||||||
|
}
|
||||||
|
|
||||||
class DirectoryMember extends Member {
|
class DirectoryMember extends Member {
|
||||||
private readonly _userId: string;
|
private readonly _userId: string;
|
||||||
private readonly displayName: string;
|
private readonly displayName: string;
|
||||||
|
|
Loading…
Reference in New Issue