]> cat aescling's git repositories - mastodon.git/commitdiff
Minor account media gallery fixes (#10695)
authorThibG <thib@sitedethib.com>
Sat, 4 May 2019 15:36:43 +0000 (17:36 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 4 May 2019 15:36:43 +0000 (17:36 +0200)
* Make the cursor icon consistant across media types in account media gallery

* Fix the video player modal causing scroll position to reset

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

index 8d462996ed013ec081e26fe45ce39c3c4cf20fee..5643e64490615e9fbf7b241e0026ba79f64b41cd 100644 (file)
@@ -133,7 +133,7 @@ export default class MediaItem extends ImmutablePureComponent {
 
     return (
       <div className='account-gallery__item' style={{ width, height }}>
-        <a className='media-gallery__item-thumbnail' href={status.get('url')} target='_blank' style={{ cursor: 'pointer' }} onClick={this.handleClick}>
+        <a className='media-gallery__item-thumbnail' href={status.get('url')} target='_blank' onClick={this.handleClick}>
           <canvas width={32} height={32} ref={this.setCanvasRef} className={classNames('media-gallery__preview', { 'media-gallery__preview--hidden': visible && loaded })} />
           {visible && thumbnail}
         </a>
index c14eba99254385b178c387a3d3509b9f070f3823..1fcea779d6f2a3a45508e8fe8888b78ce5934be1 100644 (file)
@@ -47,7 +47,8 @@ import {
   Lists,
 } from './util/async-components';
 import { me } from '../../initial_state';
-import { previewState } from './components/media_modal';
+import { previewState as previewMediaState } from './components/media_modal';
+import { previewState as previewVideoState } from './components/video_modal';
 
 // Dummy import, to make sure that <Status /> ends up in the application bundle.
 // Without this it ends up in ~8 very commonly used bundles.
@@ -121,7 +122,7 @@ class SwitchingColumnsArea extends React.PureComponent {
   }
 
   shouldUpdateScroll (_, { location }) {
-    return location.state !== previewState;
+    return location.state !== previewMediaState && location.state !== previewVideoState;
   }
 
   handleResize = debounce(() => {