ignores gif downscale
This commit is contained in:
parent
5ba35b8053
commit
faf4efc982
|
@ -652,7 +652,6 @@ class UpdateStatusTask(
|
|||
|
||||
private val BULK_SIZE = 256 * 1024// 128 Kib
|
||||
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun getBodyFromMedia(resolver: ContentResolver,
|
||||
mediaUri: Uri,
|
||||
|
@ -673,7 +672,7 @@ class UpdateStatusTask(
|
|||
sizeLimit.x, sizeLimit.y)
|
||||
o.inJustDecodeBounds = false
|
||||
val bitmap = BitmapFactoryUtils.decodeUri(resolver, mediaUri, null, o)
|
||||
if (bitmap != null) {
|
||||
if (bitmap != null && mediaType != "image/gif") {
|
||||
val os = DirectByteArrayOutputStream()
|
||||
when (mediaType) {
|
||||
"image/png", "image/x-png", "image/webp", "image-x-webp" -> {
|
||||
|
|
|
@ -40,6 +40,8 @@ import com.afollestad.appthemeengine.ATE
|
|||
import com.afollestad.appthemeengine.Config
|
||||
import com.pnikosis.materialishprogress.ProgressWheel
|
||||
import com.rengwuxian.materialedittext.MaterialEditText
|
||||
import nl.komponents.kovenant.android.startKovenant
|
||||
import nl.komponents.kovenant.android.stopKovenant
|
||||
import org.apache.commons.lang3.ArrayUtils
|
||||
import org.mariotaku.twidere.BuildConfig
|
||||
import org.mariotaku.twidere.Constants
|
||||
|
@ -99,6 +101,7 @@ class TwidereApplication : Application(), Constants, OnSharedPreferenceChangeLis
|
|||
val preferences = sharedPreferences
|
||||
resetTheme(preferences)
|
||||
super.onCreate()
|
||||
startKovenant()
|
||||
|
||||
profileImageViewViewProcessor = ProfileImageViewViewProcessor()
|
||||
fontFamilyTagProcessor = FontFamilyTagProcessor()
|
||||
|
@ -273,6 +276,11 @@ class TwidereApplication : Application(), Constants, OnSharedPreferenceChangeLis
|
|||
}
|
||||
}
|
||||
|
||||
override fun onTerminate() {
|
||||
super.onTerminate()
|
||||
stopKovenant()
|
||||
}
|
||||
|
||||
private fun resetTheme(preferences: SharedPreferences) {
|
||||
when (ThemeUtils.getLocalNightMode(preferences)) {
|
||||
AppCompatDelegate.MODE_NIGHT_AUTO -> {
|
||||
|
|
Loading…
Reference in New Issue