Skip to content

Commit dd74be6

Browse files
lethemanhlethemanh
authored andcommitted
fix: Resolve issues of new file viewer UI 🐛
1 parent 8510cc4 commit dd74be6

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"cozy-stack-client": "^60.19.0",
105105
"cozy-ui": "^135.6.0",
106106
"cozy-ui-plus": "^4.4.0",
107-
"cozy-viewer": "^26.6.1",
107+
"cozy-viewer": "^26.6.4",
108108
"date-fns": "2.30.0",
109109
"diacritics": "1.3.0",
110110
"filesize": "10.1.6",

src/modules/actions/details.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ export const details = ({ t, navigate, location }) => {
3333
icon,
3434
label,
3535
allowInfectedFiles: false,
36-
displayCondition: () =>
37-
flag('drive.new-file-viewer-ui.enabled') &&
38-
location?.state?.showDetailPanel === false,
36+
displayCondition: () => flag('drive.new-file-viewer-ui.enabled'),
3937
Component: makeComponent(label, icon),
4038
action: () => {
4139
navigate(location.pathname, {
4240
replace: true,
4341
state: {
4442
...location.state,
45-
showDetailPanel: true
43+
triggerDetailPanelTime:
44+
(location?.state?.triggerDetailPanelTime || 0) + 1
4645
}
4746
})
4847
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5922,10 +5922,10 @@ cozy-ui@^135.6.0:
59225922
react-virtuoso "^4.13.0"
59235923
rooks "7.14.1"
59245924

5925-
cozy-viewer@^26.6.1:
5926-
version "26.6.1"
5927-
resolved "https://registry.yarnpkg.com/cozy-viewer/-/cozy-viewer-26.6.1.tgz#c79ff3d55de63a5927a49d6525fafebba0deb438"
5928-
integrity sha512-RB0/25X/8YWq6RXYLjKaTzZJAY57dIWE0yFhfW/kkazZTPQMUIei22CSbtSQL+rfGHYMN9wLefwRNDLSwqq4GA==
5925+
cozy-viewer@^26.6.4:
5926+
version "26.6.4"
5927+
resolved "https://registry.yarnpkg.com/cozy-viewer/-/cozy-viewer-26.6.4.tgz#478b59695733860ce9c73d3c8772aafada60a5d6"
5928+
integrity sha512-zbMS2qIeBdkuLU8G3DaMZjcPrQORZ5TWjvib2o4gvM9K8sYVLXtG77YjLhQmnll3G3RMOGfotTgRdnOkXxVePw==
59295929
dependencies:
59305930
classnames "^2.5.1"
59315931
hammerjs "^2.0.8"

0 commit comments

Comments
 (0)