Changeset View
Changeset View
Standalone View
Standalone View
web/input/input-state.js
// @flow | // @flow | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { | import { | ||||
type MediaType, | type MediaType, | ||||
type EncryptedMediaType, | type EncryptedMediaType, | ||||
type Dimensions, | type Dimensions, | ||||
type MediaMissionStep, | type MediaMissionStep, | ||||
} from 'lib/types/media-types.js'; | } from 'lib/types/media-types.js'; | ||||
import type { RawTextMessageInfo } from 'lib/types/messages/text.js'; | import type { RawTextMessageInfo } from 'lib/types/messages/text.js'; | ||||
import type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types.js'; | import type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types.js'; | ||||
export type PendingMultimediaUpload = { | export type PendingMultimediaUpload = { | ||||
localID: string, | +localID: string, | ||||
// Pending uploads are assigned a serverID once they are complete | // Pending uploads are assigned a serverID once they are complete | ||||
serverID: ?string, | +serverID: ?string, | ||||
// Pending uploads are assigned a messageID once they are sent | // Pending uploads are assigned a messageID once they are sent | ||||
messageID: ?string, | +messageID: ?string, | ||||
// This is set to true if the upload fails for whatever reason | // This is set to true if the upload fails for whatever reason | ||||
failed: boolean, | +failed: boolean, | ||||
file: File, | +file: File, | ||||
mediaType: MediaType | EncryptedMediaType, | +mediaType: MediaType | EncryptedMediaType, | ||||
dimensions: ?Dimensions, | +dimensions: ?Dimensions, | ||||
uri: string, | +uri: string, | ||||
blobHash: ?string, | +blobHash: ?string, | ||||
encryptionKey: ?string, | +encryptionKey: ?string, | ||||
loop: boolean, | +thumbHash: ?string, | ||||
+loop: boolean, | |||||
// URLs created with createObjectURL aren't considered "real". The distinction | // URLs created with createObjectURL aren't considered "real". The distinction | ||||
// is required because those "fake" URLs must be disposed properly | // is required because those "fake" URLs must be disposed properly | ||||
uriIsReal: boolean, | +uriIsReal: boolean, | ||||
progressPercent: number, | +progressPercent: number, | ||||
// This is set once the network request begins and used if the upload is | // This is set once the network request begins and used if the upload is | ||||
// cancelled | // cancelled | ||||
abort: ?() => void, | +abort: ?() => void, | ||||
steps: MediaMissionStep[], | +steps: MediaMissionStep[], | ||||
selectTime: number, | +selectTime: number, | ||||
}; | }; | ||||
export type TypeaheadState = { | export type TypeaheadState = { | ||||
+canBeVisible: boolean, | +canBeVisible: boolean, | ||||
+keepUpdatingThreadMembers: boolean, | +keepUpdatingThreadMembers: boolean, | ||||
+frozenMentionsCandidates: $ReadOnlyArray<RelativeMemberInfo>, | +frozenMentionsCandidates: $ReadOnlyArray<RelativeMemberInfo>, | ||||
+moveChoiceUp: ?() => void, | +moveChoiceUp: ?() => void, | ||||
+moveChoiceDown: ?() => void, | +moveChoiceDown: ?() => void, | ||||
Show All 40 Lines |