Commit 906746d5 authored by DrKLO's avatar DrKLO

Update to 3.1.3

parent 3e901772
......@@ -5,7 +5,7 @@ repositories {
}
dependencies {
compile 'com.android.support:support-v4:22.2.+'
compile 'com.android.support:support-v4:23.0.+'
compile 'com.google.android.gms:play-services:3.2.+'
compile 'net.hockeyapp.android:HockeySDK:3.5.+'
compile 'com.googlecode.mp4parser:isoparser:1.0.+'
......@@ -13,7 +13,7 @@ dependencies {
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
buildToolsVersion '23.0.0'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
......@@ -73,7 +73,7 @@ android {
defaultConfig {
minSdkVersion 8
targetSdkVersion 22
versionCode 586
versionName "3.1.2"
versionCode 592
versionName "3.1.3"
}
}
......@@ -58,7 +58,7 @@ public class PyroClient {
this.key.attach(this);
this.outbound = new ByteStream();
this.listeners = new CopyOnWriteArrayList<PyroClientListener>();
this.listeners = new CopyOnWriteArrayList<>();
this.lastEventTime = System.currentTimeMillis();
}
......
......@@ -9,6 +9,7 @@
package org.telegram.android;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.text.Layout;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
......@@ -16,6 +17,7 @@ import android.text.Spanned;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.style.URLSpan;
import android.text.util.Linkify;
import org.telegram.messenger.ConnectionsManager;
......@@ -24,8 +26,10 @@ import org.telegram.messenger.FileLog;
import org.telegram.messenger.TLRPC;
import org.telegram.messenger.R;
import org.telegram.messenger.UserConfig;
import org.telegram.ui.Components.TypefaceSpan;
import org.telegram.ui.Components.URLSpanNoUnderline;
import org.telegram.ui.Components.URLSpanNoUnderlineBold;
import org.telegram.ui.Components.URLSpanReplacement;
import java.util.AbstractMap;
import java.util.ArrayList;
......@@ -397,7 +401,7 @@ public class MessageObject {
int dateYear = rightNow.get(Calendar.YEAR);
int dateMonth = rightNow.get(Calendar.MONTH);
dateKey = String.format("%d_%02d_%02d", dateYear, dateMonth, dateDay);
if (contentType == 1 || contentType == 2) {
if (contentType == 1 || contentType == 2 || contentType == 0) {
monthKey = String.format("%d_%02d", dateYear, dateMonth);
}
......@@ -666,7 +670,54 @@ public class MessageObject {
generateLinkDescription();
textLayoutBlocks = new ArrayList<>();
boolean useManualParse = messageOwner.entities.isEmpty() && (
messageOwner instanceof TLRPC.TL_message_old ||
messageOwner instanceof TLRPC.TL_message_old2 ||
messageOwner instanceof TLRPC.TL_message_old3 ||
messageOwner instanceof TLRPC.TL_message_old4 ||
messageOwner instanceof TLRPC.TL_messageForwarded_old ||
messageOwner instanceof TLRPC.TL_messageForwarded_old2 ||
messageOwner instanceof TLRPC.TL_message_secret ||
isOut() && messageOwner.send_state != MESSAGE_SEND_STATE_SENT || messageOwner.id < 0);
if (useManualParse) {
addLinks(messageText);
}
if (messageText instanceof Spannable) {
Spannable spannable = (Spannable) messageText;
int count = messageOwner.entities.size();
for (int a = 0; a < count; a++) {
TLRPC.MessageEntity entity = messageOwner.entities.get(a);
if (entity.length <= 0 || entity.offset < 0 || entity.offset >= messageOwner.message.length()) {
continue;
} else if (entity.offset + entity.length > messageOwner.message.length()) {
entity.length = messageOwner.message.length() - entity.offset;
}
if (entity instanceof TLRPC.TL_messageEntityBold) {
spannable.setSpan(new TypefaceSpan(AndroidUtilities.getTypeface("fonts/rmedium.ttf")), entity.offset, entity.offset + entity.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
} else if (entity instanceof TLRPC.TL_messageEntityItalic) {
spannable.setSpan(new TypefaceSpan(AndroidUtilities.getTypeface("fonts/ritalic.ttf")), entity.offset, entity.offset + entity.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
} else if (entity instanceof TLRPC.TL_messageEntityCode) {
spannable.setSpan(new TypefaceSpan(Typeface.MONOSPACE), entity.offset, entity.offset + entity.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
} else if (!useManualParse) {
String url = messageOwner.message.substring(entity.offset, entity.offset + entity.length);
if (entity instanceof TLRPC.TL_messageEntityBotCommand || entity instanceof TLRPC.TL_messageEntityHashtag || entity instanceof TLRPC.TL_messageEntityMention) {
spannable.setSpan(new URLSpanNoUnderline(url), entity.offset, entity.offset + entity.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
} else if (entity instanceof TLRPC.TL_messageEntityEmail) {
spannable.setSpan(new URLSpanReplacement("mailto:" + url), entity.offset, entity.offset + entity.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
} else if (entity instanceof TLRPC.TL_messageEntityUrl) {
if (!url.toLowerCase().startsWith("http")) {
spannable.setSpan(new URLSpan("http://" + url), entity.offset, entity.offset + entity.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
} else {
spannable.setSpan(new URLSpan(url), entity.offset, entity.offset + entity.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
} else if (entity instanceof TLRPC.TL_messageEntityTextUrl) {
spannable.setSpan(new URLSpanReplacement(entity.url), entity.offset, entity.offset + entity.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
}
}
}
int maxWidth;
if (AndroidUtilities.isTablet()) {
......
......@@ -268,13 +268,10 @@ public class MessagesController implements NotificationCenter.NotificationCenter
TLRPC.InputUser inputUser;
if (user.id == UserConfig.getClientUserId()) {
inputUser = new TLRPC.TL_inputUserSelf();
} else if (user.access_hash != 0) {
inputUser = new TLRPC.TL_inputUserForeign();
inputUser.user_id = user.id;
inputUser.access_hash = user.access_hash;
} else {
inputUser = new TLRPC.TL_inputUserContact();
inputUser = new TLRPC.TL_inputUser();
inputUser.user_id = user.id;
inputUser.access_hash = user.access_hash;
}
return inputUser;
}
......@@ -512,7 +509,9 @@ public class MessagesController implements NotificationCenter.NotificationCenter
return;
}
boolean updateStatus = false;
for (TLRPC.User user : users) {
int count = users.size();
for (int a = 0; a < count; a++) {
TLRPC.User user = users.get(a);
if (putUser(user, fromCache)) {
updateStatus = true;
}
......@@ -531,9 +530,13 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (chat == null) {
return;
}
if (fromCache) {
chats.putIfAbsent(chat.id, chat);
} else {
TLRPC.Chat oldChat = chats.get(chat.id);
if (!fromCache) {
if (oldChat != null && chat.version != oldChat.version) {
loadedFullChats.remove((Integer) chat.id);
}
chats.put(chat.id, chat);
} else if (oldChat == null) {
chats.put(chat.id, chat);
}
}
......@@ -542,7 +545,9 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (chats == null || chats.isEmpty()) {
return;
}
for (TLRPC.Chat chat : chats) {
int count = chats.size();
for (int a = 0; a < count; a++) {
TLRPC.Chat chat = chats.get(a);
putChat(chat, fromCache);
}
}
......@@ -562,7 +567,9 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (encryptedChats == null || encryptedChats.isEmpty()) {
return;
}
for (TLRPC.EncryptedChat encryptedChat : encryptedChats) {
int count = encryptedChats.size();
for (int a = 0; a < count; a++) {
TLRPC.EncryptedChat encryptedChat = encryptedChats.get(a);
putEncryptedChat(encryptedChat, fromCache);
}
}
......@@ -1143,12 +1150,8 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (user == null) {
return;
}
if (user.access_hash != 0) {
req.peer = new TLRPC.TL_inputPeerForeign();
req.peer = new TLRPC.TL_inputPeerUser();
req.peer.access_hash = user.access_hash;
} else {
req.peer = new TLRPC.TL_inputPeerContact();
}
req.peer.user_id = lower_part;
}
ConnectionsManager.getInstance().performRpc(req, new RPCRequest.RPCRequestDelegate() {
......@@ -1447,14 +1450,9 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (user == null) {
return;
}
if (user.access_hash != 0) {
req.peer = new TLRPC.TL_inputPeerForeign();
req.peer = new TLRPC.TL_inputPeerUser();
req.peer.user_id = user.id;
req.peer.access_hash = user.access_hash;
} else {
req.peer = new TLRPC.TL_inputPeerContact();
req.peer.user_id = user.id;
}
}
if (action == 0) {
req.action = new TLRPC.TL_sendMessageTypingAction();
......@@ -1534,14 +1532,9 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (user == null) {
return;
}
if (user.access_hash != 0) {
req.peer = new TLRPC.TL_inputPeerForeign();
req.peer = new TLRPC.TL_inputPeerUser();
req.peer.user_id = user.id;
req.peer.access_hash = user.access_hash;
} else {
req.peer = new TLRPC.TL_inputPeerContact();
req.peer.user_id = user.id;
}
}
if (load_type == 3) {
req.offset = -count / 2;
......@@ -2016,14 +2009,9 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (user == null) {
return;
}
if (user.access_hash != 0) {
req.peer = new TLRPC.TL_inputPeerForeign();
req.peer = new TLRPC.TL_inputPeerUser();
req.peer.user_id = user.id;
req.peer.access_hash = user.access_hash;
} else {
req.peer = new TLRPC.TL_inputPeerContact();
req.peer.user_id = user.id;
}
}
req.max_id = max_positive_id;
req.offset = offset;
......@@ -3006,6 +2994,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
message.to_id.chat_id = updates.chat_id;
message.dialog_id = -updates.chat_id;
}
message.entities = updates.entities;
message.message = updates.message;
message.date = updates.date;
message.flags = updates.flags;
......
......@@ -1370,12 +1370,8 @@ public class NotificationsController {
if (user == null) {
return;
}
if (user.access_hash != 0) {
((TLRPC.TL_inputNotifyPeer)req.peer).peer = new TLRPC.TL_inputPeerForeign();
((TLRPC.TL_inputNotifyPeer)req.peer).peer = new TLRPC.TL_inputPeerUser();
((TLRPC.TL_inputNotifyPeer)req.peer).peer.access_hash = user.access_hash;
} else {
((TLRPC.TL_inputNotifyPeer)req.peer).peer = new TLRPC.TL_inputPeerContact();
}
((TLRPC.TL_inputNotifyPeer)req.peer).peer.user_id = (int)dialog_id;
}
......
......@@ -559,7 +559,6 @@ public class SecretChatHelper {
newMsg.media.video.h = video.h;
newMsg.media.video.date = video.date;
newMsg.media.caption = video.caption != null ? video.caption : "";
newMsg.media.video.user_id = video.user_id;
newMsg.media.video.size = file.size;
newMsg.media.video.id = file.id;
newMsg.media.video.access_hash = file.access_hash;
......@@ -897,9 +896,7 @@ public class SecretChatHelper {
newMessage.media = new TLRPC.TL_messageMediaPhoto();
newMessage.media.caption = "";
newMessage.media.photo = new TLRPC.TL_photo();
newMessage.media.photo.user_id = newMessage.from_id;
newMessage.media.photo.date = newMessage.date;
newMessage.media.photo.geo = new TLRPC.TL_geoPointEmpty();
byte[] thumb = ((TLRPC.TL_decryptedMessageMediaPhoto) decryptedMessage.media).thumb;
if (thumb != null && thumb.length != 0 && thumb.length <= 6000 && decryptedMessage.media.thumb_w <= 100 && decryptedMessage.media.thumb_h <= 100) {
TLRPC.TL_photoCachedSize small = new TLRPC.TL_photoCachedSize();
......@@ -948,7 +945,6 @@ public class SecretChatHelper {
newMessage.media.video.w = decryptedMessage.media.w;
newMessage.media.video.h = decryptedMessage.media.h;
newMessage.media.video.date = date;
newMessage.media.video.user_id = from_id;
newMessage.media.video.size = file.size;
newMessage.media.video.id = file.id;
newMessage.media.video.access_hash = file.access_hash;
......
......@@ -540,14 +540,9 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
if (sendToUser == null) {
return;
}
if (sendToUser.access_hash != 0) {
sendToPeer = new TLRPC.TL_inputPeerForeign();
sendToPeer = new TLRPC.TL_inputPeerUser();
sendToPeer.user_id = sendToUser.id;
sendToPeer.access_hash = sendToUser.access_hash;
} else {
sendToPeer = new TLRPC.TL_inputPeerContact();
sendToPeer.user_id = sendToUser.id;
}
}
ArrayList<MessageObject> objArr = new ArrayList<>();
......@@ -575,6 +570,10 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
newMsg.message = msgObj.messageOwner.message;
newMsg.fwd_msg_id = msgObj.getId();
newMsg.attachPath = msgObj.messageOwner.attachPath;
newMsg.entities = msgObj.messageOwner.entities;
if (!newMsg.entities.isEmpty()) {
newMsg.flags |= TLRPC.MESSAGE_FLAG_HAS_ENTITIES;
}
if (newMsg.attachPath == null) {
newMsg.attachPath = "";
}
......@@ -965,14 +964,9 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
if ((sendToUser.flags & TLRPC.USER_FLAG_BOT) != 0) {
newMsg.flags &= ~TLRPC.MESSAGE_FLAG_UNREAD;
}
if (sendToUser.access_hash != 0) {
sendToPeer = new TLRPC.TL_inputPeerForeign();
sendToPeer = new TLRPC.TL_inputPeerUser();
sendToPeer.user_id = sendToUser.id;
sendToPeer.access_hash = sendToUser.access_hash;
} else {
sendToPeer = new TLRPC.TL_inputPeerContact();
sendToPeer.user_id = sendToUser.id;
}
}
}
} else {
......@@ -1563,6 +1557,10 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
newMsgObj.local_id = newMsgObj.id = res.id;
newMsgObj.date = res.date;
newMsgObj.media = res.media;
newMsgObj.entities = res.entities;
if (!newMsgObj.entities.isEmpty()) {
newMsgObj.flags |= TLRPC.MESSAGE_FLAG_HAS_ENTITIES;
}
if (res instanceof TLRPC.TL_messages_sentMessage) {
MessagesController.getInstance().processNewDifferenceParams(-1, res.pts, res.date, res.pts_count);
} else if (res instanceof TLRPC.TL_messages_sentMessageLink) {
......@@ -1849,10 +1847,8 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
} else {
UserConfig.saveConfig(false);
TLRPC.TL_photo photo = new TLRPC.TL_photo();
photo.user_id = UserConfig.getClientUserId();
photo.date = ConnectionsManager.getInstance().getCurrentTime();
photo.sizes = sizes;
photo.geo = new TLRPC.TL_geoPointEmpty();
return photo;
}
}
......@@ -2218,9 +2214,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
}
if (photo == null) {
photo = new TLRPC.TL_photo();
photo.user_id = UserConfig.getClientUserId();
photo.date = ConnectionsManager.getInstance().getCurrentTime();
photo.geo = new TLRPC.TL_geoPointEmpty();
TLRPC.TL_photoSize photoSize = new TLRPC.TL_photoSize();
photoSize.w = searchImage.width;
photoSize.h = searchImage.height;
......
......@@ -83,12 +83,8 @@ public class MessagesSearchQuery {
if (user == null) {
return;
}
if (user.access_hash != 0) {
req.peer = new TLRPC.TL_inputPeerForeign();
req.peer = new TLRPC.TL_inputPeerUser();
req.peer.access_hash = user.access_hash;
} else {
req.peer = new TLRPC.TL_inputPeerContact();
}
req.peer.user_id = lower_part;
}
req.q = query;
......
......@@ -61,12 +61,8 @@ public class SharedMediaQuery {
if (user == null) {
return;
}
if (user.access_hash != 0) {
req.peer = new TLRPC.TL_inputPeerForeign();
req.peer = new TLRPC.TL_inputPeerUser();
req.peer.access_hash = user.access_hash;
} else {
req.peer = new TLRPC.TL_inputPeerContact();
}
req.peer.user_id = lower_part;
}
long reqId = ConnectionsManager.getInstance().performRpc(req, new RPCRequest.RPCRequestDelegate() {
......@@ -109,12 +105,8 @@ public class SharedMediaQuery {
if (user == null) {
return;
}
if (user.access_hash != 0) {
req.peer = new TLRPC.TL_inputPeerForeign();
req.peer = new TLRPC.TL_inputPeerUser();
req.peer.access_hash = user.access_hash;
} else {
req.peer = new TLRPC.TL_inputPeerContact();
}
req.peer.user_id = lower_part;
}
long reqId = ConnectionsManager.getInstance().performRpc(req, new RPCRequest.RPCRequestDelegate() {
......@@ -158,9 +150,14 @@ public class SharedMediaQuery {
}
} else if (message.media instanceof TLRPC.TL_messageMediaAudio) {
return MEDIA_AUDIO;
} else if (message.media instanceof TLRPC.TL_messageMediaWebPage) {
} else if (!message.entities.isEmpty()) {
for (int a = 0; a < message.entities.size(); a++) {
TLRPC.MessageEntity entity = message.entities.get(a);
if (entity instanceof TLRPC.TL_messageEntityUrl || entity instanceof TLRPC.TL_messageEntityTextUrl || entity instanceof TLRPC.TL_messageEntityEmail) {
return MEDIA_URL;
}
}
}
return -1;
}
......@@ -170,10 +167,16 @@ public class SharedMediaQuery {
} else if (message.media instanceof TLRPC.TL_messageMediaPhoto ||
message.media instanceof TLRPC.TL_messageMediaVideo ||
message.media instanceof TLRPC.TL_messageMediaDocument ||
message.media instanceof TLRPC.TL_messageMediaAudio/* ||
message.media instanceof TLRPC.TL_messageMediaWebPage && !(message.media.webpage instanceof TLRPC.TL_webPageEmpty)*/) {
message.media instanceof TLRPC.TL_messageMediaAudio) {
return true;
} else if (!message.entities.isEmpty()) {
for (int a = 0; a < message.entities.size(); a++) {
TLRPC.MessageEntity entity = message.entities.get(a);
if (entity instanceof TLRPC.TL_messageEntityUrl || entity instanceof TLRPC.TL_messageEntityTextUrl || entity instanceof TLRPC.TL_messageEntityEmail) {
return true;
}
}
}
return false;
}
......
......@@ -271,6 +271,7 @@ public class StickersQuery {
}
}
if (res != null) {
try {
final ArrayList<TLRPC.TL_messages_stickerSet> stickerSetsNew = new ArrayList<>();
final HashMap<Long, TLRPC.TL_messages_stickerSet> stickerSetsByIdNew = new HashMap<>();
final HashMap<Long, String> stickersByEmojiNew = new HashMap<>();
......@@ -331,6 +332,9 @@ public class StickersQuery {
NotificationCenter.getInstance().postNotificationName(NotificationCenter.stickersDidLoaded);
}
});
} catch (Throwable e) {
FileLog.e("tmessages", e);
}
}
}
});
......
/*
* This is the source code of Telegram for Android v. 1.3.x.
* This is the source code of Telegram for Android v. 2.x.x.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013-2014.
* Copyright Nikolai Kudashov, 2013-2015.
*/
package org.telegram.messenger;
public class BuildVars {
public static boolean DEBUG_VERSION = false;
public static int BUILD_VERSION = 586;
public static int BUILD_VERSION = 592;
public static int APP_ID = 0; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id
public static String APP_HASH = ""; //obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id
public static String HOCKEY_APP_HASH = "your-hockeyapp-api-key-here";
......
......@@ -78,11 +78,13 @@ public class TLClassStore {
classStore.put(TLRPC.TL_video_old2.constructor, TLRPC.TL_video_old2.class);
classStore.put(TLRPC.TL_video_old.constructor, TLRPC.TL_video_old.class);
classStore.put(TLRPC.TL_videoEncrypted.constructor, TLRPC.TL_videoEncrypted.class);
classStore.put(TLRPC.TL_video_old3.constructor, TLRPC.TL_video_old3.class);
classStore.put(TLRPC.TL_audio.constructor, TLRPC.TL_audio.class);
classStore.put(TLRPC.TL_audioEncrypted.constructor, TLRPC.TL_audioEncrypted.class);
classStore.put(TLRPC.TL_audioEmpty.constructor, TLRPC.TL_audioEmpty.class);
classStore.put(TLRPC.TL_audio_old.constructor, TLRPC.TL_audio_old.class);
classStore.put(TLRPC.TL_audio_old2.constructor, TLRPC.TL_audio_old2.class);
classStore.put(TLRPC.TL_document.constructor, TLRPC.TL_document.class);
classStore.put(TLRPC.TL_documentEmpty.constructor, TLRPC.TL_documentEmpty.class);
......@@ -96,6 +98,7 @@ public class TLClassStore {
classStore.put(TLRPC.TL_photoSizeEmpty.constructor, TLRPC.TL_photoSizeEmpty.class);
classStore.put(TLRPC.TL_photoCachedSize.constructor, TLRPC.TL_photoCachedSize.class);
classStore.put(TLRPC.TL_photo_old.constructor, TLRPC.TL_photo_old.class);
classStore.put(TLRPC.TL_photo_old2.constructor, TLRPC.TL_photo_old2.class);
}
static TLClassStore store = null;
......
......@@ -47,7 +47,7 @@ public class ChatBaseCell extends BaseCell implements MediaController.FileDownlo
void didPressedCancelSendButton(ChatBaseCell cell);
void didLongPressed(ChatBaseCell cell);
void didPressReplyMessage(ChatBaseCell cell, int id);
void didPressUrl(MessageObject messageObject, String url);
void didPressUrl(MessageObject messageObject, ClickableSpan url);
void needOpenWebView(String url, String title, String originalUrl, int w, int h);
void didClickedImage(ChatBaseCell cell);
boolean canPerformActions();
......
......@@ -38,7 +38,6 @@ import org.telegram.android.MessageObject;
import org.telegram.ui.Components.RadialProgress;
import org.telegram.ui.Components.ResourceLoader;
import org.telegram.ui.Components.StaticLayoutEx;
import org.telegram.ui.Components.URLSpanNoUnderline;
import org.telegram.ui.PhotoViewer;
import org.telegram.ui.Components.GifDrawable;
import org.telegram.android.ImageReceiver;
......@@ -205,16 +204,7 @@ public class ChatMediaCell extends ChatBaseCell {
}
} else if (linkPreviewPressed) {
try {
if (pressedLink instanceof URLSpanNoUnderline) {
String url = ((URLSpanNoUnderline) pressedLink).getURL();
if (url.startsWith("@") || url.startsWith("#") || url.startsWith("/")) {
if (delegate != null) {
delegate.didPressUrl(currentMessageObject, url);
}
}
} else {
pressedLink.onClick(this);
}
delegate.didPressUrl(currentMessageObject, pressedLink);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
......
......@@ -38,7 +38,6 @@ import org.telegram.messenger.TLRPC;
import org.telegram.ui.Components.RadialProgress;
import org.telegram.ui.Components.ResourceLoader;
import org.telegram.ui.Components.StaticLayoutEx;
import org.telegram.ui.Components.URLSpanNoUnderline;
import java.io.File;
import java.util.Locale;
......@@ -131,16 +130,7 @@ public class ChatMessageCell extends ChatBaseCell {
} else {
if (link[0] == pressedLink) {
try {
if (pressedLink instanceof URLSpanNoUnderline) {
String url = ((URLSpanNoUnderline) pressedLink).getURL();
if (url.startsWith("@") || url.startsWith("#") || url.startsWith("/")) {
if (delegate != null) {
delegate.didPressUrl(currentMessageObject, url);
}
}
} else {
pressedLink.onClick(this);
}
delegate.didPressUrl(currentMessageObject, pressedLink);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
......@@ -215,7 +205,10 @@ public class ChatMessageCell extends ChatBaseCell {
pressedLink.onClick(this);
} else {
if (drawImageButton && delegate != null) {
if (buttonState == -1) {
playSoundEffect(SoundEffectConstants.CLICK);
delegate.didClickedImage(this);
}
} else {
TLRPC.WebPage webPage = currentMessageObject.messageOwner.media.webpage;
if (Build.VERSION.SDK_INT >= 16 && webPage.embed_url != null && webPage.embed_url.length() != 0) {
......@@ -839,7 +832,7 @@ public class ChatMessageCell extends ChatBaseCell {
if (drawImageButton) {
int size = AndroidUtilities.dp(48);
buttonX = (int) (linkImageView.getImageX() + (linkImageView.getImageWidth() - size) / 2.0f);
buttonY = (int) (linkImageView.getImageY() + (linkImageView.getImageHeight() - size) / 2.0f) + namesOffset;
buttonY = (int) (linkImageView.getImageY() + (linkImageView.getImageHeight() - size) / 2.0f);
radialProgress.setProgressRect(buttonX, buttonY, buttonX + AndroidUtilities.dp(48), buttonY + AndroidUtilities.dp(48));
}
}
......
......@@ -27,6 +27,7 @@ import android.os.Bundle;
import android.provider.ContactsContract;
import android.provider.MediaStore;
import android.text.TextUtils;
import android.text.style.ClickableSpan;
import android.util.Base64;
import android.util.SparseArray;
import android.util.TypedValue;
......@@ -114,6 +115,8 @@ import org.telegram.ui.Components.SendingFileExDrawable;
import org.telegram.ui.Components.SizeNotifierFrameLayout;
import org.telegram.ui.Components.TimerDrawable;
import org.telegram.ui.Components.TypingDotsDrawable;
import org.telegram.ui.Components.URLSpanNoUnderline;
import org.telegram.ui.Components.URLSpanReplacement;
import org.telegram.ui.Components.WebFrameLayout;
import java.io.File;
......@@ -1883,6 +1886,16 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
AlertDialog.Builder builder = null;
if (currentUser != null && userBlocked) {
if ((currentUser.flags & TLRPC.USER_FLAG_BOT) != 0) {
String botUserLast = botUser;
botUser = null;
MessagesController.getInstance().unblockUser(currentUser.id);
if (botUserLast != null && botUserLast.length() != 0) {
MessagesController.getInstance().sendBotStart(currentUser, botUserLast);
} else {
SendMessagesHelper.getInstance().sendMessage("/start", dialog_id, null, null, false);
}
} else {
builder = new AlertDialog.Builder(getParentActivity());
builder.setMessage(LocaleController.getString("AreYouSureUnblockContact", R.string.AreYouSureUnblockContact));
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), new DialogInterface.OnClickListener() {
......@@ -1891,8 +1904,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
MessagesController.getInstance().unblockUser(currentUser.id);
}
});
}
} else if (currentUser != null && botUser != null) {
if (botUser.length() != 0) {
if (botUser != null && botUser.length() != 0) {
MessagesController.getInstance().sendBotStart(currentUser, botUser);
} else {
SendMessagesHelper.getInstance().sendMessage("/start", dialog_id, null, null, false);
......@@ -2601,7 +2615,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
bottomOverlay.setVisibility(View.INVISIBLE);
}
if (hideKeyboard) {
chatActivityEnterView.hidePopup();
chatActivityEnterView.hidePopup(false);
if (getParentActivity() != null) {
AndroidUtilities.hideKeyboard(getParentActivity().getCurrentFocus());
}
......@@ -4363,10 +4377,14 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
bottomOverlayChatText.setText(LocaleController.getString("DeleteThisGroup", R.string.DeleteThisGroup));
} else {
if (userBlocked) {
if ((currentUser.flags & TLRPC.USER_FLAG_BOT) != 0) {
bottomOverlayChatText.setText(LocaleController.getString("BotUnblock", R.string.BotUnblock));
} else {
bottomOverlayChatText.setText(LocaleController.getString("Unblock", R.string.Unblock));
}
} else if (botUser != null) {
bottomOverlayChatText.setText(LocaleController.getString("BotStart", R.string.BotStart));
chatActivityEnterView.hidePopup();
chatActivityEnterView.hidePopup(false);
if (getParentActivity() != null) {
AndroidUtilities.hideKeyboard(getParentActivity().getCurrentFocus());
}
......@@ -5039,7 +5057,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
updateVisibleRows();
return false;
} else if (chatActivityEnterView.isPopupShowing()) {
chatActivityEnterView.hidePopup();
chatActivityEnterView.hidePopup(true);
return false;
}
return true;
......@@ -5345,15 +5363,36 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
@Override
public void didPressUrl(MessageObject messageObject, String url) {
if (url.startsWith("@")) {
MessagesController.openByUserName(url.substring(1), ChatActivity.this, 0);
} else if (url.startsWith("#")) {
public void didPressUrl(MessageObject messageObject, final ClickableSpan url) {
if (url instanceof URLSpanNoUnderline) {
String str = ((URLSpanNoUnderline) url).getURL();
if (str.startsWith("@")) {
MessagesController.openByUserName(str.substring(1), ChatActivity.this, 0);
} else if (str.startsWith("#")) {
DialogsActivity fragment = new DialogsActivity(null);
fragment.setSearchString(url);
fragment.setSearchString(str);
presentFragment(fragment);
} else if (url.startsWith("/")) {
chatActivityEnterView.setCommand(messageObject, url);
} else if (str.startsWith("/")) {
chatActivityEnterView.setCommand(messageObject, str);
}
} else if (url instanceof URLSpanReplacement) {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setMessage(LocaleController.formatString("OpenUrlAlert", R.string.OpenUrlAlert, ((URLSpanReplacement) url).getURL()));
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setPositiveButton(LocaleController.getString("Open", R.string.Open), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
try {
url.onClick(fragmentView);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
} else {
url.onClick(fragmentView);
}
}
......
......@@ -213,30 +213,46 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
messageEditText.setHintTextColor(0xffb2b2b2);
frameLayout.addView(messageEditText, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM, 52, 0, isChat ? 50 : 2, 0));
messageEditText.setOnKeyListener(new View.OnKeyListener() {
boolean ctrlPressed = false;
@Override
public boolean onKey(View view, int i, KeyEvent keyEvent) {
if (i == KeyEvent.KEYCODE_BACK && !keyboardVisible && isPopupShowing()) {
if (keyEvent.getAction() == 1) {
if (currentPopupContentType == 1 && botButtonsMessageObject != null) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
preferences.edit().putInt("hidekeyboard_" + dialog_id, botButtonsMessageObject.getId()).commit();
}
showPopup(0, 0);
}
return true;
} else if (i == KeyEvent.KEYCODE_ENTER && sendByEnter && keyEvent.getAction() == KeyEvent.ACTION_DOWN) {
} else if (i == KeyEvent.KEYCODE_ENTER && (ctrlPressed || sendByEnter) && keyEvent.getAction() == KeyEvent.ACTION_DOWN) {
sendMessage();
return true;
} else if (i == KeyEvent.KEYCODE_CTRL_LEFT || i == KeyEvent.KEYCODE_CTRL_RIGHT) {
ctrlPressed = keyEvent.getAction() == KeyEvent.ACTION_DOWN;
return true;
}
return false;
}
});
messageEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
boolean ctrlPressed = false;
@Override
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
if (i == EditorInfo.IME_ACTION_SEND) {
sendMessage();
return true;
} else if (sendByEnter) {
if (keyEvent != null && i == EditorInfo.IME_NULL && keyEvent.getAction() == KeyEvent.ACTION_DOWN) {
} else if (keyEvent != null && i == EditorInfo.IME_NULL) {
if ((ctrlPressed || sendByEnter) && keyEvent.getAction() == KeyEvent.ACTION_DOWN) {
sendMessage();
return true;
} else if (i == KeyEvent.KEYCODE_CTRL_LEFT || i == KeyEvent.KEYCODE_CTRL_RIGHT) {
ctrlPressed = keyEvent.getAction() == KeyEvent.ACTION_DOWN;
return true;
}
}
return false;
......@@ -319,7 +335,13 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
if (botReplyMarkup != null) {
if (!isPopupShowing() || currentPopupContentType != 1) {
showPopup(1, 1);
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
preferences.edit().remove("hidekeyboard_" + dialog_id).commit();
} else {
if (currentPopupContentType == 1 && botButtonsMessageObject != null) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
preferences.edit().putInt("hidekeyboard_" + dialog_id, botButtonsMessageObject.getId()).commit();
}
openKeyboardInternal();
}
} else if (hasBotCommands) {
......@@ -1184,13 +1206,14 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
botKeyboardView.setPanelHeight(AndroidUtilities.displaySize.x > AndroidUtilities.displaySize.y ? keyboardHeightLand : keyboardHeight);
botKeyboardView.setButtons(botReplyMarkup != null ? botReplyMarkup : null);
if (botReplyMarkup != null) {
if (botButtonsMessageObject != replyingMessageObject && (botReplyMarkup.flags & 2) != 0) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
boolean keyboardHidden = preferences.getInt("hidekeyboard_" + dialog_id, 0) == messageObject.getId();
if (botButtonsMessageObject != replyingMessageObject && (botReplyMarkup.flags & 2) != 0) {
if (preferences.getInt("answered_" + dialog_id, 0) == messageObject.getId()) {
return;
}
}
if (messageEditText.length() == 0 && !isPopupShowing()) {
if (!keyboardHidden && messageEditText.length() == 0 && !isPopupShowing()) {
showPopup(1, 1);
}
} else {
......@@ -1321,8 +1344,12 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
}
}
public void hidePopup() {
public void hidePopup(boolean byBackButton) {
if (isPopupShowing()) {
if (currentPopupContentType == 1 && byBackButton && botButtonsMessageObject != null) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
preferences.edit().putInt("hidekeyboard_" + dialog_id, botButtonsMessageObject.getId()).commit();
}
showPopup(0, 0);
}
}
......
/*
* This is the source code of Telegram for Android v. 2.x.x.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013-2015.
*/
package org.telegram.ui.Components;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
import org.telegram.android.AndroidUtilities;
import org.telegram.messenger.FileLog;
public class LetterDrawable extends Drawable {
private static Paint paint = new Paint();
private static TextPaint namePaint;
private StaticLayout textLayout;
private float textWidth;
private float textHeight;
private float textLeft;
private StringBuilder stringBuilder = new StringBuilder(5);
public LetterDrawable() {
super();
if (namePaint == null) {
paint.setColor(0xffdfdfdf);
namePaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
namePaint.setColor(0xffffffff);
namePaint.setTextSize(AndroidUtilities.dp(28));
}
}
public void setTitle(String title) {
stringBuilder.setLength(0);
if (title != null && title.length() > 0) {
stringBuilder.append(title.substring(0, 1));
}
if (stringBuilder.length() > 0) {
String text = stringBuilder.toString().toUpperCase();
try {
textLayout = new StaticLayout(text, namePaint, AndroidUtilities.dp(100), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
if (textLayout.getLineCount() > 0) {
textLeft = textLayout.getLineLeft(0);
textWidth = textLayout.getLineWidth(0);
textHeight = textLayout.getLineBottom(0);
}
} catch (Exception e) {
FileLog.e("tmessages", e);
}
} else {
textLayout = null;
}
}
@Override
public void draw(Canvas canvas) {
Rect bounds = getBounds();
if (bounds == null) {
return;
}
int size = bounds.width();
canvas.save();
canvas.drawRect(bounds.left, bounds.top, bounds.right, bounds.bottom, paint);
if (textLayout != null) {
canvas.translate(bounds.left + (size - textWidth) / 2 - textLeft, bounds.top + (size - textHeight) / 2);
textLayout.draw(canvas);
}
canvas.restore();
}
@Override
public void setAlpha(int alpha) {
}
@Override
public void setColorFilter(ColorFilter cf) {
}
@Override
public int getOpacity() {
return 0;
}
@Override
public int getIntrinsicWidth() {
return 0;
}
@Override
public int getIntrinsicHeight() {
return 0;
}
}
/*
* This is the source code of Telegram for Android v. 2.x.x.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013-2015.
*/
package org.telegram.ui.Components;
import android.text.style.URLSpan;
public class URLSpanReplacement extends URLSpan {
public URLSpanReplacement(String url) {
super(url);
}
}
......@@ -288,6 +288,14 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati
return fragmentView;
}
@Override
public void onPause() {
super.onPause();
if (dropDownContainer != null) {
dropDownContainer.closeSubMenu();
}
}
@Override
public void onResume() {
super.onResume();
......
......@@ -1066,7 +1066,7 @@ public class PopupNotificationActivity extends Activity implements NotificationC
@Override
public void onBackPressed() {
if (chatActivityEnterView.isPopupShowing()) {
chatActivityEnterView.hidePopup();
chatActivityEnterView.hidePopup(true);
return;
}
super.onBackPressed();
......@@ -1089,7 +1089,7 @@ public class PopupNotificationActivity extends Activity implements NotificationC
super.onPause();
overridePendingTransition(0, 0);
if (chatActivityEnterView != null) {
chatActivityEnterView.hidePopup();
chatActivityEnterView.hidePopup(false);
chatActivityEnterView.setFieldFocused(false);
}
ConnectionsManager.getInstance().setAppPaused(true, false);
......
......@@ -261,6 +261,11 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
if (id == -1) {
finishFragment();
} else if (id == block_contact) {
TLRPC.User user = MessagesController.getInstance().getUser(user_id);
if (user == null) {
return;
}
if ((user.flags & TLRPC.USER_FLAG_BOT) == 0) {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
if (!userBlocked) {
builder.setMessage(LocaleController.getString("AreYouSureBlockContact", R.string.AreYouSureBlockContact));
......@@ -280,6 +285,15 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
} else {
if (!userBlocked) {
MessagesController.getInstance().blockUser(user_id);
} else {
MessagesController.getInstance().unblockUser(user_id);
SendMessagesHelper.getInstance().sendMessage("/start", user_id, null, null, false);
finishFragment();
}
}
} else if (id == add_contact) {
TLRPC.User user = MessagesController.getInstance().getUser(user_id);
Bundle args = new Bundle();
......@@ -1308,6 +1322,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
menu.clearItems();
if (user_id != 0) {
if (ContactsController.getInstance().contactsDict.get(user_id) == null) {
TLRPC.User user = MessagesController.getInstance().getUser(user_id);
if (user == null) {
......@@ -1324,9 +1339,13 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
item.addSubItem(add_contact, LocaleController.getString("AddContact", R.string.AddContact), 0);
item.addSubItem(share_contact, LocaleController.getString("ShareContact", R.string.ShareContact), 0);
item.addSubItem(block_contact, !userBlocked ? LocaleController.getString("BlockContact", R.string.BlockContact) : LocaleController.getString("Unblock", R.string.Unblock), 0);
} else {
if ((user.flags & TLRPC.USER_FLAG_BOT) != 0) {
item.addSubItem(block_contact, !userBlocked ? LocaleController.getString("BotStop", R.string.BotStop) : LocaleController.getString("BotRestart", R.string.BotRestart), 0);
} else {
item.addSubItem(block_contact, !userBlocked ? LocaleController.getString("BlockContact", R.string.BlockContact) : LocaleController.getString("Unblock", R.string.Unblock), 0);
}
}
} else {
ActionBarMenuItem item = menu.addItem(0, R.drawable.ic_ab_other);
item.addSubItem(share_contact, LocaleController.getString("ShareContact", R.string.ShareContact), 0);
......@@ -1361,7 +1380,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
args.putBoolean("scrollToTopOnResume", true);
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.closeChats);
NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
int lower_part = (int)dialog_id;
int lower_part = (int) dialog_id;
if (lower_part != 0) {
if (lower_part > 0) {
args.putInt("user_id", lower_part);
......@@ -1369,7 +1388,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
args.putInt("chat_id", -lower_part);
}
} else {
args.putInt("enc_id", (int)(dialog_id >> 32));
args.putInt("enc_id", (int) (dialog_id >> 32));
}
presentFragment(new ChatActivity(args), true);
removeSelfFromStack();
......
......@@ -87,6 +87,7 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
private int resultWidth = 0;
private int resultHeight = 0;
private int bitrate = 0;
private int originalBitrate = 0;
private float videoDuration = 0;
private long startTime = 0;
private long endTime = 0;
......@@ -247,7 +248,7 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
}
if (delegate != null) {
if (compressVideo.getVisibility() == View.GONE || compressVideo.getVisibility() == View.VISIBLE && !compressVideo.isChecked()) {
delegate.didFinishEditVideo(videoPath, startTime, endTime, originalWidth, originalHeight, rotationValue, originalWidth, originalHeight, bitrate, estimatedSize, esimatedDuration);
delegate.didFinishEditVideo(videoPath, startTime, endTime, originalWidth, originalHeight, rotationValue, originalWidth, originalHeight, originalBitrate, estimatedSize, esimatedDuration);
} else {
delegate.didFinishEditVideo(videoPath, startTime, endTime, resultWidth, resultHeight, rotationValue, originalWidth, originalHeight, bitrate, estimatedSize, esimatedDuration);
}
......@@ -742,7 +743,7 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
TrackHeaderBox headerBox = trackBox.getTrackHeaderBox();
if (headerBox.getWidth() != 0 && headerBox.getHeight() != 0) {
trackHeaderBox = headerBox;
bitrate = (int)(trackBitrate / 100000 * 100000);
originalBitrate = bitrate = (int)(trackBitrate / 100000 * 100000);
if (bitrate > 900000) {
bitrate = 900000;
}
......
TMessagesProj/src/main/res/drawable-hdpi/tip1.png

14 KB | W: | H:

TMessagesProj/src/main/res/drawable-hdpi/tip1.png

29.6 KB | W: | H:

TMessagesProj/src/main/res/drawable-hdpi/tip1.png
TMessagesProj/src/main/res/drawable-hdpi/tip1.png
TMessagesProj/src/main/res/drawable-hdpi/tip1.png
TMessagesProj/src/main/res/drawable-hdpi/tip1.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-mdpi/tip1.png

8.25 KB | W: | H:

TMessagesProj/src/main/res/drawable-mdpi/tip1.png

15.6 KB | W: | H:

TMessagesProj/src/main/res/drawable-mdpi/tip1.png
TMessagesProj/src/main/res/drawable-mdpi/tip1.png
TMessagesProj/src/main/res/drawable-mdpi/tip1.png
TMessagesProj/src/main/res/drawable-mdpi/tip1.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-xhdpi/tip1.png

20.8 KB | W: | H:

TMessagesProj/src/main/res/drawable-xhdpi/tip1.png

45.4 KB | W: | H:

TMessagesProj/src/main/res/drawable-xhdpi/tip1.png
TMessagesProj/src/main/res/drawable-xhdpi/tip1.png
TMessagesProj/src/main/res/drawable-xhdpi/tip1.png
TMessagesProj/src/main/res/drawable-xhdpi/tip1.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-xxhdpi/tip1.png

41.5 KB | W: | H:

TMessagesProj/src/main/res/drawable-xxhdpi/tip1.png

88.7 KB | W: | H:

TMessagesProj/src/main/res/drawable-xxhdpi/tip1.png
TMessagesProj/src/main/res/drawable-xxhdpi/tip1.png
TMessagesProj/src/main/res/drawable-xxhdpi/tip1.png
TMessagesProj/src/main/res/drawable-xxhdpi/tip1.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -137,6 +137,7 @@
<string name="OpenInBrowser">فتح في المتصفح</string>
<string name="CopyUrl">انسخ الرابط</string>
<string name="SendItems">أرسل %1$s</string>
<string name="OpenUrlAlert">هل ترغب في فتح الرابط باستخدام %1$s ؟</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s قام بتعيين عداد التدمير الذاتي إلى to %2$s</string>
<string name="MessageLifetimeChangedOutgoing">لقد قمت بتعيين التدمير الذاتي إلى %1$s</string>
......@@ -549,6 +550,9 @@
<string name="BotStatusCantRead">لا يستطيع الوصول للرسائل</string>
<string name="BotInfoTitle">ماذا يستطيع هذا البوت عمله؟</string>
<string name="BotStart">إبدأ</string>
<string name="BotUnblock">إعادة تشغيل</string>
<string name="BotStop">إيقاف البوت</string>
<string name="BotRestart">إعادة تعيين البوت</string>
<!--button titles-->
<string name="Next">التالي</string>
<string name="Back">رجوع</string>
......@@ -837,6 +841,6 @@
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s الساعة %2$s</string>
<!--update text-->
<string name="updateText">تم تحديث تيليجرام نسخة الاندرويد. الجديد في نسخة ٣.١.٢: \n\n- كلمات البحث الحديثة. \n- اضغط باستمرار لاستعراض الملصق قبل إرساله.</string>
<string name="updateBuild">583</string>
<string name="updateText">تم تحديث تيليجرام نسخة الآندرويد. الجديد في نسخة 3.1.3:\n\n- قسم جديد للروابط المشاركة في معلومات المحادثة \n- استعراض لروابط الصور داخل التطبيق.</string>
<string name="updateBuild">590</string>
</resources>
\ No newline at end of file
......@@ -137,6 +137,7 @@
<string name="OpenInBrowser">Im Browser öffnen</string>
<string name="CopyUrl">URL kopieren</string>
<string name="SendItems">%1$s senden</string>
<string name="OpenUrlAlert">URL %1$s öffnen?</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s hat den Selbstzerstörungs-Timer auf %2$s gesetzt</string>
<string name="MessageLifetimeChangedOutgoing">Du hast den Selbstzerstörungs-Timer auf %1$s gesetzt</string>
......@@ -549,6 +550,9 @@
<string name="BotStatusCantRead">kein Zugriff auf Nachrichten</string>
<string name="BotInfoTitle">Was kann dieser Bot?</string>
<string name="BotStart">STARTEN</string>
<string name="BotUnblock">NEUSTART</string>
<string name="BotStop">Bot Anhalten</string>
<string name="BotRestart">Bot Neu Starten</string>
<!--button titles-->
<string name="Next">Weiter</string>
<string name="Back">Zurück</string>
......@@ -837,6 +841,6 @@
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s um %2$s</string>
<!--update text-->
<string name="updateText">Telegram für Android wurde aktualisiert. Neu in Version 3.1.2:\n\n- Die letzte Suche wird gespeichert\n- Stickervorschau: Sticker vor dem Senden antippen und halten</string>
<string name="updateBuild">583</string>
<string name="updateText">Telegram für Android wurde aktualisiert. Neu in Version 3.1.3:\n\n- Neuer \"Geteilte Links\" Bereich in der Chat Info\n- In-App Vorschau für Links von Bildern.</string>
<string name="updateBuild">590</string>
</resources>
\ No newline at end of file
......@@ -137,6 +137,7 @@
<string name="OpenInBrowser">Abrir en el navegador</string>
<string name="CopyUrl">Copiar URL</string>
<string name="SendItems">Enviar %1$s</string>
<string name="OpenUrlAlert">¿Abrir %1$s?</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s activó la autodestrucción en %2$s</string>
<string name="MessageLifetimeChangedOutgoing">Activaste la autodestrucción en %1$s</string>
......@@ -549,6 +550,9 @@
<string name="BotStatusCantRead">no tiene acceso a los mensajes</string>
<string name="BotInfoTitle">¿Qué puede hacer este bot?</string>
<string name="BotStart">INICIAR</string>
<string name="BotUnblock">REINICIAR</string>
<string name="BotStop">Detener bot</string>
<string name="BotRestart">Reiniciar bot</string>
<!--button titles-->
<string name="Next">Siguiente</string>
<string name="Back">Atrás</string>
......@@ -837,6 +841,6 @@
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s a las %2$s</string>
<!--update text-->
<string name="updateText">Telegram para Android fue actualizada. Novedades en la versión 3.1.2:\n\n- Búsquedas recientes\n- Mantén pulsado sobre un sticker para obtener una vista previa antes de enviarlo</string>
<string name="updateBuild">583</string>
<string name="updateText">Telegram para Android ha sido actualizada. Novedades en la versión 3.1.3:\n\n- Nueva sección de \'Enlaces\' en la información del chat\n- Vista previa en la app para enlaces a fotos</string>
<string name="updateBuild">590</string>
</resources>
\ No newline at end of file
......@@ -137,6 +137,7 @@
<string name="OpenInBrowser">Apri nel Browser</string>
<string name="CopyUrl">Copia URL</string>
<string name="SendItems">Invia %1$s</string>
<string name="OpenUrlAlert">Aprire url %1$s?</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s ha impostato il timer di autodistruzione a %2$s</string>
<string name="MessageLifetimeChangedOutgoing">Hai impostato il timer di autodistruzione a %1$s</string>
......@@ -549,6 +550,9 @@
<string name="BotStatusCantRead">non ha accesso ai messaggi</string>
<string name="BotInfoTitle">Cosa può fare questo bot?</string>
<string name="BotStart">AVVIA</string>
<string name="BotUnblock">RIAVVIA</string>
<string name="BotStop">Arresta bot</string>
<string name="BotRestart">Riavvia bot</string>
<!--button titles-->
<string name="Next">Avanti</string>
<string name="Back">Indietro</string>
......@@ -837,6 +841,6 @@
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s alle %2$s</string>
<!--update text-->
<string name="updateText">Telegram per Android si è aggiornato. Nuovo nella versione 3.1.2:\n\n- Risultati recenti nella ricerca\n- Tieni premuto su uno sticker per visualizzare l\'anteprima prima di inviarlo</string>
<string name="updateBuild">583</string>
<string name="updateText">Telegram per Android si è aggiornato. Nuovo nella versione 3.1.3:\n\n- Nuova sezione \"Link condivisi\" nelle info della chat\n- Anteprima in-app delle foto dei link</string>
<string name="updateBuild">590</string>
</resources>
\ No newline at end of file
......@@ -137,6 +137,7 @@
<string name="OpenInBrowser">브라우져에서 열기</string>
<string name="CopyUrl">URL 복사</string>
<string name="SendItems">%1$s 전송</string>
<string name="OpenUrlAlert">%1$s 링크를 여시겠습니까?</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s님이 자동삭제를 %2$s 후로 설정했습니다</string>
<string name="MessageLifetimeChangedOutgoing">자동삭제를 %1$s 후로 설정했습니다</string>
......@@ -549,6 +550,9 @@
<string name="BotStatusCantRead">메시지 접근 권한이 없습니다</string>
<string name="BotInfoTitle">이 봇은 무엇을 할 수 있나요?</string>
<string name="BotStart">시작</string>
<string name="BotUnblock">재시작</string>
<string name="BotStop">봇 정지</string>
<string name="BotRestart">봇 재시작</string>
<!--button titles-->
<string name="Next">다음</string>
<string name="Back">뒤로</string>
......@@ -837,6 +841,6 @@
<string name="formatterDay12H">a h:mm</string>
<string name="formatDateAtTime">%1$s %2$s</string>
<!--update text-->
<string name="updateText">텔레그램 안드로이드 버전이 업데이트 되었습니다. 새로운 버전은 3.1.2 입니다:\n\n- 최신 검색 결과\n- 스티커를 꾹 누를 경우 미리보기 기능</string>
<string name="updateBuild">583</string>
<string name="updateText">텔레그램 안드로이드 버전이 업데이트 되었습니다. 새로운 버전은 3.1.3 입니다:\n\n- 채팅방 정보내 \'공유된 링크\' 추가 \n- 사진 링크 프리뷰 기능</string>
<string name="updateBuild">590</string>
</resources>
\ No newline at end of file
......@@ -137,6 +137,7 @@
<string name="OpenInBrowser">Openen in browser</string>
<string name="CopyUrl">Link kopiëren</string>
<string name="SendItems">%1$s versturen</string>
<string name="OpenUrlAlert">URL %1$s openen?</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s heeft de zelfvernietigingstimer ingesteld op %2$s</string>
<string name="MessageLifetimeChangedOutgoing">Je hebt de zelfvernietigingstimer ingesteld op %1$s</string>
......@@ -170,7 +171,7 @@
<string name="NotificationGroupKickYou">%1$s heeft je verwijderd uit de groep %2$s</string>
<string name="NotificationGroupLeftMember">%1$s heeft de groep %2$s verlaten</string>
<string name="NotificationContactJoined">%1$s heeft nu Telegram!</string>
<string name="NotificationUnrecognizedDevice">%1$s,\nEr is op je account ingelogd vanaf een nieuw apparaat op %2$s\n\nApparaat: %3$s\nLocatie: %4$s\n\nAls jij dit niet was, kun je die sessie beëindigen via Instellingen - Privacy en veiligheid - Sessies.\n\nAls je dat denkt dat iemand anders zonder jouw toestemming is ingelogd kun je twee-staps-verificatie activeren via instellingen - privacy en veiligheid .\n\nBedankt,\nHet Telegram-team</string>
<string name="NotificationUnrecognizedDevice">%1$s,\nEr is op je account ingelogd vanaf een nieuw apparaat op %2$s\n\nApparaat: %3$s\nLocatie: %4$s\n\nAls jij dit niet was, kun je die sessie beëindigen via Instellingen - Privacy en veiligheid - Sessies.\n\nAls je dat denkt dat iemand anders zonder jouw toestemming is ingelogd kun je twee-staps-verificatie activeren via instellingen - privacy en veiligheid.\n\nBedankt,\nHet Telegram-team</string>
<string name="NotificationContactNewPhoto">%1$s heeft zijn/haar profielfoto gewijzigd</string>
<string name="NotificationInvitedToGroupByLink">%1$s neemt deel aan de groep %2$s via uitnodigingslink</string>
<string name="Reply">Antwoord</string>
......@@ -366,7 +367,7 @@
<string name="SessionsTitle">Actieve sessies</string>
<string name="CurrentSession">Huidige sessie</string>
<string name="NoOtherSessions">Geen andere actieve sessies</string>
<string name="NoOtherSessionsInfo">Je kunt in Telegram inloggen vanaf andere apparaten (mobiel,tablet,desktop) met hetzelfde telefoonnummer. Al je data zal direct worden gesynchroniseerd.</string>
<string name="NoOtherSessionsInfo">Je kunt in Telegram inloggen vanaf andere apparaten (mobiel, tablet, desktop) met hetzelfde telefoonnummer. Al je data zal direct worden gesynchroniseerd.</string>
<string name="OtherSessions">Actieve sessies</string>
<string name="SessionsInfo">Beheer je sessies van andere apparaten.</string>
<string name="TerminateSessionInfo">Tik op een sessie om deze te beëindigen.</string>
......@@ -549,6 +550,9 @@
<string name="BotStatusCantRead">geen toegang tot berichten</string>
<string name="BotInfoTitle">Wat kan deze bot?</string>
<string name="BotStart">BEGIN</string>
<string name="BotUnblock">HERSTART</string>
<string name="BotStop">Bot stoppen</string>
<string name="BotRestart">Bot herstarten</string>
<!--button titles-->
<string name="Next">Volgende</string>
<string name="Back">Vorige</string>
......@@ -837,6 +841,6 @@
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s om %2$s</string>
<!--update text-->
<string name="updateText">Telegram voor Android is bijgewerkt. Nieuw in versie 3.1.2:\n\n- Recente zoekresultaten\n- Stickers aantikken en vasthouden om een voorbeeld weer te geven voor het versturen.</string>
<string name="updateBuild">583</string>
<string name="updateText">Telegram voor Android is bijgewerkt. Nieuw in versie 3.1.3:\n\n- Nieuw \'Gedeelde links\'-gedeelte in chatinformatie\n- In-app voorvertoning voor links naar foto\'s</string>
<string name="updateBuild">590</string>
</resources>
\ No newline at end of file
......@@ -46,8 +46,8 @@
<string name="EncryptedChatStartedIncoming">Você entrou no chat secreto</string>
<string name="ClearHistory">Limpar histórico</string>
<string name="DeleteChat">Apagar e sair</string>
<string name="DeleteChatUser">Excluir conversa</string>
<string name="HiddenName">Excluir Conta</string>
<string name="DeleteChatUser">Apagar conversa</string>
<string name="HiddenName">Conta Excluída</string>
<string name="SelectChat">Selecione um Chat</string>
<string name="PhotoTip">Toque e segure para ver</string>
<string name="CompatibilityChat">%1$s está usando uma versão mais antiga do Telegram, por isso fotos secretas serão mostradas em modo de compatibilidade.\n\nAssim que %2$s atualizar o Telegram, fotos com timers de 1 minuto ou menos passarão a funcionar no modo ‘Toque e segure para ver’, e você será notificado caso a outra pessoa salve a tela.</string>
......@@ -137,6 +137,7 @@
<string name="OpenInBrowser">Abrir no Navegador</string>
<string name="CopyUrl">Copiar URL</string>
<string name="SendItems">Enviar %1$s</string>
<string name="OpenUrlAlert">Abrir URL em %1$s?</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s estabeleceu o tempo de autodestruição para %2$s </string>
<string name="MessageLifetimeChangedOutgoing">Você estabeleceu o tempo de autodestruição para %1$s</string>
......@@ -549,6 +550,9 @@
<string name="BotStatusCantRead">não tem acesso as mensagens</string>
<string name="BotInfoTitle">O que esse bot pode fazer?</string>
<string name="BotStart">COMEÇAR</string>
<string name="BotUnblock">REINICIAR</string>
<string name="BotStop">Parar bot</string>
<string name="BotRestart">Reiniciar bot</string>
<!--button titles-->
<string name="Next">Próximo</string>
<string name="Back">Voltar</string>
......@@ -837,6 +841,6 @@
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s às %2$s</string>
<!--update text-->
<string name="updateText">Seu Telegram para Android acaba de ser atualizado. Novo na versão 3.1.2\n\n- Resultados das buscas recentes\n- Pressione e mantenha em um sticker para pré-visualizar antes do envio</string>
<string name="updateBuild">583</string>
<string name="updateText">Telegram para Android foi atualizado. Novidade na versão 3.1.3\n\n- Nova sessão \"Links Compartilhados\" na informação do chat\n- Pré-visualizaçãp de fotos em links no aplicativo.</string>
<string name="updateBuild">590</string>
</resources>
\ No newline at end of file
......@@ -46,8 +46,8 @@
<string name="EncryptedChatStartedIncoming">Você entrou no chat secreto</string>
<string name="ClearHistory">Limpar histórico</string>
<string name="DeleteChat">Apagar e sair</string>
<string name="DeleteChatUser">Excluir conversa</string>
<string name="HiddenName">Excluir Conta</string>
<string name="DeleteChatUser">Apagar conversa</string>
<string name="HiddenName">Conta Excluída</string>
<string name="SelectChat">Selecione um Chat</string>
<string name="PhotoTip">Toque e segure para ver</string>
<string name="CompatibilityChat">%1$s está usando uma versão mais antiga do Telegram, por isso fotos secretas serão mostradas em modo de compatibilidade.\n\nAssim que %2$s atualizar o Telegram, fotos com timers de 1 minuto ou menos passarão a funcionar no modo ‘Toque e segure para ver’, e você será notificado caso a outra pessoa salve a tela.</string>
......@@ -137,6 +137,7 @@
<string name="OpenInBrowser">Abrir no Navegador</string>
<string name="CopyUrl">Copiar URL</string>
<string name="SendItems">Enviar %1$s</string>
<string name="OpenUrlAlert">Abrir URL em %1$s?</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s estabeleceu o tempo de autodestruição para %2$s </string>
<string name="MessageLifetimeChangedOutgoing">Você estabeleceu o tempo de autodestruição para %1$s</string>
......@@ -549,6 +550,9 @@
<string name="BotStatusCantRead">não tem acesso as mensagens</string>
<string name="BotInfoTitle">O que esse bot pode fazer?</string>
<string name="BotStart">COMEÇAR</string>
<string name="BotUnblock">REINICIAR</string>
<string name="BotStop">Parar bot</string>
<string name="BotRestart">Reiniciar bot</string>
<!--button titles-->
<string name="Next">Próximo</string>
<string name="Back">Voltar</string>
......@@ -837,6 +841,6 @@
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s às %2$s</string>
<!--update text-->
<string name="updateText">Seu Telegram para Android acaba de ser atualizado. Novo na versão 3.1.2\n\n- Resultados das buscas recentes\n- Pressione e mantenha em um sticker para pré-visualizar antes do envio</string>
<string name="updateBuild">583</string>
<string name="updateText">Telegram para Android foi atualizado. Novidade na versão 3.1.3\n\n- Nova sessão \"Links Compartilhados\" na informação do chat\n- Pré-visualizaçãp de fotos em links no aplicativo.</string>
<string name="updateBuild">590</string>
</resources>
\ No newline at end of file
......@@ -137,6 +137,7 @@
<string name="OpenInBrowser">Open in Browser</string>
<string name="CopyUrl">Copy URL</string>
<string name="SendItems">Send %1$s</string>
<string name="OpenUrlAlert">Open url %1$s?</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s set the self-destruct timer to %2$s</string>
<string name="MessageLifetimeChangedOutgoing">You set the self-destruct timer to %1$s</string>
......@@ -549,6 +550,9 @@
<string name="BotStatusCantRead">has no access to messages</string>
<string name="BotInfoTitle">What can this bot do?</string>
<string name="BotStart">START</string>
<string name="BotUnblock">RESTART</string>
<string name="BotStop">Stop bot</string>
<string name="BotRestart">Restart bot</string>
<!--button titles-->
<string name="Next">Next</string>
<string name="Back">Back</string>
......@@ -837,6 +841,6 @@
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s at %2$s</string>
<!--update text-->
<string name="updateText">Telegram for Android has been updated. New in version 3.1.2:\n\n- Recent search results\n- Tap and hold sticker to preview before sending</string>
<string name="updateBuild">583</string>
<string name="updateText">Telegram for Android has been updated. New in version 3.1.3:\n\n- New \'Shared Links\' section in chat info\n- In-app preview for links to photos</string>
<string name="updateBuild">590</string>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment