~captainepoch/husky

b0caac3a46407161a6b911efec6d06329faabda1 — Adolfo Santiago 6 days ago 9fdf563
Fix animated emojis
M husky/app/build.gradle => husky/app/build.gradle +1 -0
@@ 209,6 209,7 @@ dependencies {
    implementation deps.glide.glideImage
    implementation deps.glide.glideImageViewFactory
    implementation deps.glide.glideOkhttp
    implementation deps.glide.glidePluginAnimation

    // Google dependencies
    implementation deps.google.flexbox

M husky/app/src/main/java/com/keylesspalace/tusky/util/CustomEmojiHelper.kt => husky/app/src/main/java/com/keylesspalace/tusky/util/CustomEmojiHelper.kt +4 -0
@@ 36,6 36,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.request.target.CustomTarget
import com.bumptech.glide.request.target.Target
import com.bumptech.glide.request.transition.Transition
import com.github.penfeizhou.animation.glide.AnimationDecoderOption
import com.keylesspalace.tusky.entity.Emoji
import com.keylesspalace.tusky.settings.PrefKeys
import java.lang.ref.WeakReference


@@ 78,6 79,9 @@ fun CharSequence.emojify(
            builder.setSpan(span, matcher.start(), matcher.end(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)

            var glideRequest = Glide.with(view).load(url)
                .set(AnimationDecoderOption.DISABLE_ANIMATION_GIF_DECODER, !animate)
                .set(AnimationDecoderOption.DISABLE_ANIMATION_WEBP_DECODER, !animate)
                .set(AnimationDecoderOption.DISABLE_ANIMATION_APNG_DECODER, !animate)
            val mimetype = getMimeType(url)
            if(mimetype == MIME.SVG) {
                glideRequest = glideRequest

M husky/dependencies.gradle => husky/dependencies.gradle +2 -1
@@ 58,6 58,7 @@ glide.glideImage = "com.github.piasy:GlideImageLoader:${versions.glideImage}"
glide.glideImageViewFactory =
        "com.github.piasy:GlideImageViewFactory:${versions.glideImage}"
glide.glideOkhttp = "com.github.bumptech.glide:okhttp3-integration:${versions.glide}"
glide.glidePluginAnimation = "com.github.penfeizhou.android.animation:glide-plugin:${versions.glidePluginAnimation}"
deps.glide = glide

def google = [:]


@@ 135,9 136,9 @@ deps.timber = "com.jakewharton.timber:timber:${versions.timber}"

// Repository handler
static def addRepos(RepositoryHandler handler) {
    handler.mavenCentral()
    handler.google()
    handler.gradlePluginPortal()
    handler.mavenCentral()
    handler.maven { url "https://jitpack.io" }
    handler.maven { url "https://plugins.gradle.org/m2/" }
}

M husky/versions.gradle => husky/versions.gradle +1 -0
@@ 30,6 30,7 @@ versions.fragmentKtx = "1.2.5"
versions.fragmentviewbindingdelegateKt = "1.0.0"
versions.glide = "4.13.2"
versions.glideImage = "1.8.1"
versions.glidePluginAnimation = "2.21.0"
versions.kotlinx = "1.6.1"
versions.lifecycle = "2.3.1"
versions.markdownEdit = "1.0.0"