about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-12-15 08:50:10 -0600
committerStarfall <us@starfall.systems>2022-12-15 08:50:10 -0600
commit957c21273ff42d5b2b4a5e16b7869bbb09aeb865 (patch)
treecffc6b225a011f48d664a7df17997d790df055df /app/javascript
parente073e66d3b0c8eeb1ed66c67881c33ab5924aa8c (diff)
remove color-changing lightbox background, hope it just stays grey
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/features/ui/components/media_modal.js19
-rw-r--r--app/javascript/mastodon/features/ui/components/video_modal.js6
2 files changed, 0 insertions, 25 deletions
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 () {