logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: b21ab498f84b75288f20a7eb2c6e0ee223481674
parent: 1c6c6b271cb361b75a33bc98c8f26d18ea9af23f
Author: Naoki Kosaka <n.k@mail.yukimochi.net>
Date:   Wed, 12 Jul 2017 02:56:45 +0900

Fix media modal prev button behavior. (#4158)


Diffstat:

Mapp/javascript/mastodon/features/ui/components/media_modal.js2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/javascript/mastodon/features/ui/components/media_modal.js b/app/javascript/mastodon/features/ui/components/media_modal.js @@ -35,7 +35,7 @@ export default class MediaModal extends ImmutablePureComponent { } handlePrevClick = () => { - this.setState({ index: (this.getIndex() - 1) % this.props.media.size }); + this.setState({ index: (this.props.media.size + this.getIndex() - 1) % this.props.media.size }); } handleKeyUp = (e) => {