Widen the media panel, support skinny full-page mode, keep jump-to-latest and return-to-previous reliable, and stop same-room event jumps from remounting the outlet or yanking the sidebar.
18 lines
535 B
TypeScript
18 lines
535 B
TypeScript
import { atom } from 'jotai';
|
|
|
|
/** Session flag for the Shared Media side drawer (mutually exclusive with Members). */
|
|
export const isMediaDrawerAtom = atom(false);
|
|
|
|
const scrollTops = new Map<string, number>();
|
|
|
|
export const getMediaDrawerScrollTop = (roomId: string): number | undefined =>
|
|
scrollTops.get(roomId);
|
|
|
|
export const setMediaDrawerScrollTop = (roomId: string, top: number): void => {
|
|
scrollTops.set(roomId, top);
|
|
};
|
|
|
|
export const clearMediaDrawerScrollTop = (roomId: string): void => {
|
|
scrollTops.delete(roomId);
|
|
};
|