Flarum (2.x)
    Preparing search index...

    The live half of a column. A source owns its data and must never change what is on screen from checkForNew(): new activity waits behind the column's "new" pill until the member asks for it with showNew().

    interface DeckColumnSource {
        applyNew?(): Promise<number | null>;
        checkForNew(): Promise<number>;
        controls?(items: ItemList<Children>): void;
        load(): Promise<unknown>;
        onRealtime?(event: DeckRealtimeEvent): DeckRealtimeResult;
        prune?(): void;
        recheck?(): Promise<boolean>;
        showNew(): Promise<unknown>;
        start?(): void;
        stop?(): void;
        view(): Children;
    }

    Implemented by

    Index
    • Ask the server again about the items onRealtime() noted when it returned recheck, adding or removing them. Runs before every check as well. Resolves to whether an item was added at the very top, so the reader keeps their place. Sources that return recheck should have this; without it, Deck runs a full check instead.

      Returns Promise<boolean>