From 2fcef37b9ed73d1bee19eef8b06d73ddd7903274 Mon Sep 17 00:00:00 2001 From: DrKLO Date: Sat, 24 Jan 2015 00:59:15 +0300 Subject: [PATCH] Bug fixes --- TMessagesProj/build.gradle | 4 ++-- .../main/java/org/telegram/android/SecretChatHelper.java | 2 +- .../src/main/java/org/telegram/ui/Cells/StickerCell.java | 3 +++ .../src/main/java/org/telegram/ui/LaunchActivity.java | 6 +++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index e39f8706a..451bba39d 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -82,7 +82,7 @@ android { defaultConfig { minSdkVersion 8 targetSdkVersion 21 - versionCode 415 - versionName "2.3.2" + versionCode 416 + versionName "2.3.3" } } diff --git a/TMessagesProj/src/main/java/org/telegram/android/SecretChatHelper.java b/TMessagesProj/src/main/java/org/telegram/android/SecretChatHelper.java index 6ad3de90b..d9fd56a10 100644 --- a/TMessagesProj/src/main/java/org/telegram/android/SecretChatHelper.java +++ b/TMessagesProj/src/main/java/org/telegram/android/SecretChatHelper.java @@ -656,7 +656,7 @@ public class SecretChatHelper { TLObject toEncryptObject = null; if (AndroidUtilities.getPeerLayerVersion(chat.layer) >= 17) { TLRPC.TL_decryptedMessageLayer layer = new TLRPC.TL_decryptedMessageLayer(); - layer.layer = Math.min(AndroidUtilities.getMyLayerVersion(chat.layer), AndroidUtilities.getPeerLayerVersion(chat.layer)); + layer.layer = Math.min(17, AndroidUtilities.getPeerLayerVersion(chat.layer)); layer.message = req; layer.random_bytes = new byte[Math.max(1, (int) Math.ceil(Utilities.random.nextDouble() * 16))]; Utilities.random.nextBytes(layer.random_bytes); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/StickerCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/StickerCell.java index c382c68d3..59b9c4ddf 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/StickerCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/StickerCell.java @@ -70,5 +70,8 @@ public class StickerCell extends FrameLayoutFixed { setBackgroundResource(R.drawable.stickers_back_all); setPadding(AndroidUtilities.dp(3), 0, AndroidUtilities.dp(3), 0); } + if (getBackground() != null) { + getBackground().setAlpha(230); + } } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java index 117d388a4..67f84d0a6 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java @@ -1293,6 +1293,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa } if (fragment instanceof ChatActivity) { if (!tabletFullSize && layout == rightActionBarLayout || tabletFullSize && layout == actionBarLayout) { + boolean result = !(tabletFullSize && layout == actionBarLayout && actionBarLayout.fragmentsStack.size() == 1); if (!layersActionBarLayout.fragmentsStack.isEmpty()) { for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) { layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0)); @@ -1300,7 +1301,10 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa } layersActionBarLayout.closeLastFragment(!forceWithoutAnimation); } - return true; + if (!result) { + actionBarLayout.presentFragment(fragment, false, forceWithoutAnimation, false); + } + return result; } else if (!tabletFullSize && layout != rightActionBarLayout) { rightActionBarLayout.setVisibility(View.VISIBLE); backgroundTablet.setVisibility(View.GONE);