Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
b72750c5
Unverified
Commit
b72750c5
authored
1 month ago
by
Yash Rajpal
Committed by
GitHub
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: Files contextual bar reactivity (#34860)
parent
28da43e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.changeset/nasty-shirts-rule.md
+5
-0
5 additions, 0 deletions
.changeset/nasty-shirts-rule.md
apps/meteor/client/views/room/contextualBar/RoomFiles/hooks/useFilesList.ts
+1
-7
1 addition, 7 deletions
.../views/room/contextualBar/RoomFiles/hooks/useFilesList.ts
with
6 additions
and
7 deletions
.changeset/nasty-shirts-rule.md
0 → 100644
+
5
−
0
View file @
b72750c5
---
'
@rocket.chat/meteor'
:
patch
---
Fixes an issue where room's file list would incorrectly display incoming messages as files.
This diff is collapsed.
Click to expand it.
apps/meteor/client/views/room/contextualBar/RoomFiles/hooks/useFilesList.ts
+
1
−
7
View file @
b72750c5
import
{
Base64
}
from
'
@rocket.chat/base64
'
;
import
{
useUserRoom
,
useUserId
,
useEndpoint
}
from
'
@rocket.chat/ui-contexts
'
;
import
{
useUserRoom
,
useEndpoint
}
from
'
@rocket.chat/ui-contexts
'
;
import
{
useCallback
,
useEffect
,
useMemo
,
useState
}
from
'
react
'
;
import
{
e2e
}
from
'
../../../../../../app/e2e/client/rocketchat.e2e
'
;
import
{
useScrollableRecordList
}
from
'
../../../../../hooks/lists/useScrollableRecordList
'
;
import
{
useStreamUpdatesForMessageList
}
from
'
../../../../../hooks/lists/useStreamUpdatesForMessageList
'
;
import
{
useComponentDidUpdate
}
from
'
../../../../../hooks/useComponentDidUpdate
'
;
import
type
{
FilesListOptions
}
from
'
../../../../../lib/lists/FilesList
'
;
import
{
FilesList
}
from
'
../../../../../lib/lists/FilesList
'
;
import
type
{
MessageList
}
from
'
../../../../../lib/lists/MessageList
'
;
import
{
getConfig
}
from
'
../../../../../lib/utils/getConfig
'
;
export
const
useFilesList
=
(
...
...
@@ -22,7 +20,6 @@ export const useFilesList = (
const
[
filesList
,
setFilesList
]
=
useState
(()
=>
new
FilesList
(
options
));
const
reload
=
useCallback
(()
=>
setFilesList
(
new
FilesList
(
options
)),
[
options
]);
const
room
=
useUserRoom
(
options
.
rid
);
const
uid
=
useUserId
();
useComponentDidUpdate
(()
=>
{
options
&&
reload
();
...
...
@@ -97,9 +94,6 @@ export const useFilesList = (
useMemo
(()
=>
parseInt
(
`
${
getConfig
(
'
discussionListSize
'
,
10
)}
`
),
[]),
);
// TODO: chapter day : frontend create useStreamUpdatesForUploadList
useStreamUpdatesForMessageList
(
filesList
as
unknown
as
MessageList
,
uid
,
options
.
rid
||
null
);
return
{
reload
,
filesList
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment