Page MenuHomePhorge

D10810.1768936066.diff
No OneTemporary

Size
5 KB
Referenced Files
None
Subscribers
None

D10810.1768936066.diff

diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js
--- a/lib/shared/thread-utils.js
+++ b/lib/shared/thread-utils.js
@@ -519,6 +519,7 @@
...SharedCreatePendingSidebarInput,
+messageTitle: string,
};
+
function baseCreatePendingSidebar(
input: BaseCreatePendingSidebarInput,
): ThreadInfo {
@@ -595,6 +596,7 @@
...SharedCreatePendingSidebarInput,
+markdownRules: ParserRules,
};
+
function createUnresolvedPendingSidebar(
input: CreateUnresolvedPendingSidebarInput,
): ThreadInfo {
@@ -628,6 +630,7 @@
+markdownRules: ParserRules,
+getENSNames: ?GetENSNames,
};
+
async function createPendingSidebar(
input: CreatePendingSidebarInput,
): Promise<ThreadInfo> {
@@ -691,6 +694,7 @@
+handleError?: () => mixed,
+calendarQuery: CalendarQuery,
};
+
async function createRealThreadFromPendingThread({
threadInfo,
dispatchActionPromise,
@@ -745,6 +749,7 @@
+filterVoicedInAnnouncementChannelsPermission?: boolean,
+minimallyEncodePermissions?: boolean,
};
+
function rawThreadInfoFromServerThreadInfo(
serverThreadInfo: ServerThreadInfo,
viewerID: string,
@@ -1196,6 +1201,7 @@
type ExistingThreadInfoFinder = (
params: ExistingThreadInfoFinderParams,
) => ?ThreadInfo;
+
function useExistingThreadInfoFinder(
baseThreadInfo: ?ThreadInfo,
): ExistingThreadInfoFinder {
@@ -1276,6 +1282,7 @@
}
type ThreadTypeParentRequirement = 'optional' | 'required' | 'disabled';
+
function getThreadTypeParentRequirement(
threadType: ThreadType,
): ThreadTypeParentRequirement {
@@ -1370,9 +1377,8 @@
'all threads should have a default role',
);
const defaultRole = threadInfo.roles[defaultRoleID];
- const defaultRolePermissions = defaultRole.minimallyEncoded
- ? decodeMinimallyEncodedRoleInfo(defaultRole).permissions
- : defaultRole.permissions;
+ const defaultRolePermissions =
+ decodeMinimallyEncodedRoleInfo(defaultRole).permissions;
return !!defaultRolePermissions[threadPermissions.VOICED];
}
@@ -1473,6 +1479,7 @@
+threadSearchResults: $ReadOnlySet<string>,
+usersSearchResults: $ReadOnlyArray<GlobalAccountUserInfo>,
};
+
function useThreadListSearch(
searchText: string,
viewerID: ?string,
@@ -1656,12 +1663,10 @@
Object.keys(threadInfo.roles).forEach(roleID => {
const roleName = threadInfo.roles[roleID].name;
- const rolePermissions = threadInfo.minimallyEncoded
- ? Object.keys(
- decodeMinimallyEncodedRoleInfo(threadInfo.roles[roleID])
- .permissions,
- )
- : Object.keys(threadInfo.roles[roleID].permissions);
+ const rolePermissions = Object.keys(
+ decodeMinimallyEncodedRoleInfo(threadInfo.roles[roleID]).permissions,
+ );
+
const setOfUserSurfacedPermissions = new Set<UserSurfacedPermission>();
rolePermissions.forEach(rolePermission => {
diff --git a/lib/utils/drawer-utils.react.js b/lib/utils/drawer-utils.react.js
--- a/lib/utils/drawer-utils.react.js
+++ b/lib/utils/drawer-utils.react.js
@@ -90,12 +90,7 @@
if (numberOfOccurrences) {
name = `${name} (${numberOfOccurrences.toString()})`;
}
- // Branching to appease `flow`.
- if (chat.minimallyEncoded) {
- result.push({ ...chat, uiName: name });
- } else {
- result.push({ ...chat, uiName: name });
- }
+ result.push({ ...chat, uiName: name });
}
return result;
}, [communities]);
diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js
--- a/native/input/input-state-container.react.js
+++ b/native/input/input-state-container.react.js
@@ -162,6 +162,7 @@
type State = {
+pendingUploads: PendingMultimediaUploads,
};
+
class InputStateContainer extends React.PureComponent<Props, State> {
state: State = {
pendingUploads: {},
@@ -520,16 +521,10 @@
time: Date.now(),
};
- // Branching to appease `flow`.
- const newThreadInfo = threadInfo.minimallyEncoded
- ? {
- ...threadInfo,
- id: newThreadID,
- }
- : {
- ...threadInfo,
- id: newThreadID,
- };
+ const newThreadInfo = {
+ ...threadInfo,
+ id: newThreadID,
+ };
void this.props.dispatchActionPromise(
sendTextMessageActionTypes,
diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js
--- a/web/input/input-state-container.react.js
+++ b/web/input/input-state-container.react.js
@@ -165,6 +165,7 @@
...Props,
...State,
};
+
class InputStateContainer extends React.PureComponent<Props, State> {
state: State = {
pendingUploads: {},
@@ -1315,16 +1316,11 @@
time: Date.now(),
};
- // Branching to appease `flow`.
- const newThreadInfo = threadInfo.minimallyEncoded
- ? {
- ...threadInfo,
- id: newThreadID,
- }
- : {
- ...threadInfo,
- id: newThreadID,
- };
+ const newThreadInfo = {
+ ...threadInfo,
+ id: newThreadID,
+ };
+
void this.props.dispatchActionPromise(
sendTextMessageActionTypes,
this.sendTextMessageAction(

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 20, 7:07 PM (3 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5963355
Default Alt Text
D10810.1768936066.diff (5 KB)

Event Timeline