Changeset View
Changeset View
Standalone View
Standalone View
lib/types/thread-types.js
Show First 20 Lines • Show All 465 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
export type SidebarInfo = { | export type SidebarInfo = { | ||||
+threadInfo: ThreadInfo, | +threadInfo: ThreadInfo, | ||||
+lastUpdatedTime: number, | +lastUpdatedTime: number, | ||||
+mostRecentNonLocalMessage: ?string, | +mostRecentNonLocalMessage: ?string, | ||||
}; | }; | ||||
export type ToggleMessagePinRequest = { | |||||
+messageID: string, | |||||
+threadID: string, | |||||
+isPinned: boolean, | |||||
tomek: This might be a little surprising for a user of this api to send a request with `true` here… | |||||
atulUnsubmitted Not Done Inline ActionsI agree, I think we could instead replace isPinned with +action: 'pin' | 'unpin'. Thoughts? atul: I agree, I think we could instead replace `isPinned` with `+action: 'pin' | 'unpin'`. Thoughts? | |||||
rohanAuthorUnsubmitted Done Inline ActionsGood point, I'll change isPinned rohan: Good point, I'll change `isPinned` | |||||
}; | |||||
// We can show a max of 3 sidebars inline underneath their parent in the chat | // We can show a max of 3 sidebars inline underneath their parent in the chat | ||||
// tab. If there are more, we show a button that opens a modal to see the rest | // tab. If there are more, we show a button that opens a modal to see the rest | ||||
export const maxReadSidebars = 3; | export const maxReadSidebars = 3; | ||||
// We can show a max of 5 sidebars inline underneath their parent | // We can show a max of 5 sidebars inline underneath their parent | ||||
// in the chat tab if every one of the displayed sidebars is unread | // in the chat tab if every one of the displayed sidebars is unread | ||||
export const maxUnreadSidebars = 5; | export const maxUnreadSidebars = 5; |
This might be a little surprising for a user of this api to send a request with true here which means that the message will be not pinned. Maybe we should rename this to simply pin or even newPinState, or something else, but less confusing?