Skip to content

Commit ab18e85

Browse files
ClearlyClairehiyuki2578
authored andcommitted
Minor account media gallery fixes (mastodon#10695)
* Make the cursor icon consistant across media types in account media gallery * Fix the video player modal causing scroll position to reset
1 parent 296ec41 commit ab18e85

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

app/javascript/mastodon/features/account_gallery/components/media_item.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export default class MediaItem extends ImmutablePureComponent {
133133

134134
return (
135135
<div className='account-gallery__item' style={{ width, height }}>
136-
<a className='media-gallery__item-thumbnail' href={status.get('url')} target='_blank' style={{ cursor: 'pointer' }} onClick={this.handleClick}>
136+
<a className='media-gallery__item-thumbnail' href={status.get('url')} target='_blank' onClick={this.handleClick}>
137137
<canvas width={32} height={32} ref={this.setCanvasRef} className={classNames('media-gallery__preview', { 'media-gallery__preview--hidden': visible && loaded })} />
138138
{visible && thumbnail}
139139
</a>

app/javascript/mastodon/features/ui/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ import {
4747
Lists,
4848
} from './util/async-components';
4949
import { me } from '../../initial_state';
50-
import { previewState } from './components/media_modal';
50+
import { previewState as previewMediaState } from './components/media_modal';
51+
import { previewState as previewVideoState } from './components/video_modal';
5152

5253
// Dummy import, to make sure that <Status /> ends up in the application bundle.
5354
// Without this it ends up in ~8 very commonly used bundles.
@@ -121,7 +122,7 @@ class SwitchingColumnsArea extends React.PureComponent {
121122
}
122123

123124
shouldUpdateScroll (_, { location }) {
124-
return location.state !== previewState;
125+
return location.state !== previewMediaState && location.state !== previewVideoState;
125126
}
126127

127128
handleResize = debounce(() => {

0 commit comments

Comments
 (0)