IGPAPI
    Preparing search index...

    Interface ScreenSwipeMembers<Cursor, Page, X, S>

    The members a swipeable feed's handle gets besides a feed's: current, the item in front (right after the screen opens: its first item; undefined when the first page holds none — the next swipe brings the first that loads), and swipeToNext, the swipe, which returns the item now in front — undefined at the end of the feed, a normal result — crossing page boundaries itself: the swipe the screen's recorded threshold names requests the next page. A handle is a snapshot: its current stays the item that was in front when it was taken, while swipeToNext always moves on from where the process is.

    interface ScreenSwipeMembers<Cursor, Page, X, S> {
        current: ScreenItemFieldMember<
            ScreenItemFieldShape<ScreenItemsOfList<Page>, "maybe", never>,
            (
                self: ScreenHandle,
                state: ScreenFeedState<Cursor>,
            ) => ScreenHandle | undefined,
        >;
        stream: ScreenItemFieldMember<
            ScreenItemFieldShape<ScreenItemsOfList<Page>, "stream", X>,
            (
                self: ScreenHandle,
                state: ScreenFeedState<Cursor>,
            ) => Stream<ScreenHandle, X, S>,
        >;
        swipeToNext: ScreenScrollMember<
            ScreenScrollShape<ScreenItemsOfList<Page>, X, "item">,
            (
                self: ScreenHandle,
                state: ScreenFeedState<Cursor>,
            ) => () => Effect<ScreenHandle | undefined, X, S>,
        >;
    }

    Type Parameters

    • Cursor
    • Page
    • X
    • S
    Index

    Properties

    current: ScreenItemFieldMember<
        ScreenItemFieldShape<ScreenItemsOfList<Page>, "maybe", never>,
        (
            self: ScreenHandle,
            state: ScreenFeedState<Cursor>,
        ) => ScreenHandle | undefined,
    >
    stream: ScreenItemFieldMember<
        ScreenItemFieldShape<ScreenItemsOfList<Page>, "stream", X>,
        (
            self: ScreenHandle,
            state: ScreenFeedState<Cursor>,
        ) => Stream<ScreenHandle, X, S>,
    >

    A swipeable feed's stream, which replaces the plain feed's: the feed is walked by swipes, as the app does — the items that come in front, starting with the item in front when the stream starts, then one swipeToNext per pull (sending what each swipe sends, the next page requested on the swipe the threshold names), to the feed's end. Each item that comes in front enters its visit; the swipe ends the previous visit. Generic code that reads stream on a swipeable feed therefore swipes; the raw pages of a swipeable feed are nextPage by hand. Nothing runs until it is consumed; stopping, take or a failure makes no swipe beyond the last pulled item.

    swipeToNext: ScreenScrollMember<
        ScreenScrollShape<ScreenItemsOfList<Page>, X, "item">,
        (
            self: ScreenHandle,
            state: ScreenFeedState<Cursor>,
        ) => () => Effect<ScreenHandle | undefined, X, S>,
    >