diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle
index 7ff9b7af..4a528b63 100644
--- a/TMessagesProj/build.gradle
+++ b/TMessagesProj/build.gradle
@@ -88,8 +88,8 @@ android {
applicationId "org.telegram.plus"
minSdkVersion 8
targetSdkVersion 22
- versionCode 630
- versionName "3.2.2.1"
+ versionCode 632
+ versionName "3.2.2.2"
//multiDexEnabled true
}
}
diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/ApplicationLoader.java b/TMessagesProj/src/main/java/org/telegram/messenger/ApplicationLoader.java
index cfb0879a..35190043 100644
--- a/TMessagesProj/src/main/java/org/telegram/messenger/ApplicationLoader.java
+++ b/TMessagesProj/src/main/java/org/telegram/messenger/ApplicationLoader.java
@@ -21,7 +21,6 @@ import android.content.pm.PackageInfo;
import android.content.res.Configuration;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
-import android.graphics.drawable.GradientDrawable;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Handler;
@@ -92,14 +91,6 @@ public class ApplicationLoader extends Application {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
int selectedBackground = preferences.getInt("selectedBackground", 1000001);
selectedColor = preferences.getInt("selectedColor", 0);
- int cacheColorHint = 0;
- //
- SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
- if (themePrefs.getBoolean("chatSolidBGColorCheck", false)) {
- cachedWallpaper = null;
- selectedColor = themePrefs.getInt("chatSolidBGColor", 0xffffffff);
- }
- //
if (selectedColor == 0) {
if (selectedBackground == 1000001) {
cachedWallpaper = applicationContext.getResources().getDrawable(R.drawable.background_hd);
@@ -123,30 +114,6 @@ public class ApplicationLoader extends Application {
selectedColor = -2693905;
}
cachedWallpaper = new ColorDrawable(selectedColor);
-
- }
-
- SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
- int orientation = themePrefs.getInt("chatGradientBG", 0);
- if(orientation > 0 && themePrefs.getBoolean("chatSolidBGColorCheck", false)) {
- GradientDrawable.Orientation go;
- switch(orientation) {
- case 2:
- go = GradientDrawable.Orientation.LEFT_RIGHT;
- break;
- case 3:
- go = GradientDrawable.Orientation.TL_BR;
- break;
- case 4:
- go = GradientDrawable.Orientation.BL_TR;
- break;
- default:
- go = GradientDrawable.Orientation.TOP_BOTTOM;
- }
- int mainColor = selectedColor = themePrefs.getInt("chatSolidBGColor", 0xffffffff);
- int gradColor = themePrefs.getInt("chatGradientBGColor", 0xffffffff);
- int[] colors = new int[]{mainColor, gradColor};
- cachedWallpaper = new GradientDrawable(go, colors);
}
}
}
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java
index bfa1c5cd..ce09b9ba 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java
@@ -37,12 +37,14 @@ public class DrawerLayoutAdapter extends BaseAdapter {
private Context mContext;
private int versionType = 4;
- private int versionRow = 11;
private int contactsRow = 6;
- private int settingsRow = 9;
- private int themingRow = 8;
- private int communityRow = 10;
private int themesRow = 7;
+ private int themingRow = 8;
+ private int settingsRow = 9;
+ private int channelRow = 10;
+ private int communityRow = 11;
+ private int versionRow = 12;
+
//private int rowCount = 0;
@@ -63,7 +65,7 @@ public class DrawerLayoutAdapter extends BaseAdapter {
@Override
public int getCount() {
//return UserConfig.isClientActivated() ? 10 : 0;
- return UserConfig.isClientActivated() ? 12 : 0;
+ return UserConfig.isClientActivated() ? 13 : 0;
}
@Override
@@ -135,11 +137,13 @@ public class DrawerLayoutAdapter extends BaseAdapter {
}/* else if (i == 7) {
actionCell.setTextAndIcon(LocaleController.getString("InviteFriends", R.string.InviteFriends), R.drawable.menu_invite);
}*/ else if (i == themesRow) {
- actionCell.setTextAndIcon(LocaleController.getString("Themes", R.string.Themes), R.drawable.menu_themes);
+ actionCell.setTextAndIcon(LocaleController.getString("DownloadThemes", R.string.DownloadThemes), R.drawable.menu_themes);
} else if (i == themingRow) {
actionCell.setTextAndIcon(LocaleController.getString("Theming", R.string.Theming), R.drawable.menu_theming);
} else if (i == settingsRow) {
actionCell.setTextAndIcon(LocaleController.getString("Settings", R.string.Settings), R.drawable.menu_settings);
+ } else if (i == channelRow) {
+ actionCell.setTextAndIcon(LocaleController.getString("OfficialChannel", R.string.OfficialChannel), R.drawable.menu_broadcast);
} else if (i == communityRow) {
actionCell.setTextAndIcon(LocaleController.getString("Community", R.string.Community), R.drawable.menu_forum);
} /*else if (i == 10) {
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/BaseCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/BaseCell.java
index 92505cdb..5ee2f776 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/BaseCell.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/BaseCell.java
@@ -52,7 +52,9 @@ public class BaseCell extends View {
}
protected void setDrawableBounds(Drawable drawable, int x, int y) {
- setDrawableBounds(drawable, x, y, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
+ if (drawable != null) {
+ setDrawableBounds(drawable, x, y, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
+ }
}
protected void setDrawableBounds(Drawable drawable, int x, int y, int w, int h) {
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java
index 2583d88b..668ba91b 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java
@@ -230,21 +230,8 @@ public class ChatBaseCell extends BaseCell implements MediaController.FileDownlo
linkColor = themePrefs.getInt("chatRLinkColor", defColor);
}
replyTextPaint.linkColor = linkColor;
- //ResourceLoader.loadRecources(getContext());
- /*if(ResourceLoader.mediaBackgroundDrawable == null){
- ResourceLoader.mediaBackgroundDrawable = getResources().getDrawable(R.drawable.phototime);
- ResourceLoader.checkDrawable = getResources().getDrawable(R.drawable.msg_check);
- ResourceLoader.halfCheckDrawable = getResources().getDrawable(R.drawable.msg_halfcheck);
- ResourceLoader.clockDrawable = getResources().getDrawable(R.drawable.msg_clock);
- ResourceLoader.checkMediaDrawable = getResources().getDrawable(R.drawable.msg_check_w);
- ResourceLoader.halfCheckMediaDrawable = getResources().getDrawable(R.drawable.msg_halfcheck_w);
- ResourceLoader.clockMediaDrawable = getResources().getDrawable(R.drawable.msg_clock_photo);
- //ResourceLoader.videoIconDrawable = getResources().getDrawable(R.drawable.ic_video);
- ResourceLoader.docMenuInDrawable = getResources().getDrawable(R.drawable.doc_actions_b);
- ResourceLoader.docMenuOutDrawable = getResources().getDrawable(R.drawable.doc_actions_g);
- }*/
- ResourceLoader.mediaBackgroundDrawable.setColorFilter(bColor, PorterDuff.Mode.SRC_IN);
+ if(ResourceLoader.mediaBackgroundDrawable != null)ResourceLoader.mediaBackgroundDrawable.setColorFilter(bColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundDrawableOut.setColorFilter(rBubbleColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundMediaDrawableOut.setColorFilter(rBubbleColor, PorterDuff.Mode.SRC_IN);
@@ -889,6 +876,8 @@ public class ChatBaseCell extends BaseCell implements MediaController.FileDownlo
onAfterBackgroundDraw(canvas);
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
+ boolean mCheck = AndroidUtilities.getBoolPref("chatMemberColorCheck");
+ int mColor = themePrefs.getInt("chatMemberColor", AndroidUtilities.getIntDarkerColor("themeColor", 0x15));
if (drawName && nameLayout != null) {
canvas.save();
if (media) {
@@ -897,15 +886,23 @@ public class ChatBaseCell extends BaseCell implements MediaController.FileDownlo
canvas.translate(currentBackgroundDrawable.getBounds().left + AndroidUtilities.dp(19) - nameOffsetX, AndroidUtilities.dp(10));
}
if (currentUser != null) {
- if(AndroidUtilities.getBoolPref("chatMemberColorCheck")){
- namePaint.setColor(themePrefs.getInt("chatMemberColor", AndroidUtilities.getIntDarkerColor("themeColor", 0x15)));
+ if(mCheck){
+ namePaint.setColor(mColor);
}else {
namePaint.setColor(AvatarDrawable.getNameColorForId(currentUser.id));
}
} else if (currentChat != null) {
- namePaint.setColor(AvatarDrawable.getNameColorForId(currentChat.id));
+ if(mCheck){
+ namePaint.setColor(mColor);
+ }else {
+ namePaint.setColor(AvatarDrawable.getNameColorForId(currentChat.id));
+ }
} else {
- namePaint.setColor(AvatarDrawable.getNameColorForId(0));
+ if(mCheck){
+ namePaint.setColor(mColor);
+ }else {
+ namePaint.setColor(AvatarDrawable.getNameColorForId(0));
+ }
}
nameLayout.draw(canvas);
canvas.restore();
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMediaCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMediaCell.java
index e89199e4..4d8ecbb8 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMediaCell.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMediaCell.java
@@ -475,6 +475,31 @@ public class ChatMediaCell extends ChatBaseCell {
return false;
}
+ private String getCurrentNameString(MessageObject messageObject){
+ TLRPC.User currentUser = null;
+ TLRPC.Chat currentChat = null;
+ String s;
+ if (messageObject.messageOwner.from_id > 0) {
+ currentUser = MessagesController.getInstance().getUser(messageObject.messageOwner.from_id);
+ } else if (messageObject.messageOwner.from_id < 0) {
+ currentChat = MessagesController.getInstance().getChat(-messageObject.messageOwner.from_id);
+ }
+
+ if (currentUser != null) {
+ s = UserObject.getUserName(currentUser);
+ String currentUsernameString = currentUser.username;
+ /*if(currentUsernameString != null && AndroidUtilities.getBoolPref("chatShowUsernameCheck")){
+ currentNameString = currentNameString.replaceAll("\\p{C}", " ");
+ currentNameString = currentNameString.trim().replaceAll(" +", " ") + " [@"+currentUsernameString+"]";
+ }*/
+ } else if (currentChat != null) {
+ s = currentChat.title;
+ } else {
+ s = "DELETED";
+ }
+ return s;
+ }
+
@Override
public void setMessageObject(MessageObject messageObject) {
boolean dataChanged = currentMessageObject == messageObject && (isUserDataChanged() || photoNotSet);
@@ -493,6 +518,7 @@ public class ChatMediaCell extends ChatBaseCell {
drawBackground = true;
photoImage.setForcePreview(messageObject.isSecretPhoto());
+
if (messageObject.type == 9) {
String name = messageObject.getDocumentName();
if (name == null || name.length() == 0) {
@@ -537,20 +563,9 @@ public class ChatMediaCell extends ChatBaseCell {
infoLayout2 = null;
if(isChat){
- TLRPC.User fromUser = MessagesController.getInstance().getUser(messageObject.messageOwner.from_id);
- String senderName = UserObject.getUserName(fromUser);
- /*//String senderName = String.format("%s %s", fromUser.first_name, fromUser.last_name);
- String senderName = "";
- if (UserObject.isDeleted(fromUser)) {
- senderName = "Deleted";
- } else {
- if (fromUser.first_name != null && fromUser.first_name.length() > 0) {
- senderName = fromUser.first_name;
- } else {
- senderName = fromUser.last_name;
- }
- }*/
+ String senderName = getCurrentNameString(messageObject);
+
infoWidth2 = Math.min(maxWidth, (int) Math.ceil(senderPaint.measureText(senderName)));
CharSequence str2 = TextUtils.ellipsize(senderName, senderPaint, infoWidth2, TextUtils.TruncateAt.END);
infoLayout2 = new StaticLayout(str2, senderPaint, infoWidth2, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
@@ -587,10 +602,8 @@ public class ChatMediaCell extends ChatBaseCell {
if(isChat){
infoOffset2 = ResourceLoader.videoIconDrawable.getIntrinsicWidth() + AndroidUtilities.dp(5);
infoOffset = 0;
- TLRPC.User fromUser = MessagesController.getInstance().getUser(messageObject.messageOwner.from_id);
- //String senderName = String.format("%s %s", fromUser.first_name, fromUser.last_name);
- String senderName = UserObject.getUserName(fromUser);
+ String senderName = getCurrentNameString(messageObject);
infoWidth2 = (int) Math.ceil(infoPaint.measureText(currentInfoString));
//infoWidth = (int) Math.ceil(senderPaint.measureText(senderName));
@@ -605,27 +618,11 @@ public class ChatMediaCell extends ChatBaseCell {
currentNameString = null;
}//Plus: member name in photos
else if (messageObject.type == 1) { //PHOTO
- TLRPC.User fromUser = MessagesController.getInstance().getUser(messageObject.messageOwner.from_id);
- String senderName = UserObject.getUserName(fromUser);
- /*
- String currentUsernameString = fromUser.username;
+ currentNameString = getCurrentNameString(messageObject);
+
+ String senderName = currentNameString;
- if(currentUsernameString != null && AndroidUtilities.getBoolPref("chatShowUsernameCheck")){
- senderName = senderName.replaceAll("\\p{C}", " ");
- senderName = senderName.trim().replaceAll(" +", " ") + " [@"+currentUsernameString+"]";
- }*/
- /*
- String senderName = String.format("%s %s", fromUser.first_name, fromUser.last_name);
- if (UserObject.isDeleted(fromUser)) {
- senderName = "Deleted";
- } else {
- if (fromUser.first_name != null && fromUser.first_name.length() > 0) {
- senderName = fromUser.first_name;
- } else if (fromUser.last_name != null && fromUser.last_name.length() > 0){
- senderName = fromUser.last_name;
- }
- }*/
if (currentInfoString == null || !currentInfoString.equals(senderName)) {
currentInfoString = senderName;
infoOffset = 0;
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ProfileSearchCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ProfileSearchCell.java
index b1834108..c147fdf9 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ProfileSearchCell.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ProfileSearchCell.java
@@ -12,6 +12,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Canvas;
import android.graphics.Paint;
+import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.Layout;
@@ -22,17 +23,16 @@ import android.view.MotionEvent;
import org.telegram.PhoneFormat.PhoneFormat;
import org.telegram.messenger.AndroidUtilities;
-import org.telegram.messenger.ContactsController;
+import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.ImageReceiver;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController;
-import org.telegram.messenger.UserObject;
-import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.R;
+import org.telegram.messenger.UserConfig;
+import org.telegram.messenger.UserObject;
import org.telegram.tgnet.ConnectionsManager;
import org.telegram.tgnet.TLObject;
import org.telegram.tgnet.TLRPC;
-import org.telegram.messenger.UserConfig;
import org.telegram.ui.Components.AvatarDrawable;
public class ProfileSearchCell extends BaseCell {
@@ -120,6 +120,8 @@ public class ProfileSearchCell extends BaseCell {
lockDrawable = getResources().getDrawable(R.drawable.list_secret);
groupDrawable = getResources().getDrawable(R.drawable.list_group);
countDrawable = getResources().getDrawable(R.drawable.dialogs_badge);
+
+ updateTheme();
}
avatarImage = new ImageReceiver(this);
@@ -127,6 +129,16 @@ public class ProfileSearchCell extends BaseCell {
avatarDrawable = new AvatarDrawable();
}
+ private void updateTheme(){
+ SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
+ int tColor = themePrefs.getInt("themeColor", AndroidUtilities.defColor);
+
+ countPaint.setTextSize(AndroidUtilities.dp(themePrefs.getInt("chatsCountSize", 13)));
+ countPaint.setColor(themePrefs.getInt("chatsCountColor", 0xffffffff));
+ countDrawable.setColorFilter(themePrefs.getInt("chatsCountBGColor", tColor), PorterDuff.Mode.SRC_IN);
+
+ }
+
@Override
public boolean onTouchEvent(MotionEvent event) {
if (Build.VERSION.SDK_INT >= 21 && getBackground() != null) {
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
index 77c47aa2..43fcf68d 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
@@ -21,6 +21,7 @@ import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.PorterDuff;
import android.graphics.Rect;
+import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.media.ExifInterface;
@@ -332,6 +333,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
private boolean refreshWallpaper;
+ private boolean quote;
+
RecyclerListView.OnItemLongClickListener onItemLongClickListener = new RecyclerListView.OnItemLongClickListener() {
@Override
public void onItemClick(View view, int position) {
@@ -360,6 +363,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
public boolean onFragmentCreate() {
final int chatId = arguments.getInt("chat_id", 0);
chat_id = chatId; //Plus
+ quote = arguments.getBoolean("quote", false);
final int userId = arguments.getInt("user_id", 0);
final int encId = arguments.getInt("enc_id", 0);
startLoadFromMessageId = arguments.getInt("message_id", 0);
@@ -754,6 +758,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
QuoteForward = false;
}
Bundle args = new Bundle();
+ //args.putBoolean("quote", QuoteForward);
args.putBoolean("onlySelect", true);
args.putInt("dialogsType", 1);
DialogsActivity fragment = new DialogsActivity(args);
@@ -1310,8 +1315,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
};
SizeNotifierFrameLayout contentView = (SizeNotifierFrameLayout) fragmentView;
- contentView.setBackgroundImage(ApplicationLoader.getCachedWallpaper());
-
+ //contentView.setBackgroundImage(ApplicationLoader.getCachedWallpaper());
+ updateBackground(contentView);
+ //.e("mainColor 0", "" + ApplicationLoader.getCachedWallpaper());
emptyViewContainer = new FrameLayout(context);
emptyViewContainer.setVisibility(View.INVISIBLE);
contentView.addView(emptyViewContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER));
@@ -2175,6 +2181,38 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
return fragmentView;
}
+ private void updateBackground(SizeNotifierFrameLayout contentView){
+ SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
+ if(!themePrefs.getBoolean("chatSolidBGColorCheck", false)){
+ contentView.setBackgroundImage(ApplicationLoader.getCachedWallpaper());
+ }else{
+ int mainColor = themePrefs.getInt("chatSolidBGColor", 0xffffffff);
+ int orientation = themePrefs.getInt("chatGradientBG", 0);
+ if(orientation == 0) {
+ contentView.setBackgroundDrawable(new ColorDrawable(mainColor));
+ } else {
+ GradientDrawable.Orientation go;
+ switch(orientation) {
+ case 2:
+ go = GradientDrawable.Orientation.LEFT_RIGHT;
+ break;
+ case 3:
+ go = GradientDrawable.Orientation.TL_BR;
+ break;
+ case 4:
+ go = GradientDrawable.Orientation.BL_TR;
+ break;
+ default:
+ go = GradientDrawable.Orientation.TOP_BOTTOM;
+ }
+
+ int gradColor = themePrefs.getInt("chatGradientBGColor", 0xffffffff);
+ int[] colors = new int[]{mainColor, gradColor};
+ contentView.setBackgroundDrawable(new GradientDrawable(go, colors));
+ }
+ }
+ }
+
private void openAddMember() {
Bundle args = new Bundle();
args.putBoolean("onlyUsers", true);
@@ -2498,9 +2536,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
if (arrayList == null || arrayList.isEmpty()) {
return;
}
- if (!fromMyName) {
- SendMessagesHelper.getInstance().sendMessage(arrayList, dialog_id, chatActivityEnterView == null || chatActivityEnterView.asAdmin());
- } else {
+ if(quote)fromMyName = false;
+ if (!fromMyName) {
+ SendMessagesHelper.getInstance().sendMessage(arrayList, dialog_id, chatActivityEnterView == null || chatActivityEnterView.asAdmin());
+ } else {
for (MessageObject object : arrayList) {
SendMessagesHelper.getInstance().processForwardFromMyName(object, dialog_id, chatActivityEnterView == null || chatActivityEnterView.asAdmin());
}
@@ -5303,11 +5342,13 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
reportSpamButton.setTextColor(nameColor);
addToContactsButton.setTextColor(nameColor);
+
if(refreshWallpaper) {
SizeNotifierFrameLayout contentView = (SizeNotifierFrameLayout) fragmentView;
contentView.setBackgroundImage(ApplicationLoader.getCachedWallpaper());
refreshWallpaper = false;
}
+
} catch (Exception e) {
FileLog.e("tmessages", e);
}
@@ -5617,8 +5658,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
items.add(LocaleController.getString("Forward", R.string.Forward));
options.add(22);
//items.add(LocaleController.getString("Forward", R.string.Forward));
- items.add(LocaleController.getString("ForwardNoQuote", R.string.ForwardNoQuote));
- options.add(2);
+ if(selectedObject.messageOwner.media != null && selectedObject.messageOwner.media.caption != null && selectedObject.messageOwner.media.caption.length() > 0){
+ //with caption quote doesn't appear
+ }else {
+ items.add(LocaleController.getString("ForwardNoQuote", R.string.ForwardNoQuote));
+ options.add(2);
+ }
if (message.canDeleteMessage(currentChat)) {
items.add(LocaleController.getString("Delete", R.string.Delete));
options.add(1);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiView.java
index 8eefb04c..d4a1717c 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiView.java
@@ -35,13 +35,13 @@ import android.widget.TextView;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.AnimationCompat.ViewProxy;
+import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.Emoji;
+import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.NotificationCenter;
-import org.telegram.messenger.query.StickersQuery;
-import org.telegram.messenger.ApplicationLoader;
-import org.telegram.messenger.FileLog;
import org.telegram.messenger.R;
+import org.telegram.messenger.query.StickersQuery;
import org.telegram.tgnet.TLRPC;
import org.telegram.ui.Cells.EmptyCell;
import org.telegram.ui.Cells.StickerEmojiCell;
@@ -426,27 +426,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
//setBackgroundColor(0xfff5f6f7);
setBackgroundColor(bgColor);
- int val = themePrefs.getInt("chatEmojiViewBGGradient", 0);
- if(val > 0) {
- GradientDrawable.Orientation go;
- switch(val) {
- case 2:
- go = GradientDrawable.Orientation.LEFT_RIGHT;
- break;
- case 3:
- go = GradientDrawable.Orientation.TL_BR;
- break;
- case 4:
- go = GradientDrawable.Orientation.BL_TR;
- break;
- default:
- go = GradientDrawable.Orientation.TOP_BOTTOM;
- }
- int gradColor = themePrefs.getInt("chatEmojiViewBGGradientColor", 0xfff5f6f7);
- int[] colors = new int[]{bgColor, gradColor};
- GradientDrawable gd = new GradientDrawable(go, colors);
- setBackgroundDrawable(gd);
- }
+
pager = new ViewPager(context) {
@Override
@@ -471,6 +451,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
pagerSlidingTabStripContainer.setOrientation(LinearLayout.HORIZONTAL);
//pagerSlidingTabStripContainer.setBackgroundColor(0xfff5f6f7);
pagerSlidingTabStripContainer.setBackgroundColor(bgColor);
+
addView(pagerSlidingTabStripContainer, LayoutHelper.createFrame(LayoutParams.MATCH_PARENT, 48));
PagerSlidingTabStrip pagerSlidingTabStrip = new PagerSlidingTabStrip(context);
@@ -535,6 +516,31 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
View view = new View(context);
//view.setBackgroundColor(0xffe2e5e7);
view.setBackgroundColor(lineColor);
+ int val = themePrefs.getInt("chatEmojiViewBGGradient", 0);
+ if(val > 0) {
+ GradientDrawable.Orientation go;
+ switch(val) {
+ case 2:
+ go = GradientDrawable.Orientation.LEFT_RIGHT;
+ break;
+ case 3:
+ go = GradientDrawable.Orientation.TL_BR;
+ break;
+ case 4:
+ go = GradientDrawable.Orientation.BL_TR;
+ break;
+ default:
+ go = GradientDrawable.Orientation.TOP_BOTTOM;
+ }
+ int gradColor = themePrefs.getInt("chatEmojiViewBGGradientColor", 0xfff5f6f7);
+ int[] colors = new int[]{bgColor, gradColor};
+ GradientDrawable gd = new GradientDrawable(go, colors);
+ setBackgroundDrawable(gd);
+ pagerSlidingTabStripContainer.setBackgroundColor(0x00000000);
+ scrollSlidingTabStrip.setUnderlineColor(0x00000000);
+ pagerSlidingTabStrip.setUnderlineColor(0x00000000);
+ view.setBackgroundColor(0x00000000);
+ }
frameLayout.addView(view, LayoutHelper.createFrame(52, 1, Gravity.LEFT | Gravity.BOTTOM));
recentsWrap = new FrameLayout(context);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
index e04ef6e2..502663db 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
@@ -112,13 +112,15 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
private Runnable lockRunnable;
- private int versionRow = 11;
+
private int contactsRow = 6;
- private int settingsRow = 9;
- private int themingRow = 8;
- private int communityRow = 10;
- private int faqRow = 12;
private int themesRow = 7;
+ private int themingRow = 8;
+ private int settingsRow = 9;
+ private int channelRow = 10;
+ private int communityRow = 11;
+ private int versionRow = 12;
+ private int faqRow = 13;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -333,6 +335,18 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
FileLog.e("tmessages", e);
}
drawerLayoutContainer.closeDrawer(false);
+ } else if (position == channelRow) {
+ try {
+ String link = "https://telegram.me/plusmsn";//https://plus.google.com/101839105638971401281/posts"
+ String lg = Locale.getDefault().getLanguage();
+ if(lg.contains("es") || lg.contains("gl") || lg.contains("ca")){
+ link = "https://telegram.me/plusmsnes";
+ }
+ startActivityForResult(new Intent(Intent.ACTION_VIEW, Uri.parse(link)), 504);
+ } catch (Exception e) {
+ FileLog.e("tmessages", e);
+ }
+ drawerLayoutContainer.closeDrawer(false);
} else if (position == communityRow) {
try {
String link = "https://plus.google.com/u/0/communities/106927015963860485525";//https://plus.google.com/101839105638971401281/posts"
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/MediaActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/MediaActivity.java
index d821ece6..ec374ade 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/MediaActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/MediaActivity.java
@@ -191,6 +191,7 @@ public class MediaActivity extends BaseFragment implements NotificationCenter.No
private final static int shared_media_item = 1;
private final static int files_item = 2;
private final static int links_item = 5;
+ private final static int quoteforward = 33;
private final static int forward = 3;
private final static int delete = 4;
@@ -305,10 +306,11 @@ public class MediaActivity extends BaseFragment implements NotificationCenter.No
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
- } else if (id == forward) {
+ } else if (id == forward || id == quoteforward) {
Bundle args = new Bundle();
args.putBoolean("onlySelect", true);
args.putInt("dialogsType", 1);
+ final boolean quoteForward = id == forward ? false : true;
DialogsActivity fragment = new DialogsActivity(args);
fragment.setDelegate(new DialogsActivity.MessagesActivityDelegate() {
@Override
@@ -317,6 +319,9 @@ public class MediaActivity extends BaseFragment implements NotificationCenter.No
if (lower_part != 0) {
Bundle args = new Bundle();
args.putBoolean("scrollToTopOnResume", true);
+ //Plus
+ args.putBoolean("quote", quoteForward);
+ //
if (lower_part > 0) {
args.putInt("user_id", lower_part);
} else if (lower_part < 0) {
@@ -450,6 +455,7 @@ public class MediaActivity extends BaseFragment implements NotificationCenter.No
actionMode.addView(selectedMessagesCountTextView, LayoutHelper.createLinear(0, LayoutHelper.MATCH_PARENT, 1.0f));
if ((int) dialog_id != 0) {
+ actionModeViews.add(actionMode.addItem(quoteforward, R.drawable.ic_ab_fwd_quoteforward, R.drawable.bar_selector_mode, null, AndroidUtilities.dp(54)));
actionModeViews.add(actionMode.addItem(forward, R.drawable.ic_ab_fwd_forward, R.drawable.bar_selector_mode, null, AndroidUtilities.dp(54)));
}
actionModeViews.add(actionMode.addItem(delete, R.drawable.ic_ab_fwd_delete, R.drawable.bar_selector_mode, null, AndroidUtilities.dp(54)));
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/SettingsActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/SettingsActivity.java
index 46d68cd9..f07680e5 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/SettingsActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/SettingsActivity.java
@@ -153,6 +153,10 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
private int keepOriginalFilenameDetailRow;
private int emojiPopupSize;
private int disableAudioStopRow;
+ private int dialogsSectionRow;
+ private int dialogsSectionRow2;
+ private int dialogsPicClickRow;
+ private int dialogsGroupPicClickRow;
private final static int edit_name = 1;
private final static int logout = 2;
@@ -267,6 +271,11 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
disableAudioStopRow = rowCount++;
disableMessageClickRow = rowCount++;
+ dialogsSectionRow = rowCount++;
+ dialogsSectionRow2 = rowCount++;
+ dialogsPicClickRow = rowCount++;
+ dialogsGroupPicClickRow = rowCount++;
+
supportSectionRow = rowCount++;
supportSectionRow2 = rowCount++;
askQuestionRow = rowCount++;
@@ -724,6 +733,54 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(!keep);
}
+ } else if (i == dialogsPicClickRow) {
+ if (getParentActivity() == null) {
+ return;
+ }
+ AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
+ builder.setTitle(LocaleController.getString("ClickOnContactPic", R.string.ClickOnContactPic));
+ builder.setItems(new CharSequence[]{
+ LocaleController.getString("RowGradientDisabled", R.string.RowGradientDisabled),
+ LocaleController.getString("ShowPics", R.string.ShowPics),
+ LocaleController.getString("ShowProfile", R.string.ShowProfile)
+ }, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
+ SharedPreferences.Editor editor = preferences.edit();
+ editor.putInt("dialogsClickOnPic", which);
+ editor.commit();
+ if (listView != null) {
+ listView.invalidateViews();
+ }
+ }
+ });
+ builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
+ showDialog(builder.create());
+ } else if (i == dialogsGroupPicClickRow) {
+ if (getParentActivity() == null) {
+ return;
+ }
+ AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
+ builder.setTitle(LocaleController.getString("ClickOnGroupPic", R.string.ClickOnGroupPic));
+ builder.setItems(new CharSequence[]{
+ LocaleController.getString("RowGradientDisabled", R.string.RowGradientDisabled),
+ LocaleController.getString("ShowPics", R.string.ShowPics),
+ LocaleController.getString("ShowProfile", R.string.ShowProfile)
+ }, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
+ SharedPreferences.Editor editor = preferences.edit();
+ editor.putInt("dialogsClickOnGroupPic", which);
+ editor.commit();
+ if (listView != null) {
+ listView.invalidateViews();
+ }
+ }
+ });
+ builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
+ showDialog(builder.create());
}
}
});
@@ -1241,7 +1298,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
i == askQuestionRow || i == sendLogsRow || i == sendByEnterRow || i == privacyRow || i == wifiDownloadRow || i == disableAudioStopRow || i == disableMessageClickRow ||
i == mobileDownloadRow || i == clearLogsRow || i == roamingDownloadRow || i == languageRow || i == usernameRow ||
i == switchBackendButtonRow || i == telegramFaqRow || i == contactsSortRow || i == contactsReimportRow || i == saveToGalleryRow || i == keepOriginalFilenameRow ||
- i == stickersRow;
+ i == stickersRow || i == dialogsPicClickRow || i == dialogsGroupPicClickRow;
}
@Override
@@ -1329,6 +1386,30 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
textCell.setText(LocaleController.getString("ImportContacts", R.string.ImportContacts), true);
} else if (i == stickersRow) {
textCell.setText(LocaleController.getString("Stickers", R.string.Stickers), true);
+ } else if (i == dialogsPicClickRow) {
+ String value;
+ SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
+ int sort = preferences.getInt("dialogsClickOnPic", 0);
+ if (sort == 0) {
+ value = LocaleController.getString("RowGradientDisabled", R.string.RowGradientDisabled);
+ } else if (sort == 1) {
+ value = LocaleController.getString("ShowPics", R.string.ShowPics);
+ } else {
+ value = LocaleController.getString("ShowProfile", R.string.ShowProfile);
+ }
+ textCell.setTextAndValue(LocaleController.getString("ClickOnContactPic", R.string.ClickOnContactPic), value, false);
+ } else if (i == dialogsGroupPicClickRow) {
+ String value;
+ SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
+ int sort = preferences.getInt("dialogsClickOnGroupPic", 0);
+ if (sort == 0) {
+ value = LocaleController.getString("RowGradientDisabled", R.string.RowGradientDisabled);
+ } else if (sort == 1) {
+ value = LocaleController.getString("ShowPics", R.string.ShowPics);
+ } else {
+ value = LocaleController.getString("ShowProfile", R.string.ShowProfile);
+ }
+ textCell.setTextAndValue(LocaleController.getString("ClickOnGroupPic", R.string.ClickOnGroupPic), value, true);
}
} else if (type == 3) {
if (view == null) {
@@ -1368,6 +1449,8 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
((HeaderCell) view).setText(LocaleController.getString("AutomaticMediaDownload", R.string.AutomaticMediaDownload));
} else if (i == numberSectionRow) {
((HeaderCell) view).setText(LocaleController.getString("Info", R.string.Info));
+ }else if (i == dialogsSectionRow2) {
+ ((HeaderCell) view).setText(LocaleController.getString("DialogsSettings", R.string.DialogsSettings));
}
} else if (type == 5) {
if (view == null) {
@@ -1461,11 +1544,11 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
if (i == emptyRow || i == overscrollRow) {
return 0;
}
- if (i == settingsSectionRow || i == supportSectionRow /*|| i == messagesSectionRow*/ || i == mediaDownloadSection || i == contactsSectionRow) {
+ if (i == settingsSectionRow || i == supportSectionRow /*|| i == messagesSectionRow*/ || i == mediaDownloadSection || i == contactsSectionRow || i == dialogsSectionRow) {
return 1;
} else if (i == enableAnimationsRow || i == sendByEnterRow || i == saveToGalleryRow || i == disableAudioStopRow || i == disableMessageClickRow || i == showAndroidEmojiRow || i == useDeviceFontRow || i == keepOriginalFilenameRow ) {
return 3;
- } else if (i == notificationRow || i == backgroundRow || i == askQuestionRow || i == sendLogsRow || i == privacyRow || i == clearLogsRow || i == switchBackendButtonRow || i == telegramFaqRow || i == contactsReimportRow || i == textSizeRow || i == emojiPopupSize || i == languageRow || i == contactsSortRow || i == stickersRow) {
+ } else if (i == notificationRow || i == backgroundRow || i == askQuestionRow || i == sendLogsRow || i == privacyRow || i == clearLogsRow || i == switchBackendButtonRow || i == telegramFaqRow || i == contactsReimportRow || i == textSizeRow || i == emojiPopupSize || i == languageRow || i == contactsSortRow || i == stickersRow || i == dialogsPicClickRow || i == dialogsGroupPicClickRow) {
return 2;
} else if (i == versionRow) {
return 5;
@@ -1473,7 +1556,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
return 6;
} else if (i == keepOriginalFilenameDetailRow) {
return 7;
- } else if (i == settingsSectionRow2 || i == messagesSectionRow2 || i == supportSectionRow2 || i == numberSectionRow || i == mediaDownloadSection2) {
+ } else if (i == settingsSectionRow2 || i == messagesSectionRow2 || i == supportSectionRow2 || i == numberSectionRow || i == mediaDownloadSection2 || i == dialogsSectionRow2) {
return 4;
} else {
return 2;
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ThemingChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ThemingChatActivity.java
index ff4c7bb8..e0dbeb15 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ThemingChatActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ThemingChatActivity.java
@@ -26,9 +26,9 @@ import android.widget.FrameLayout;
import android.widget.ListView;
import org.telegram.messenger.AndroidUtilities;
+import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController;
-import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.R;
import org.telegram.ui.ActionBar.ActionBar;
import org.telegram.ui.ActionBar.BaseFragment;
@@ -147,8 +147,8 @@ public class ThemingChatActivity extends BaseFragment {
solidBGColorCheckRow = rowCount++;
solidBGColorRow = rowCount++;
- //gradientBGRow = rowCount++;
- //gradientBGColorRow = rowCount++;
+ gradientBGRow = rowCount++;
+ gradientBGColorRow = rowCount++;
showContactAvatar = rowCount++;
avatarAlignTopRow = rowCount++;
@@ -399,6 +399,9 @@ public class ThemingChatActivity extends BaseFragment {
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(!b);
}
+ if (listView != null) {
+ listView.invalidateViews();
+ }
} else if (i == memberColorCheckRow) {
boolean b = themePrefs.getBoolean( key, true);
@@ -474,6 +477,12 @@ public class ThemingChatActivity extends BaseFragment {
public void colorChanged(int color) {
commitInt("chatSolidBGColor", color);
ApplicationLoader.reloadWallpaper();
+ /*AndroidUtilities.runOnUIThread(new Runnable() {
+ @Override
+ public void run() {
+ NotificationCenter.getInstance().postNotificationName(NotificationCenter.wallpaperChanged);
+ }
+ });*/
}
},themePrefs.getInt("chatSolidBGColor", 0xffffffff), CENTER, 0, true);
@@ -488,7 +497,13 @@ public class ThemingChatActivity extends BaseFragment {
@Override
public void colorChanged(int color) {
commitInt("chatGradientBGColor", color);
- ApplicationLoader.reloadWallpaper();
+ /*ApplicationLoader.reloadWallpaper();
+ AndroidUtilities.runOnUIThread(new Runnable() {
+ @Override
+ public void run() {
+ NotificationCenter.getInstance().postNotificationName(NotificationCenter.wallpaperChanged);
+ }
+ });*/
}
},themePrefs.getInt( "chatGradientBGColor", 0xffffffff), CENTER, 0, false);
colorDialog.show();
@@ -508,7 +523,13 @@ public class ThemingChatActivity extends BaseFragment {
public void onClick(DialogInterface dialog, int which) {
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
themePrefs.edit().putInt("chatGradientBG", which).commit();
- ApplicationLoader.reloadWallpaper();
+ /*ApplicationLoader.reloadWallpaper();
+ AndroidUtilities.runOnUIThread(new Runnable() {
+ @Override
+ public void run() {
+ NotificationCenter.getInstance().postNotificationName(NotificationCenter.wallpaperChanged);
+ }
+ });*/
if (listView != null) {
listView.invalidateViews();
}
@@ -1528,7 +1549,7 @@ public class ThemingChatActivity extends BaseFragment {
textCell.setTag("chatHeaderIconsColor");
textCell.setTextAndColor(LocaleController.getString("HeaderIconsColor", R.string.HeaderIconsColor), themePrefs.getInt(textCell.getTag().toString(), 0xffffffff), true);
} else if (i == solidBGColorRow) {
- textCell.setTextAndColor(LocaleController.getString("SolidBGColor", R.string.SolidBGColor), themePrefs.getBoolean("chatSolidBGColorCheck", false) ? themePrefs.getInt("chatSolidBGColor", 0xffffffff) : 0x00000000, true);
+ textCell.setTextAndColor(LocaleController.getString("SolidBGColor", R.string.SolidBGColor), themePrefs.getBoolean("chatSolidBGColorCheck", false) ? themePrefs.getInt("chatSolidBGColor", 0xffffffff) : 0x00000000, false);
} else if (i == gradientBGColorRow) {
textCell.setTextAndColor(LocaleController.getString("RowGradientColor", R.string.RowGradientColor), themePrefs.getInt("chatGradientBG", 0) == 0 || !themePrefs.getBoolean("chatSolidBGColorCheck", false) ? 0x00000000 : themePrefs.getInt("chatGradientBGColor", 0xffffffff), true);
} else if (i == memberColorRow) {
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ThemingContactsActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ThemingContactsActivity.java
index f7cfefe0..93684dc0 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ThemingContactsActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ThemingContactsActivity.java
@@ -633,7 +633,7 @@ public class ThemingContactsActivity extends BaseFragment {
if (i == headerColorRow) {
textCell.setTextAndColor(LocaleController.getString("HeaderColor", R.string.HeaderColor), themePrefs.getInt("contactsHeaderColor", AndroidUtilities.getIntColor("themeColor")), false);
} else if (i == headerGradientColorRow) {
- textCell.setTextAndColor(LocaleController.getString("HeaderColor", R.string.HeaderColor), themePrefs.getInt("contactsHeaderGradient", 0) == 0 ? 0x00000000 : themePrefs.getInt("contactsHeaderGradientColor", AndroidUtilities.getIntColor("themeColor")), true);
+ textCell.setTextAndColor(LocaleController.getString("RowGradientColor", R.string.RowGradientColor), themePrefs.getInt("contactsHeaderGradient", 0) == 0 ? 0x00000000 : themePrefs.getInt("contactsHeaderGradientColor", AndroidUtilities.getIntColor("themeColor")), true);
} else if (i == headerTitleColorRow) {
textCell.setTextAndColor(LocaleController.getString("HeaderTitleColor", R.string.HeaderTitleColor), themePrefs.getInt("contactsHeaderTitleColor", 0xffffffff), true);
} else if (i == headerIconsColorRow) {
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/WallpapersActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/WallpapersActivity.java
index bc20eff8..fcfab8d4 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/WallpapersActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/WallpapersActivity.java
@@ -22,7 +22,6 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
-import android.util.Log;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
@@ -244,7 +243,6 @@ public class WallpapersActivity extends BaseFragment implements NotificationCent
processSelectedBackground();
}
//Plus
- Log.e("click", position+"");
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
diff --git a/TMessagesProj/src/main/res/drawable-hdpi/Thumbs.db b/TMessagesProj/src/main/res/drawable-hdpi/Thumbs.db
index 47b53472..44ad831b 100644
Binary files a/TMessagesProj/src/main/res/drawable-hdpi/Thumbs.db and b/TMessagesProj/src/main/res/drawable-hdpi/Thumbs.db differ
diff --git a/TMessagesProj/src/main/res/drawable-mdpi/Thumbs.db b/TMessagesProj/src/main/res/drawable-mdpi/Thumbs.db
index 9c1bba3f..48830ca3 100644
Binary files a/TMessagesProj/src/main/res/drawable-mdpi/Thumbs.db and b/TMessagesProj/src/main/res/drawable-mdpi/Thumbs.db differ
diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/Thumbs.db b/TMessagesProj/src/main/res/drawable-xhdpi/Thumbs.db
index 04bf64c0..8087e90e 100644
Binary files a/TMessagesProj/src/main/res/drawable-xhdpi/Thumbs.db and b/TMessagesProj/src/main/res/drawable-xhdpi/Thumbs.db differ
diff --git a/TMessagesProj/src/main/res/drawable-xxxhdpi/Thumbs.db b/TMessagesProj/src/main/res/drawable-xxxhdpi/Thumbs.db
index b116d582..3c563db4 100644
Binary files a/TMessagesProj/src/main/res/drawable-xxxhdpi/Thumbs.db and b/TMessagesProj/src/main/res/drawable-xxxhdpi/Thumbs.db differ
diff --git a/TMessagesProj/src/main/res/values-ar/strings.xml b/TMessagesProj/src/main/res/values-ar/strings.xml
index 0a0a92e1..e345fd6b 100644
--- a/TMessagesProj/src/main/res/values-ar/strings.xml
+++ b/TMessagesProj/src/main/res/values-ar/strings.xml
@@ -950,7 +950,7 @@
%1$s الساعة %2$s
تم تحديث تيليجرام نسخة الآندرويد. الجديد في نسخة 3.2.0:\n\n- إضافة خدمة القنوات - وسيلة جديدة رائعة لإرسال الرسائل الجماعية لعدد لا محدود من الجماهير (تستبدل الرسائل الجماعية القديمة). \n\n- اللاستزادة، اقرأ هنا: https://telegram.org/blog/channels
- 630
+ 632
بلاس مسنجر للأندرويد
diff --git a/TMessagesProj/src/main/res/values-ca/strings.xml b/TMessagesProj/src/main/res/values-ca/strings.xml
index f6ae36d3..166652c1 100644
--- a/TMessagesProj/src/main/res/values-ca/strings.xml
+++ b/TMessagesProj/src/main/res/values-ca/strings.xml
@@ -903,7 +903,7 @@ Si no us interessa, us suggerim crear un canal privat.
%1$s a les %2$s
S\'ha actualitzat el Telegram per a l\'Android. Novetats a la versió 3.1.3:\n\n- Nova secció \'Enllaços compartits\' a la informació del xat\n- Previsualització, dins de l\'aplicació, per a enllaços a fotos
- 630
+ 632
Plus Messenger per Android
@@ -1045,4 +1045,16 @@ Si no us interessa, us suggerim crear un canal privat.
No aturis els àudios
Color del divisor de llista
Centra l\'avatar, el nom i el número de telèfon
+ Gradient
+ Color de gradient
+ Deshabilitat
+ De dalt a baix
+ D\'esquerra a dreta
+ Dalt-Esquerra Baix-Dreta
+ Baix-Esquerra Dalt-Dreta
+ Aplica el gradient al fons de la llista
+ S\'ha copiat %s al porta-retalls
+
+
+Afegiu-vos al canal oficial del Plus Messenger: https://telegram.me/plusmsnes
diff --git a/TMessagesProj/src/main/res/values-de/strings.xml b/TMessagesProj/src/main/res/values-de/strings.xml
index 9a4770f9..70101279 100644
--- a/TMessagesProj/src/main/res/values-de/strings.xml
+++ b/TMessagesProj/src/main/res/values-de/strings.xml
@@ -947,10 +947,10 @@
%1$s um %2$s
Telegram für Android wurde aktualisiert. Neu in Version 3.2.0:\n\n- Kanäle: Du kannst nun Nachrichten an eine unbegrenzte Anzahl von Leuten schicken (ersetzen die Verteilerlisten).\n\n Mehr Infos über dieses Update: https://telegram.org/blog/channels
- 630
+ 632
+\n\nNeues in Version 3.2.2.1:\n\n- Hintergrund vom Chat kann jetzt direkt geändert werden\n- Verbesserte Möglichkeit der Anwendung von Themen Hintergrundbildern\n-Benutzernamen in Zwischenablage kopieren wenn diese in der Profilübersicht ausgewählt wurden\n- Fehlerbeseitigung-->
Plus Messenger für Android
Themen bearbeiten
Ungültiger Hex-Code!
@@ -1098,4 +1098,7 @@
von oben Links nach unten Rechts
von unten Links nach oben Rechts
Hintergrund Farbverlauf Liste oder Seite
+ %s in die Zwischenablage kopiert
+
+\n\nPlus Messenger Mitglied werden im offiziellen Kanal: https://telegram.me/plusmsn
\ No newline at end of file
diff --git a/TMessagesProj/src/main/res/values-es/strings.xml b/TMessagesProj/src/main/res/values-es/strings.xml
index d03384b2..ff12a4a2 100644
--- a/TMessagesProj/src/main/res/values-es/strings.xml
+++ b/TMessagesProj/src/main/res/values-es/strings.xml
@@ -947,9 +947,9 @@
%1$s a las %2$s
Plus Messenger para Android ha sido actualizada. Novedades en la versión 3.2.0\n\n- Presentamos los Canales - una nueva gran forma de difundir tus mensajes a audiencias ilimitadas (reemplaza a las antiguas difusiones).\n\n Conoce más: https://telegram.org/blog/channels
- 630
+ 632
- \n\nNovedades en 3.2.2.1:\n\n- Ahora puedes cambiar el fondo directamente desde la pantalla de chat\n- Método mejorado para aplicar fondos de tema\n- El alias se copia al portapapeles si le haces click en la pantalla de perfil\n- Corrección de errores
+ \n\nNovedades en 3.2.2.2:\n\n- Opción en ajustes para abrir perfil/fotos de perfil de usuario/grupo al hacer click en foto en pantalla principal\n- Opción de gradiente en fondo de chat\n- Añadida opción de reenviar link sin citar\n- Añadido enlace a canal oficial en menú\n- Corrección de errores
Plus Messenger para Android
Tematización
¡Color hexadecimal inválido!
@@ -1099,4 +1099,11 @@
Aplicar gradiente a fondo de lista
%s copiado al portapapeles
\n\nÚnete al canal oficial de Plus Messenger en español: https://telegram.me/plusmsnes
+ Descargar temas
+ Canal oficial
+ Chats
+ Click en foto de contacto
+ Click en foto de grupo
+ Perfil
+ Fotos de perfil
\ No newline at end of file
diff --git a/TMessagesProj/src/main/res/values-fr/strings.xml b/TMessagesProj/src/main/res/values-fr/strings.xml
index 951e6ced..1ddd5db2 100644
--- a/TMessagesProj/src/main/res/values-fr/strings.xml
+++ b/TMessagesProj/src/main/res/values-fr/strings.xml
@@ -949,7 +949,7 @@
Plus Messenger pour Android a été mis à jour. Nouveautés de la version 3.1.3:\n\n- Nouvelle section \"Liens partagés\" dans les informations de la conversation\n
- Prévisualistaion In-app pour les liens des images
- 630
+ 632
Plus Messenger pour Android
Thème
diff --git a/TMessagesProj/src/main/res/values-gl/strings.xml b/TMessagesProj/src/main/res/values-gl/strings.xml
index 21ea0a40..5872e02e 100644
--- a/TMessagesProj/src/main/res/values-gl/strings.xml
+++ b/TMessagesProj/src/main/res/values-gl/strings.xml
@@ -948,9 +948,9 @@ e introduce o teu número.
%1$s ás %2$s
Telegram para Android foi actualizada. Novidades na versión 3.2.0:\n\n- Presentamos as Canles – unha nova gran forma de difundir as túas mensaxes a audiencias ilimitadas (substitúe ás antigas difusións).\n\n Coñece máis: https://telegram.org/blog/channels
- 630
-
- \n\nNovo na versión 3.2.2.1:\n\n- Agora podes cambiar o fondo directamente dende a pantalla da conversa\n- Método mellorado para a aplicación dos fondos do tema\n- O alias cópiase ao portapapeis se lle tocas na pantalla do perfil\n- Corrección de erros
+ 632
+
Plus Messenger para Android
Tematización
Cor hexadecimal inválida!
@@ -1099,4 +1099,5 @@ e introduce o teu número.
Abaixo-Esquerda Arriba-Dereita
Aplicar gradiente ao fondo do listado
%s copiado ao portapapeis
+ \n\nÚnete á canle oficial de Plus Messenger: https://telegram.me/plusmsnes
diff --git a/TMessagesProj/src/main/res/values-hi/strings.xml b/TMessagesProj/src/main/res/values-hi/strings.xml
index 3025e193..0a141232 100644
--- a/TMessagesProj/src/main/res/values-hi/strings.xml
+++ b/TMessagesProj/src/main/res/values-hi/strings.xml
@@ -515,7 +515,7 @@
%1$s पर %2$s
- 630
+ 632
Android के लिए प्लस मैसेंजर
diff --git a/TMessagesProj/src/main/res/values-hr/strings.xml b/TMessagesProj/src/main/res/values-hr/strings.xml
index 9a935284..337f3b69 100644
--- a/TMessagesProj/src/main/res/values-hr/strings.xml
+++ b/TMessagesProj/src/main/res/values-hr/strings.xml
@@ -750,7 +750,7 @@
h:mm a
%1$s u %2$s
- 630
+ 632
Plus Messenger za Android
Izrada teme
diff --git a/TMessagesProj/src/main/res/values-it/strings.xml b/TMessagesProj/src/main/res/values-it/strings.xml
index d607f45c..6ecb4e0b 100644
--- a/TMessagesProj/src/main/res/values-it/strings.xml
+++ b/TMessagesProj/src/main/res/values-it/strings.xml
@@ -947,10 +947,10 @@
%1$s alle %2$s
Plus Messenger per Android si è aggiornato. Nuovo nella versione 3.2.0:\n\n- Nuovi Canali - una nuova modalità per diffondere i tuoi messaggi ad un pubblico infinito (rimpiazzano le vecchie liste broadcast).\n\nPiù info: https://telegram.org/blog/channels
- 630
+ 632
-\n\Novità nella versione 3.2.2.1:\n\n- Adesso lo sfondo può essere cambiato direttamente dalla schermata della chat\n- Migliorato il metodo di applicazione degli sfondi dei temi\n- Nome utente copiato negli appunti se premuto nella schermata del profilo\n- Correzioni bug
+\n\nNovità nella versione 3.2.2.2:\n\n- Nuova opzione nelle impostazioni per aprire il profilo/le immagini del profilo quando si preme l\'utente o l\'immagine del gruppo nella schermata principale\n- Aggiunta opzione per il colore gradiente di sfondo\n- Aggiunta opzione per inoltrare i link senza quotare\n- Aggiunto link al canale ufficiale nel menu\n- Correzioni bug
Plus Messenger per Android
Personalizzazione
Codice del colore esadecimale non valido!
@@ -1099,5 +1099,13 @@
Fondo-sinistra Intestazione-destra
Applica il gradiente allo sfondo della lista
%s copiato negli appunti
- \n\nEntra nel canale ufficiale di Plus Messenger: https://telegram.me/plusmsn
+
+\n\nEntra nel canale ufficiale di Plus Messenger: https://telegram.me/plusmsn
+ Scarica temi
+ Canale ufficiale
+ Avvisi
+ Click sull\'immagine del contatto
+ Click sull\'immagine del gruppo
+ Profilo
+ Immagini del profilo
\ No newline at end of file
diff --git a/TMessagesProj/src/main/res/values-nl/strings.xml b/TMessagesProj/src/main/res/values-nl/strings.xml
index cb46cf57..325ed7f5 100644
--- a/TMessagesProj/src/main/res/values-nl/strings.xml
+++ b/TMessagesProj/src/main/res/values-nl/strings.xml
@@ -947,7 +947,7 @@
%1$s om %2$s
Plus Messenger voor Android is bijgewerkt. Nieuw in versie 3.2.0:\n\n- Nieuw, kanalen - een perfecte manier om berichten naar een ongelimiteerd publiek te versturen (vervangt de oude verzendlijsten).\n\nMeer over deze update: https://telegram.org/blog/channels
- 630
+ 632
Plus Messenger voor Android
diff --git a/TMessagesProj/src/main/res/values-pt-rBR/strings.xml b/TMessagesProj/src/main/res/values-pt-rBR/strings.xml
index fdfdcbe1..14514e90 100644
--- a/TMessagesProj/src/main/res/values-pt-rBR/strings.xml
+++ b/TMessagesProj/src/main/res/values-pt-rBR/strings.xml
@@ -947,10 +947,10 @@
%1$s às %2$s
Plus Messenger para Android foi atualizado. Novidade na versão 3.2.0:\n\n- Introduzindo Canais – Uma grande nova maneira de transmitir suas mensagens, com audiência ilimitada (substitui as antigas Transmissões).\n\nMais sobre a atualização: https://telegram.org/blog/channels
- 630
+ 632
+\n\nNovidades ne versão 3.2.2.1:\n\n- Agora o papel de parede pode ser alterado pela tela de chat\n- Melhorias no método de aplicação do papel de parede\n- Nome de usuário é copiado para o clipboard se clicado na tela de perfil\n- Correções de erros-->
Plus Messenger para Android
Personalização
Código de cor HEX inválido!
@@ -1084,7 +1084,7 @@
Mostrar Avatar do Contato
Mostrar Próprio Avatar no Chat
Mostrar Próprio Avatar em Grupos
- Avatar Próprio no Topo
+ Alinhar Avatar Próprio no Topo
Cor do Título/Botão de Diálogo
Exibir Nome de Usuário
Não Parar Áudio
@@ -1098,4 +1098,7 @@
Superior-Esquerda Inferior-Direita
Inferior-Esquerda Superior-Direita
Aplicar degradê para a lista de fundo
+ %s copiado para o clipboard
+
+\n\nJunte-se ao canal oficial do Plus Messenger: https://telegram.me/plusmsn
\ No newline at end of file
diff --git a/TMessagesProj/src/main/res/values-pt-rPT/strings.xml b/TMessagesProj/src/main/res/values-pt-rPT/strings.xml
index 749b40cd..55254e05 100644
--- a/TMessagesProj/src/main/res/values-pt-rPT/strings.xml
+++ b/TMessagesProj/src/main/res/values-pt-rPT/strings.xml
@@ -950,7 +950,7 @@
%1$s às %2$s
Plus Messenger para Android foi atualizado. Novidade na versão 3.2.0:\n\n- Introduzindo Canais – Uma grande nova maneira de transmitir suas mensagens, com audiência ilimitada (substitui as antigas Transmissões).\n\nMais sobre a atualização: https://telegram.org/blog/channels
- 630
+ 632
Plus Messenger para Android
Temas
diff --git a/TMessagesProj/src/main/res/values-ru/strings.xml b/TMessagesProj/src/main/res/values-ru/strings.xml
index b265acf9..3e503089 100644
--- a/TMessagesProj/src/main/res/values-ru/strings.xml
+++ b/TMessagesProj/src/main/res/values-ru/strings.xml
@@ -947,10 +947,10 @@
%1$s в %2$s
Telegram для Android обновлён. Новое в версии 3.2.0:\n\n- Представляем Каналы – новый отличный способ транслировать свои сообщения неограниченной аудитории (заменяют старые списки рассылок).\n\nЧитать больше: https://telegram.org/blog/channels
- 630
-
+ 632
+
Plus Messenger для Android
Кастомизация
Неверный hex-код цвета!
@@ -1099,4 +1099,6 @@
Снизу налево, сверху направо
Применить градиент к фону списка
%s скопировано в буфер обмена
+
+\n\nПрисоединяйтесь к официальному каналу Plus Messenger: https://telegram.me/plusmsn
diff --git a/TMessagesProj/src/main/res/values-tr/strings.xml b/TMessagesProj/src/main/res/values-tr/strings.xml
index 83aefc54..1e3f15a8 100644
--- a/TMessagesProj/src/main/res/values-tr/strings.xml
+++ b/TMessagesProj/src/main/res/values-tr/strings.xml
@@ -830,10 +830,10 @@
%1$s %2$s
- 630
+ 632
+\n\n3.2.2.1\'deki Yenilikler:\n\n- Artık duvarkağıdı direkt olarak sohbet ekranından değişebiliyor\n- Tema duvarkağıtlarının uygulama yönteminde geliştirmeler yapıldı\n- Eğer profil ekranında işaretlenmişse kullanıcı adı kopyalanabilir\n- Hata düzeltmeleri-->
Android için Plus Messenger
Tema
Geçersiz renk hex kodu!
@@ -878,8 +878,8 @@
Yazı Giriş Boyutu
Yazı Giriş Arkaplan Rengi
Emoji Arkaplan Rengi
- seçilmiş surat sekme rengi
- Surat simgesinin rengi
+ Emoji seçili sekme rengi
+ Emoji sekmesi ikon rengi
Çevrimiçi Rengi
Müzik
Temayı Kaydet
@@ -982,4 +982,6 @@
Alt Sol Üst Sağ
Arkaplana gradyan uygula
%s panoya kopyalandı
+
+\n\nPlus Messenger resmi kanalına katılın: https://telegram.me/plusmsn
diff --git a/TMessagesProj/src/main/res/values-zh-rCN/strings.xml b/TMessagesProj/src/main/res/values-zh-rCN/strings.xml
index 5962e874..e926c9a7 100644
--- a/TMessagesProj/src/main/res/values-zh-rCN/strings.xml
+++ b/TMessagesProj/src/main/res/values-zh-rCN/strings.xml
@@ -897,7 +897,7 @@
%1$s 的 %2$s
- 630
+ 632
Plus Messenger for Android
@@ -944,7 +944,8 @@
输入栏字体大小
输入栏背景颜色
表情背景颜色
- 表情标签颜色
+ Emoji选择栏颜色
+ Emoji选择栏颜色
在线中颜色
音乐
保存主题
@@ -1004,7 +1005,7 @@
使用“名称_日期”格式保存文件,而不单只是数字序号
头像大小
对齐头像到顶部
- 头像左边距
+ 头像边距
群组名称颜色
群组名称大小
姓名颜色(手机号码未知)
@@ -1026,4 +1027,27 @@
使用设备自带字体
Plus Messenger 将重启
群组图标颜色
+ 已分享的联系人名称颜色
+ 附件背景颜色
+ 附件文字颜色
+ 在聊天界面显示联系人头像
+ 在聊天界面显示自己的头像
+ 在群组界面显示自己的头像
+ 对齐自己的头像到顶部
+ 对话框的标题/按钮颜色
+ 同时显示用户名和昵称
+ 不停止语音
+ 列表分隔线颜色
+ 居中头像、名称和电话号码
+ 渐变
+ 渐变颜色
+ 禁用
+ 上下
+ 左右
+ 左上右下
+ 左下右上
+ 应用渐变色到列表背景
+ %s 已复制到剪贴板
+
+\n\n加入 Plus Messenger 官方频道: https://telegram.me/plusmsn
diff --git a/TMessagesProj/src/main/res/values-zh-rTW/strings.xml b/TMessagesProj/src/main/res/values-zh-rTW/strings.xml
index d99de787..84815e9b 100644
--- a/TMessagesProj/src/main/res/values-zh-rTW/strings.xml
+++ b/TMessagesProj/src/main/res/values-zh-rTW/strings.xml
@@ -947,7 +947,7 @@
於時間 %1$s %2$s
Android 版的 Telegram 已經更新。在版本 3.2.0 中的新功能:\n\n- 引進頻道 – 用來將您的訊息向無限觀眾廣播的新方式 (取代舊式的廣播)。\n\n了解更多:https://telegram.org/blog/channels
- 630
+ 632
@@ -1085,4 +1085,8 @@
在群組畫面中顯示擁有的大頭照
對齊擁有的大頭照到頂端
對話框標題/按鈕顏色
+ 顯示用戶名稱及成員名稱
+ 不要停止音訊
+ 選單分隔線顏色
+ 將個人照片、姓名和電話號碼置中
diff --git a/TMessagesProj/src/main/res/values/strings.xml b/TMessagesProj/src/main/res/values/strings.xml
index d9189694..f605a5a4 100644
--- a/TMessagesProj/src/main/res/values/strings.xml
+++ b/TMessagesProj/src/main/res/values/strings.xml
@@ -948,9 +948,9 @@
%1$s at %2$s
Telegram for Android has been updated. New in version 3.2.0:\n\n- Introducing Channels – a great new way to broadcast your messages to unlimited audiences (replaces old Broadcasts).\n\nRead more: https://telegram.org/blog/channels
- 630
+ 632
- \n\nNew in version 3.2.2.1:\n\n- Now wallpaper can be changed directly from chat screen\n- Improved way of applying themes\' wallpapers\n- Username copied to clipboard if clicked in profile screen\n- Bug fixes
+ \n\nNew in version 3.2.2.2:\n\n- New option in settings to open profile/profile pics when clicking user/group pic in main screen\n- Added gradient option to chat background color\n- Added option to forward link without quoting\n- Added link to official channel in menu\n- Bug fixes
Plus Messenger for Android
Theming
Invalid color hex code!
@@ -1100,4 +1100,11 @@
Apply gradient to list background
%s copied to clipboard
\n\nJoin Plus Messenger official channel: https://telegram.me/plusmsn
+ Download themes
+ Official channel
+ Dialogs
+ Click on contact pic
+ Click on group pic
+ Profile
+ Profile pics
\ No newline at end of file