Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@

Enables/disables the legacy image viewer behavior.

By default, when you open (press) an image attachment it opens the image in a full-screen image viewer.
Within the viewer, you can keep swiping left to scroll through all the images that have been loaded within a channel so far.
This creates quite a lot of extra work for the JS thread to keep track of image attachments loaded in a channel and pre-populating them in the viewer for smooth transitions.

For performance reason, you can switch to an alternate UX for the image viewer where image attachments are only loaded for the selected messages in a viewer,
by setting this prop to false.
When true, within the image viewer you can keep swiping left to scroll through all the images that have been loaded within a channel so far.
Beaware that this creates quite a lot of extra work for the JS thread to keep track of image attachments loaded in a channel and pre-populating them in the viewer for smooth transitions.

| Type | Default |
| - | - |
| boolean | true |
| boolean | false |
3 changes: 1 addition & 2 deletions package/src/components/Channel/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,7 @@ const ChannelWithContext = <
keyboardBehavior,
KeyboardCompatibleView = KeyboardCompatibleViewDefault,
keyboardVerticalOffset,
// TODO[major]: switch to false.
legacyImageViewerSwipeBehaviour = true,
legacyImageViewerSwipeBehaviour = false,
LoadingErrorIndicator = LoadingErrorIndicatorDefault,
LoadingIndicator = LoadingIndicatorDefault,
loadingMore: loadingMoreProp,
Expand Down