From 957c21273ff42d5b2b4a5e16b7869bbb09aeb865 Mon Sep 17 00:00:00 2001 From: Starfall Date: Thu, 15 Dec 2022 08:50:10 -0600 Subject: remove color-changing lightbox background, hope it just stays grey --- .../mastodon/features/ui/components/media_modal.js | 19 ------------------- .../mastodon/features/ui/components/video_modal.js | 6 ------ 2 files changed, 25 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/features/ui/components/media_modal.js b/app/javascript/mastodon/features/ui/components/media_modal.js index ae937d1cd..7f50572e7 100644 --- a/app/javascript/mastodon/features/ui/components/media_modal.js +++ b/app/javascript/mastodon/features/ui/components/media_modal.js @@ -91,25 +91,6 @@ class MediaModal extends ImmutablePureComponent { componentDidMount () { window.addEventListener('keydown', this.handleKeyDown, false); - - this._sendBackgroundColor(); - } - - componentDidUpdate (prevProps, prevState) { - if (prevState.index !== this.state.index) { - this._sendBackgroundColor(); - } - } - - _sendBackgroundColor () { - const { media, onChangeBackgroundColor } = this.props; - const index = this.getIndex(); - const blurhash = media.getIn([index, 'blurhash']); - - if (blurhash) { - const backgroundColor = getAverageFromBlurhash(blurhash); - onChangeBackgroundColor(backgroundColor); - } } componentWillUnmount () { diff --git a/app/javascript/mastodon/features/ui/components/video_modal.js b/app/javascript/mastodon/features/ui/components/video_modal.js index f3ee89dfd..d3bd034cb 100644 --- a/app/javascript/mastodon/features/ui/components/video_modal.js +++ b/app/javascript/mastodon/features/ui/components/video_modal.js @@ -22,12 +22,6 @@ export default class VideoModal extends ImmutablePureComponent { componentDidMount () { const { media, onChangeBackgroundColor } = this.props; - - const backgroundColor = getAverageFromBlurhash(media.get('blurhash')); - - if (backgroundColor) { - onChangeBackgroundColor(backgroundColor); - } } render () { -- cgit