More posthog tracking around joining rooms and room search (#7807)
This commit is contained in:
parent
e997676ae2
commit
658590e5bc
59 changed files with 276 additions and 116 deletions
|
@ -191,7 +191,7 @@ export async function leaveRoomBehaviour(roomId: string, retry = true, spinner =
|
|||
dis.dispatch<ViewRoomPayload>({
|
||||
action: Action.ViewRoom,
|
||||
room_id: SpaceStore.instance.activeSpace,
|
||||
_trigger: undefined, // other
|
||||
metricsTrigger: undefined, // other
|
||||
});
|
||||
} else {
|
||||
dis.dispatch({ action: 'view_home_page' });
|
||||
|
|
|
@ -28,7 +28,11 @@ export async function timeout<T, Y>(promise: Promise<T>, timeoutValue: Y, ms: nu
|
|||
}
|
||||
|
||||
// Helper method to retry a Promise a given number of times or until a predicate fails
|
||||
export async function retry<T, E extends Error>(fn: () => Promise<T>, num: number, predicate?: (e: E) => boolean) {
|
||||
export async function retry<T, E extends Error>(
|
||||
fn: () => Promise<T>,
|
||||
num: number,
|
||||
predicate?: (e: E) => boolean,
|
||||
): Promise<T> {
|
||||
let lastErr: E;
|
||||
for (let i = 0; i < num; i++) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue