feat(chat): implement pull-to-refresh functionality and pagination for chat history
This commit is contained in:
@@ -3,6 +3,7 @@ import { shouldPromptUnlockHistory } from "../helper/unlock";
|
||||
import { initialState } from "../chat-state";
|
||||
import {
|
||||
guestInitializingState,
|
||||
historyPaginationTransitions,
|
||||
userInitializingState,
|
||||
} from "./history-flow";
|
||||
import {
|
||||
@@ -79,8 +80,13 @@ const guestSessionState = chatMachineSetup.createStateConfig({
|
||||
id: "loadHistory",
|
||||
src: "loadHistory",
|
||||
},
|
||||
{
|
||||
id: "loadMoreHistory",
|
||||
src: "loadMoreHistory",
|
||||
},
|
||||
],
|
||||
on: {
|
||||
...historyPaginationTransitions,
|
||||
ChatUserLogin: {
|
||||
target: "#chat.userSession",
|
||||
actions: "startUserSession",
|
||||
@@ -137,8 +143,13 @@ const userSessionState = chatMachineSetup.createStateConfig({
|
||||
id: "loadHistory",
|
||||
src: "loadHistory",
|
||||
},
|
||||
{
|
||||
id: "loadMoreHistory",
|
||||
src: "loadMoreHistory",
|
||||
},
|
||||
],
|
||||
on: {
|
||||
...historyPaginationTransitions,
|
||||
ChatGuestLogin: {
|
||||
target: "#chat.guestSession",
|
||||
actions: "startGuestSession",
|
||||
|
||||
Reference in New Issue
Block a user