about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/remote_unfollows_controller.rb (renamed from app/controllers/remote_unfollows.rb)0
-rw-r--r--app/javascript/styles/mastodon/components.scss6
-rw-r--r--app/models/concerns/attachmentable.rb5
3 files changed, 7 insertions, 4 deletions
diff --git a/app/controllers/remote_unfollows.rb b/app/controllers/remote_unfollows_controller.rb
index af5943363..af5943363 100644
--- a/app/controllers/remote_unfollows.rb
+++ b/app/controllers/remote_unfollows_controller.rb
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index 147cc653b..6905eaa1e 100644
--- a/app/javascript/styles/mastodon/components.scss
+++ b/app/javascript/styles/mastodon/components.scss
@@ -302,12 +302,10 @@
     height: 0;
     transform-origin: bottom;
     opacity: 0.0;
-    transition: all 0.4s ease;
 
     &.spoiler-input--visible {
       height: 47px;
       opacity: 1.0;
-      transition: all 0.4s ease;
     }
   }
 
@@ -568,6 +566,10 @@
   }
 }
 
+.no-reduce-motion .spoiler-input {
+  transition: height 0.4s ease, opacity 0.4s ease;
+}
+
 .emojione {
   font-size: inherit;
   vertical-align: middle;
diff --git a/app/models/concerns/attachmentable.rb b/app/models/concerns/attachmentable.rb
index db63c3eca..44bdfa39a 100644
--- a/app/models/concerns/attachmentable.rb
+++ b/app/models/concerns/attachmentable.rb
@@ -42,8 +42,9 @@ module Attachmentable
     extensions_for_mime_type = mime_type.empty? ? [] : mime_type.first.extensions
     original_extension       = Paperclip::Interpolations.extension(attachment, :original)
     proper_extension         = extensions_for_mime_type.first.to_s
-    proper_extension         = 'jpeg' if proper_extension == 'jpe'
+    extension                = extensions_for_mime_type.include?(original_extension) ? original_extension : proper_extension
+    extension                = 'jpeg' if extension == 'jpe'
 
-    extensions_for_mime_type.include?(original_extension) ? original_extension : proper_extension
+    extension
   end
 end