Fix types of various fields in GlobalState (#26125)

* Fix types of entities.admin.analytics and entities.admin.teamAnalytics

* Fix type of entities.channels.channelsInTeam

* Fix types of entities.users.stats and entities.users.filteredStats

* Fix types of various profilesInX fields in entities.users

* Fix incorrect field name last_password_update_at used when updating password

We never noticed this bug before because the settings modal reloads the current user after updating their password.

* MM-56760 Fix users not being removed from state.entities.users properly
Этот коммит содержится в:
Harrison Healey
2024-02-15 12:25:11 -05:00
коммит произвёл GitHub
родитель 64b140900e
Коммит 54507bb115
48 изменённых файлов: 316 добавлений и 217 удалений

Просмотреть файл

@@ -29,7 +29,7 @@ const initialState = {
currentChannelId: {id: currentChannelId, team_id: currentTeamId},
},
channelsInTeam: {
currentTeamId: [currentChannelId],
currentTeamId: new Set([currentChannelId]),
},
myMembers: {
currentChannelId: {

Просмотреть файл

@@ -84,7 +84,7 @@ describe('getUnreadChannels', () => {
unreadChannel2,
},
channelsInTeam: {
team1: ['unreadChannel1', 'unreadChannel2', 'readChannel'],
team1: new Set(['unreadChannel1', 'unreadChannel2', 'readChannel']),
},
currentChannelId: 'currentChannel',
messageCounts: {
@@ -375,10 +375,10 @@ describe('getUnreadChannels', () => {
},
channelsInTeam: {
...baseState.entities.channels.channelsInTeam,
team1: [
team1: new Set([
...baseState.entities.channels.channelsInTeam.team1,
'archivedChannel',
],
]),
},
messageCounts: {
...baseState.entities.channels.messageCounts,
@@ -435,7 +435,7 @@ describe('getDisplayedChannels', () => {
unreadChannel2,
},
channelsInTeam: {
team1: ['unreadChannel1', 'unreadChannel2', 'readChannel'],
team1: new Set(['unreadChannel1', 'unreadChannel2', 'readChannel']),
},
currentChannelId: 'currentChannel',
messageCounts: {
@@ -608,7 +608,7 @@ describe('makeGetFilteredChannelIdsForCategory', () => {
unreadChannel2,
},
channelsInTeam: {
team1: ['unreadChannel1', 'unreadChannel2', 'readChannel'],
team1: new Set(['unreadChannel1', 'unreadChannel2', 'readChannel']),
},
currentChannelId: 'currentChannel',
messageCounts: {