Peers: Fix properties not resetting (#5331)
This commit is contained in:
parent
b8a906ef2f
commit
724f50bb59
@ -23,7 +23,7 @@ import type {
|
||||
ApiTopic,
|
||||
} from '../../types';
|
||||
|
||||
import { omitUndefined, pick, pickTruthy } from '../../../util/iteratees';
|
||||
import { pick, pickTruthy } from '../../../util/iteratees';
|
||||
import { getServerTime, getServerTimeOffset } from '../../../util/serverTime';
|
||||
import { addPhotoToLocalDb, addUserToLocalDb, serializeBytes } from '../helpers';
|
||||
import { buildApiPhoto, buildApiUsernames, buildAvatarPhotoId } from './common';
|
||||
@ -71,7 +71,7 @@ function buildApiChatFieldsFromPeerEntity(
|
||||
const areProfilesShown = Boolean('signatureProfiles' in peerEntity && peerEntity.signatureProfiles);
|
||||
const subscriptionUntil = 'subscriptionUntilDate' in peerEntity ? peerEntity.subscriptionUntilDate : undefined;
|
||||
|
||||
return omitUndefined<PeerEntityApiChatFields>({
|
||||
return {
|
||||
isMin,
|
||||
hasPrivateLink,
|
||||
areSignaturesShown,
|
||||
@ -104,7 +104,7 @@ function buildApiChatFieldsFromPeerEntity(
|
||||
emojiStatus,
|
||||
boostLevel,
|
||||
subscriptionUntil,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function buildApiChatFromDialog(
|
||||
|
||||
@ -6,7 +6,7 @@ import type { ChatListType, GlobalState } from '../types';
|
||||
import { ARCHIVED_FOLDER_ID } from '../../config';
|
||||
import { areDeepEqual } from '../../util/areDeepEqual';
|
||||
import {
|
||||
areSortedArraysEqual, buildCollectionByKey, omit, pick, unique,
|
||||
areSortedArraysEqual, buildCollectionByKey, omit, omitUndefined, pick, unique,
|
||||
} from '../../util/iteratees';
|
||||
import { selectChatFullInfo } from '../selectors';
|
||||
|
||||
@ -310,7 +310,7 @@ function getUpdatedChat<T extends GlobalState>(
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return updatedChat;
|
||||
return omitUndefined(updatedChat);
|
||||
}
|
||||
|
||||
export function updateChatListType<T extends GlobalState>(
|
||||
|
||||
@ -5,7 +5,7 @@ import type { GlobalState, TabArgs, TabState } from '../types';
|
||||
|
||||
import { areDeepEqual } from '../../util/areDeepEqual';
|
||||
import { getCurrentTabId } from '../../util/establishMultitabRole';
|
||||
import { omit, unique } from '../../util/iteratees';
|
||||
import { omit, omitUndefined, unique } from '../../util/iteratees';
|
||||
import { MEMO_EMPTY_ARRAY } from '../../util/memo';
|
||||
import { selectTabState } from '../selectors';
|
||||
import { updateChat } from './chats';
|
||||
@ -140,7 +140,7 @@ function getUpdatedUser(global: GlobalState, userId: string, userUpdate: Partial
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return updatedUser;
|
||||
return omitUndefined(updatedUser);
|
||||
}
|
||||
|
||||
export function deleteContact<T extends GlobalState>(global: T, userId: string): T {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user