diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 1a05a8dc8..907dafe74 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -82,7 +82,7 @@ android { defaultConfig { minSdkVersion 8 targetSdkVersion 19 - versionCode 221 + versionCode 222 versionName "1.4.10" } } diff --git a/TMessagesProj/src/main/AndroidManifest.xml b/TMessagesProj/src/main/AndroidManifest.xml index 0ca33fc0f..2deb2e199 100644 --- a/TMessagesProj/src/main/AndroidManifest.xml +++ b/TMessagesProj/src/main/AndroidManifest.xml @@ -45,7 +45,8 @@ android:theme="@style/Theme.TMessages.Start" android:name="org.telegram.ui.ApplicationLoader" android:hardwareAccelerated="true" - android:largeHeap="true"> + android:largeHeap="true" + android:installLocation="auto"> 0) { + if (!message.unread && lower_id != 0 || message.id > 0) { message.send_state = 0; } if (lower_id == 0 && !cursor.isNull(5)) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Views/ImageReceiver.java b/TMessagesProj/src/main/java/org/telegram/ui/Views/ImageReceiver.java index fccfb5f06..be6271972 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Views/ImageReceiver.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Views/ImageReceiver.java @@ -34,6 +34,7 @@ public class ImageReceiver { public Integer TAG = null; public WeakReference parentView = null; public int imageX = 0, imageY = 0, imageW = 0, imageH = 0; + private boolean selfSetting = false; public void setImage(TLRPC.FileLocation path, String filter, Drawable placeholder) { setImage(path, null, filter, placeholder, 0); @@ -91,7 +92,9 @@ public class ImageReceiver { isPlaceholder = true; FileLoader.getInstance().loadImage(path, httpUrl, this, filter, true, size); } else { + selfSetting = true; setImageBitmap(img, currentPath); + selfSetting = false; } } @@ -102,7 +105,7 @@ public class ImageReceiver { isPlaceholder = false; FileLoader.getInstance().incrementUseCount(currentPath); currentImage = new BitmapDrawable(null, bitmap); - if (parentView.get() != null) { + if (!selfSetting && parentView.get() != null) { if (imageW != 0) { parentView.get().invalidate(imageX, imageY, imageX + imageW, imageY + imageH); } else { @@ -112,31 +115,28 @@ public class ImageReceiver { } public void setImageBitmap(Bitmap bitmap) { + FileLoader.getInstance().cancelLoadingForImageView(this); + recycleBitmap(null); + last_placeholder = new BitmapDrawable(null, bitmap); currentPath = null; last_path = null; last_httpUrl = null; last_filter = null; - last_placeholder = null; + currentImage = null; last_size = 0; - FileLoader.getInstance().cancelLoadingForImageView(this); - if (bitmap != null) { - recycleBitmap(null); - currentImage = new BitmapDrawable(null, bitmap); - } } public void setImageBitmap(Drawable bitmap) { + FileLoader.getInstance().cancelLoadingForImageView(this); + recycleBitmap(null); + last_placeholder = bitmap; + isPlaceholder = true; currentPath = null; + currentImage = null; last_path = null; last_httpUrl = null; last_filter = null; - last_placeholder = null; last_size = 0; - FileLoader.getInstance().cancelLoadingForImageView(this); - if (bitmap != null) { - recycleBitmap(null); - currentImage = bitmap; - } } public void clearImage() {