Changeset View
Changeset View
Standalone View
Standalone View
native/input/input-state.js
Show All 19 Lines | |||||
}; | }; | ||||
export type PendingMultimediaUploads = { | export type PendingMultimediaUploads = { | ||||
[localMessageID: string]: MessagePendingUploads, | [localMessageID: string]: MessagePendingUploads, | ||||
}; | }; | ||||
export type EditState = { | export type EditState = { | ||||
+editedMessage: ?MessageInfo, | +editedMessage: ?MessageInfo, | ||||
+isEditedMessageChanged: boolean, | |||||
}; | }; | ||||
export type EditInputBarMessageParameters = { | export type EditInputBarMessageParameters = { | ||||
+message: string, | +message: string, | ||||
+mode: 'prepend' | 'replace', | +mode: 'prepend' | 'replace', | ||||
}; | }; | ||||
export type InputState = { | export type InputState = { | ||||
Show All 28 Lines | +setPendingThreadUpdateHandler: ( | ||||
threadID: string, | threadID: string, | ||||
pendingThreadUpdateHandler: ?(ThreadInfo) => mixed, | pendingThreadUpdateHandler: ?(ThreadInfo) => mixed, | ||||
) => void, | ) => void, | ||||
+editState: EditState, | +editState: EditState, | ||||
+setEditedMessage: ( | +setEditedMessage: ( | ||||
editedMessage: ?MessageInfo, | editedMessage: ?MessageInfo, | ||||
callback?: () => void, | callback?: () => void, | ||||
) => void, | ) => void, | ||||
+setEditedMessageChanged: (isEditedMessageChanged: boolean) => void, | |||||
+scrollToMessage: (messageKey: string) => void, | +scrollToMessage: (messageKey: string) => void, | ||||
+addScrollToMessageListener: ((messageKey: string) => void) => void, | +addScrollToMessageListener: ((messageKey: string) => void) => void, | ||||
+removeScrollToMessageListener: ((messageKey: string) => void) => void, | +removeScrollToMessageListener: ((messageKey: string) => void) => void, | ||||
}; | }; | ||||
const InputStateContext: React.Context<?InputState> = | const InputStateContext: React.Context<?InputState> = | ||||
React.createContext<?InputState>(null); | React.createContext<?InputState>(null); | ||||
export { InputStateContext }; | export { InputStateContext }; |