Commit 77f23954 authored by DrKLO's avatar DrKLO

Bug fixes

parent a137f7a2
...@@ -80,7 +80,7 @@ android { ...@@ -80,7 +80,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 8 minSdkVersion 8
targetSdkVersion 21 targetSdkVersion 21
versionCode 383 versionCode 384
versionName "2.0.0" versionName "2.0.0"
} }
} }
...@@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir) ...@@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE := false LOCAL_PRELINK_MODULE := false
LOCAL_MODULE := tmessages.2 LOCAL_MODULE := tmessages.3
LOCAL_CFLAGS := -w -std=gnu99 -O2 -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 LOCAL_CFLAGS := -w -std=gnu99 -O2 -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
LOCAL_CFLAGS += -Drestrict='' -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno LOCAL_CFLAGS += -Drestrict='' -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno
LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -DHAVE_STRCHRNUL=0 LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -DHAVE_STRCHRNUL=0
......
...@@ -229,7 +229,7 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_blurBitmap(JNIEnv *env, jcl ...@@ -229,7 +229,7 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_blurBitmap(JNIEnv *env, jcl
AndroidBitmap_unlockPixels(env, bitmap); AndroidBitmap_unlockPixels(env, bitmap);
} }
JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jclass class, jstring path, jobject bitmap, int scale) { JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jclass class, jstring path, jobject bitmap, int scale, int width, int height, int stride) {
AndroidBitmapInfo info; AndroidBitmapInfo info;
int i; int i;
...@@ -260,13 +260,13 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl ...@@ -260,13 +260,13 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl
unsigned char *pixels; unsigned char *pixels;
if ((i = AndroidBitmap_lockPixels(env, bitmap, &pixels)) >= 0) { if ((i = AndroidBitmap_lockPixels(env, bitmap, &pixels)) >= 0) {
int rowCount = min(cinfo.output_height, info.height); int rowCount = min(cinfo.output_height, height);
int colCount = min(cinfo.output_width, info.width); int colCount = min(cinfo.output_width, width);
while (cinfo.output_scanline < rowCount) { while (cinfo.output_scanline < rowCount) {
jpeg_read_scanlines(&cinfo, buffer, 1); jpeg_read_scanlines(&cinfo, buffer, 1);
if (info.format == ANDROID_BITMAP_FORMAT_RGBA_8888) { //if (info.format == ANDROID_BITMAP_FORMAT_RGBA_8888) {
if (cinfo.out_color_space == JCS_GRAYSCALE) { if (cinfo.out_color_space == JCS_GRAYSCALE) {
for (i = 0; i < colCount; i++) { for (i = 0; i < colCount; i++) {
float alpha = buffer[0][i] / 255.0f; float alpha = buffer[0][i] / 255.0f;
...@@ -285,11 +285,11 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl ...@@ -285,11 +285,11 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_loadBitmap(JNIEnv *env, jcl
c += 4; c += 4;
} }
} }
} else if (info.format == ANDROID_BITMAP_FORMAT_RGB_565) { //} else if (info.format == ANDROID_BITMAP_FORMAT_RGB_565) {
} //}
pixels += info.stride; pixels += stride;
} }
AndroidBitmap_unlockPixels(env, bitmap); AndroidBitmap_unlockPixels(env, bitmap);
......
...@@ -1604,6 +1604,15 @@ public class ContactsController { ...@@ -1604,6 +1604,15 @@ public class ContactsController {
for (Object object : vector.objects) { for (Object object : vector.objects) {
TLRPC.User toDbUser = new TLRPC.User(); TLRPC.User toDbUser = new TLRPC.User();
TLRPC.TL_contactStatus status = (TLRPC.TL_contactStatus) object; TLRPC.TL_contactStatus status = (TLRPC.TL_contactStatus) object;
if (status.status instanceof TLRPC.TL_userStatusRecently) {
status.status.expires = -100;
} else if (status.status instanceof TLRPC.TL_userStatusLastWeek) {
status.status.expires = -101;
} else if (status.status instanceof TLRPC.TL_userStatusLastMonth) {
status.status.expires = -102;
}
TLRPC.User user = MessagesController.getInstance().getUser(status.user_id); TLRPC.User user = MessagesController.getInstance().getUser(status.user_id);
if (user != null) { if (user != null) {
user.status = status.status; user.status = status.status;
......
...@@ -246,8 +246,12 @@ public class Emoji { ...@@ -246,8 +246,12 @@ public class Emoji {
opts.inJustDecodeBounds = true; opts.inJustDecodeBounds = true;
BitmapFactory.decodeFile(imageFile.getAbsolutePath(), opts); BitmapFactory.decodeFile(imageFile.getAbsolutePath(), opts);
final Bitmap bitmap = Bitmap.createBitmap(opts.outWidth / imageResize, opts.outHeight / imageResize, Bitmap.Config.ARGB_8888); int width = opts.outWidth / imageResize;
Utilities.loadBitmap(imageFile.getAbsolutePath(), bitmap, imageResize); int height = opts.outHeight / imageResize;
int stride = width * 4;
final Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Utilities.loadBitmap(imageFile.getAbsolutePath(), bitmap, imageResize, width, height, stride);
imageName = String.format(Locale.US, "emoji%.01fx_a_%d.jpg", scale, page); imageName = String.format(Locale.US, "emoji%.01fx_a_%d.jpg", scale, page);
imageFile = ApplicationLoader.applicationContext.getFileStreamPath(imageName); imageFile = ApplicationLoader.applicationContext.getFileStreamPath(imageName);
...@@ -257,7 +261,7 @@ public class Emoji { ...@@ -257,7 +261,7 @@ public class Emoji {
is.close(); is.close();
} }
Utilities.loadBitmap(imageFile.getAbsolutePath(), bitmap, imageResize); Utilities.loadBitmap(imageFile.getAbsolutePath(), bitmap, imageResize, width, height, stride);
AndroidUtilities.runOnUIThread(new Runnable() { AndroidUtilities.runOnUIThread(new Runnable() {
@Override @Override
......
...@@ -782,6 +782,15 @@ public class LocaleController { ...@@ -782,6 +782,15 @@ public class LocaleController {
} }
public static String formatUserStatus(TLRPC.User user) { public static String formatUserStatus(TLRPC.User user) {
if (user != null && user.status != null && user.status.expires == 0) {
if (user.status instanceof TLRPC.TL_userStatusRecently) {
user.status.expires = -100;
} else if (user.status instanceof TLRPC.TL_userStatusLastWeek) {
user.status.expires = -101;
} else if (user.status instanceof TLRPC.TL_userStatusLastMonth) {
user.status.expires = -102;
}
}
if (user == null || user.status == null || user.status.expires == 0 || user instanceof TLRPC.TL_userDeleted || user instanceof TLRPC.TL_userEmpty) { if (user == null || user.status == null || user.status.expires == 0 || user instanceof TLRPC.TL_userDeleted || user instanceof TLRPC.TL_userEmpty) {
return getString("ALongTimeAgo", R.string.ALongTimeAgo); return getString("ALongTimeAgo", R.string.ALongTimeAgo);
} else { } else {
......
...@@ -1334,7 +1334,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter ...@@ -1334,7 +1334,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
} }
} }
public void loadMessages(final long dialog_id, final int count, final int max_id, boolean fromCache, int midDate, final int classGuid, final int load_type) { public void loadMessages(final long dialog_id, final int count, final int max_id, boolean fromCache, int midDate, final int classGuid, final int load_type, final int last_message_id, final int first_message_id, final boolean allowCache) {
int lower_part = (int)dialog_id; int lower_part = (int)dialog_id;
if (fromCache || lower_part == 0) { if (fromCache || lower_part == 0) {
MessagesStorage.getInstance().getMessages(dialog_id, count, max_id, midDate, classGuid, load_type); MessagesStorage.getInstance().getMessages(dialog_id, count, max_id, midDate, classGuid, load_type);
...@@ -1356,6 +1356,8 @@ public class MessagesController implements NotificationCenter.NotificationCenter ...@@ -1356,6 +1356,8 @@ public class MessagesController implements NotificationCenter.NotificationCenter
} }
if (load_type == 3) { if (load_type == 3) {
req.offset = -count / 2; req.offset = -count / 2;
} else if (load_type == 1) {
req.offset = -count - 1;
} else { } else {
req.offset = 0; req.offset = 0;
} }
...@@ -1366,7 +1368,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter ...@@ -1366,7 +1368,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
public void run(TLObject response, TLRPC.TL_error error) { public void run(TLObject response, TLRPC.TL_error error) {
if (error == null) { if (error == null) {
final TLRPC.messages_Messages res = (TLRPC.messages_Messages) response; final TLRPC.messages_Messages res = (TLRPC.messages_Messages) response;
processLoadedMessages(res, dialog_id, count, max_id, false, classGuid, 0, 0, 0, 0, load_type); processLoadedMessages(res, dialog_id, count, max_id, false, classGuid, 0, last_message_id, first_message_id, 0, 0, load_type, allowCache);
} }
} }
}); });
...@@ -1374,20 +1376,21 @@ public class MessagesController implements NotificationCenter.NotificationCenter ...@@ -1374,20 +1376,21 @@ public class MessagesController implements NotificationCenter.NotificationCenter
} }
} }
public void processLoadedMessages(final TLRPC.messages_Messages messagesRes, final long dialog_id, final int count, final int max_id, final boolean isCache, final int classGuid, final int first_unread, final int last_message_id, final int unread_count, final int last_date, final int load_type) { public void processLoadedMessages(final TLRPC.messages_Messages messagesRes, final long dialog_id, final int count, final int max_id, final boolean isCache, final int classGuid,
final int first_unread, final int last_message_id, final int first_message_id, final int unread_count, final int last_date, final int load_type, final boolean allowCache) {
Utilities.stageQueue.postRunnable(new Runnable() { Utilities.stageQueue.postRunnable(new Runnable() {
@Override @Override
public void run() { public void run() {
int lower_id = (int)dialog_id; int lower_id = (int)dialog_id;
int high_id = (int)(dialog_id >> 32); int high_id = (int)(dialog_id >> 32);
if (!isCache) { if (!isCache && allowCache) {
MessagesStorage.getInstance().putMessages(messagesRes, dialog_id); MessagesStorage.getInstance().putMessages(messagesRes, dialog_id);
} }
if (high_id != 1 && lower_id != 0 && isCache && messagesRes.messages.size() == 0 && (load_type == 0 || load_type == 2 || load_type == 3)) { if (high_id != 1 && lower_id != 0 && isCache && messagesRes.messages.size() == 0 && (load_type == 0 || load_type == 2 || load_type == 3)) {
AndroidUtilities.runOnUIThread(new Runnable() { AndroidUtilities.runOnUIThread(new Runnable() {
@Override @Override
public void run() { public void run() {
loadMessages(dialog_id, count, max_id, false, 0, classGuid, load_type); loadMessages(dialog_id, count, max_id, false, 0, classGuid, load_type, last_message_id, first_message_id, allowCache);
} }
}); });
return; return;
...@@ -1406,7 +1409,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter ...@@ -1406,7 +1409,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
public void run() { public void run() {
putUsers(messagesRes.users, isCache); putUsers(messagesRes.users, isCache);
putChats(messagesRes.chats, isCache); putChats(messagesRes.chats, isCache);
NotificationCenter.getInstance().postNotificationName(NotificationCenter.messagesDidLoaded, dialog_id, count, objects, isCache, first_unread, last_message_id, unread_count, last_date, load_type); NotificationCenter.getInstance().postNotificationName(NotificationCenter.messagesDidLoaded, dialog_id, count, objects, isCache, first_unread, last_message_id, first_message_id, unread_count, last_date, load_type);
} }
}); });
} }
......
...@@ -23,7 +23,7 @@ import java.util.zip.ZipFile; ...@@ -23,7 +23,7 @@ import java.util.zip.ZipFile;
public class NativeLoader { public class NativeLoader {
private final static int LIB_VERSION = 2; private final static int LIB_VERSION = 3;
private final static String LIB_NAME = "tmessages." + LIB_VERSION; private final static String LIB_NAME = "tmessages." + LIB_VERSION;
private final static String LIB_SO_NAME = "lib" + LIB_NAME + ".so"; private final static String LIB_SO_NAME = "lib" + LIB_NAME + ".so";
private final static String LOCALE_LIB_SO_NAME = "lib" + LIB_NAME + "loc.so"; private final static String LOCALE_LIB_SO_NAME = "lib" + LIB_NAME + "loc.so";
......
...@@ -108,7 +108,7 @@ public class Utilities { ...@@ -108,7 +108,7 @@ public class Utilities {
} }
public native static long doPQNative(long _what); public native static long doPQNative(long _what);
public native static void loadBitmap(String path, Bitmap bitmap, int scale); public native static void loadBitmap(String path, Bitmap bitmap, int scale, int width, int height, int stride);
public native static void blurBitmap(Object bitmap, int radius); public native static void blurBitmap(Object bitmap, int radius);
public native static int convertVideoFrame(ByteBuffer src, ByteBuffer dest, int destFormat, int width, int height, int padding, int swap); public native static int convertVideoFrame(ByteBuffer src, ByteBuffer dest, int destFormat, int width, int height, int padding, int swap);
private native static void aesIgeEncryption(ByteBuffer buffer, byte[] key, byte[] iv, boolean encrypt, int offset, int length); private native static void aesIgeEncryption(ByteBuffer buffer, byte[] key, byte[] iv, boolean encrypt, int offset, int length);
......
...@@ -284,6 +284,7 @@ public class ActionBarLayout extends FrameLayout { ...@@ -284,6 +284,7 @@ public class ActionBarLayout extends FrameLayout {
bringChildToFront(containerView); bringChildToFront(containerView);
lastFragment = fragmentsStack.get(fragmentsStack.size() - 1); lastFragment = fragmentsStack.get(fragmentsStack.size() - 1);
currentActionBar = lastFragment.actionBar;
lastFragment.onResume(); lastFragment.onResume();
} else { } else {
BaseFragment lastFragment = fragmentsStack.get(fragmentsStack.size() - 2); BaseFragment lastFragment = fragmentsStack.get(fragmentsStack.size() - 2);
...@@ -302,7 +303,7 @@ public class ActionBarLayout extends FrameLayout { ...@@ -302,7 +303,7 @@ public class ActionBarLayout extends FrameLayout {
} }
} }
containerViewBack.setVisibility(View.GONE); containerViewBack.setVisibility(View.GONE);
AndroidUtilities.unlockOrientation(parentActivity); //AndroidUtilities.unlockOrientation(parentActivity);
startedTracking = false; startedTracking = false;
animationInProgress = false; animationInProgress = false;
...@@ -345,7 +346,7 @@ public class ActionBarLayout extends FrameLayout { ...@@ -345,7 +346,7 @@ public class ActionBarLayout extends FrameLayout {
} }
lastFragment.onResume(); lastFragment.onResume();
AndroidUtilities.lockOrientation(parentActivity); //AndroidUtilities.lockOrientation(parentActivity);
} }
public boolean onTouchEvent(MotionEvent ev) { public boolean onTouchEvent(MotionEvent ev) {
......
...@@ -247,6 +247,10 @@ public class DrawerLayoutContainer extends FrameLayout { ...@@ -247,6 +247,10 @@ public class DrawerLayoutContainer extends FrameLayout {
public void setAllowOpenDrawer(boolean value) { public void setAllowOpenDrawer(boolean value) {
allowOpenDrawer = value; allowOpenDrawer = value;
if (!allowOpenDrawer && drawerPosition != 0) {
setDrawerPosition(0);
onDrawerAnimationEnd(false);
}
} }
private void prepareForDrawerOpen(MotionEvent ev) { private void prepareForDrawerOpen(MotionEvent ev) {
...@@ -287,7 +291,7 @@ public class DrawerLayoutContainer extends FrameLayout { ...@@ -287,7 +291,7 @@ public class DrawerLayoutContainer extends FrameLayout {
int dx = (int) (ev.getX() - startedTrackingX); int dx = (int) (ev.getX() - startedTrackingX);
int dy = Math.abs((int) ev.getY() - startedTrackingY); int dy = Math.abs((int) ev.getY() - startedTrackingY);
velocityTracker.addMovement(ev); velocityTracker.addMovement(ev);
if (maybeStartTracking && !startedTracking && Math.abs(dx) / 3 > Math.abs(dy)) { if (maybeStartTracking && !startedTracking && Math.abs(dx) / 3 > Math.abs(dy) && (dx < 0 || dx > 0 && dx > AndroidUtilities.dp(10))) {
prepareForDrawerOpen(ev); prepareForDrawerOpen(ev);
startedTrackingX = (int) ev.getX(); startedTrackingX = (int) ev.getX();
} else if (startedTracking) { } else if (startedTracking) {
......
...@@ -9,16 +9,15 @@ ...@@ -9,16 +9,15 @@
package org.telegram.ui.Adapters; package org.telegram.ui.Adapters;
import android.content.Context; import android.content.Context;
import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import org.telegram.android.AndroidUtilities; import org.telegram.android.AndroidUtilities;
import org.telegram.android.MessageObject; import org.telegram.android.MessageObject;
import org.telegram.android.MessagesController; import org.telegram.android.MessagesController;
import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.ui.Cells.DialogCell; import org.telegram.ui.Cells.DialogCell;
import org.telegram.ui.Cells.LoadingCell;
public class DialogsAdapter extends BaseFragmentAdapter { public class DialogsAdapter extends BaseFragmentAdapter {
...@@ -92,8 +91,7 @@ public class DialogsAdapter extends BaseFragmentAdapter { ...@@ -92,8 +91,7 @@ public class DialogsAdapter extends BaseFragmentAdapter {
int type = getItemViewType(i); int type = getItemViewType(i);
if (type == 1) { if (type == 1) {
if (view == null) { if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = new LoadingCell(mContext);
view = li.inflate(R.layout.loading_more_layout, viewGroup, false);
} }
} else if (type == 0) { } else if (type == 0) {
if (view == null) { if (view == null) {
......
...@@ -32,6 +32,7 @@ import org.telegram.messenger.UserConfig; ...@@ -32,6 +32,7 @@ import org.telegram.messenger.UserConfig;
import org.telegram.messenger.Utilities; import org.telegram.messenger.Utilities;
import org.telegram.ui.Cells.DialogCell; import org.telegram.ui.Cells.DialogCell;
import org.telegram.ui.Cells.GreySectionCell; import org.telegram.ui.Cells.GreySectionCell;
import org.telegram.ui.Cells.LoadingCell;
import org.telegram.ui.Cells.ProfileSearchCell; import org.telegram.ui.Cells.ProfileSearchCell;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -49,6 +50,8 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter { ...@@ -49,6 +50,8 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
private int lastReqId; private int lastReqId;
private MessagesActivitySearchAdapterDelegate delegate; private MessagesActivitySearchAdapterDelegate delegate;
private boolean needMessagesSearch; private boolean needMessagesSearch;
private boolean messagesSearchEndReached;
private String lastMessagesSearchString;
public static interface MessagesActivitySearchAdapterDelegate { public static interface MessagesActivitySearchAdapterDelegate {
public abstract void searchStateChanged(boolean searching); public abstract void searchStateChanged(boolean searching);
...@@ -57,13 +60,20 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter { ...@@ -57,13 +60,20 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
public DialogsSearchAdapter(Context context, boolean messagesSearch) { public DialogsSearchAdapter(Context context, boolean messagesSearch) {
mContext = context; mContext = context;
needMessagesSearch = messagesSearch; needMessagesSearch = messagesSearch;
needMessagesSearch = false;
} }
public void setDelegate(MessagesActivitySearchAdapterDelegate delegate) { public void setDelegate(MessagesActivitySearchAdapterDelegate delegate) {
this.delegate = delegate; this.delegate = delegate;
} }
public boolean isMessagesSearchEndReached() {
return messagesSearchEndReached;
}
public void loadMoreSearchMessages() {
searchMessagesInternal(lastMessagesSearchString);
}
private void searchMessagesInternal(final String query) { private void searchMessagesInternal(final String query) {
if (!needMessagesSearch) { if (!needMessagesSearch) {
return; return;
...@@ -75,16 +85,21 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter { ...@@ -75,16 +85,21 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
if (query == null || query.length() == 0) { if (query == null || query.length() == 0) {
searchResultMessages.clear(); searchResultMessages.clear();
lastReqId = 0; lastReqId = 0;
lastMessagesSearchString = null;
notifyDataSetChanged(); notifyDataSetChanged();
if (delegate != null) { if (delegate != null) {
delegate.searchStateChanged(false); delegate.searchStateChanged(false);
} }
return; return;
} }
TLRPC.TL_messages_search req = new TLRPC.TL_messages_search(); final TLRPC.TL_messages_search req = new TLRPC.TL_messages_search();
req.limit = 128; req.limit = 20;
req.peer = new TLRPC.TL_inputPeerEmpty(); req.peer = new TLRPC.TL_inputPeerEmpty();
req.q = query; req.q = query;
if (lastMessagesSearchString != null && query.equals(lastMessagesSearchString) && !searchResultMessages.isEmpty()) {
req.max_id = searchResultMessages.get(searchResultMessages.size() - 1).messageOwner.id;
}
lastMessagesSearchString = query;
req.filter = new TLRPC.TL_inputMessagesFilterEmpty(); req.filter = new TLRPC.TL_inputMessagesFilterEmpty();
final int currentReqId = ++lastReqId; final int currentReqId = ++lastReqId;
if (delegate != null) { if (delegate != null) {
...@@ -102,10 +117,13 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter { ...@@ -102,10 +117,13 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
MessagesStorage.getInstance().putUsersAndChats(res.users, res.chats, true, true); MessagesStorage.getInstance().putUsersAndChats(res.users, res.chats, true, true);
MessagesController.getInstance().putUsers(res.users, false); MessagesController.getInstance().putUsers(res.users, false);
MessagesController.getInstance().putChats(res.chats, false); MessagesController.getInstance().putChats(res.chats, false);
searchResultMessages.clear(); if (req.max_id == 0) {
searchResultMessages.clear();
}
for (TLRPC.Message message : res.messages) { for (TLRPC.Message message : res.messages) {
searchResultMessages.add(new MessageObject(message, null, 0)); searchResultMessages.add(new MessageObject(message, null, 0));
} }
messagesSearchEndReached = res.messages.size() != 20;
notifyDataSetChanged(); notifyDataSetChanged();
} }
} }
...@@ -278,7 +296,7 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter { ...@@ -278,7 +296,7 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
} }
public void searchDialogs(final String query, final boolean serverOnly) { public void searchDialogs(final String query, final boolean serverOnly) {
if (query == null && lastSearchText == null || query != null && lastSearchText != null && query.equals(lastSearchText)) { if (query != null && lastSearchText != null && query.equals(lastSearchText)) {
return; return;
} }
try { try {
...@@ -337,7 +355,7 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter { ...@@ -337,7 +355,7 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
count += globalCount + 1; count += globalCount + 1;
} }
if (messagesCount != 0) { if (messagesCount != 0) {
count += messagesCount + 1; count += messagesCount + 1 + (messagesSearchEndReached ? 0 : 1);
} }
return count; return count;
} }
...@@ -433,6 +451,10 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter { ...@@ -433,6 +451,10 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
((DialogCell) view).useSeparator = (i != getCount() - 1); ((DialogCell) view).useSeparator = (i != getCount() - 1);
MessageObject messageObject = (MessageObject)getItem(i); MessageObject messageObject = (MessageObject)getItem(i);
((DialogCell) view).setDialog(messageObject.getDialogId(), messageObject, false, messageObject.messageOwner.date, 0); ((DialogCell) view).setDialog(messageObject.getDialogId(), messageObject, false, messageObject.messageOwner.date, 0);
} else if (type == 3) {
if (view == null) {
view = new LoadingCell(mContext);
}
} }
return view; return view;
...@@ -447,13 +469,15 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter { ...@@ -447,13 +469,15 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
return 0; return 0;
} else if (i > globalCount + localCount && i < globalCount + localCount + messagesCount) { } else if (i > globalCount + localCount && i < globalCount + localCount + messagesCount) {
return 2; return 2;
} else if (messagesCount != 0 && i == globalCount + localCount + messagesCount) {
return 3;
} }
return 1; return 1;
} }
@Override @Override
public int getViewTypeCount() { public int getViewTypeCount() {
return 3; return 4;
} }
@Override @Override
......
...@@ -35,9 +35,12 @@ public class View10 extends Animation { ...@@ -35,9 +35,12 @@ public class View10 extends Animation {
public static View10 wrap(View view) { public static View10 wrap(View view) {
View10 proxy = PROXIES.get(view); View10 proxy = PROXIES.get(view);
if (proxy == null || proxy != view.getAnimation()) { Animation animation = view.getAnimation();
if (proxy == null || proxy != animation && animation != null) {
proxy = new View10(view); proxy = new View10(view);
PROXIES.put(view, proxy); PROXIES.put(view, proxy);
} else if (animation == null) {
view.setAnimation(proxy);
} }
return proxy; return proxy;
} }
......
...@@ -161,9 +161,7 @@ public class BlockedUsersActivity extends BaseFragment implements NotificationCe ...@@ -161,9 +161,7 @@ public class BlockedUsersActivity extends BaseFragment implements NotificationCe
selectedUserId = MessagesController.getInstance().blockedUsers.get(i); selectedUserId = MessagesController.getInstance().blockedUsers.get(i);
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
CharSequence[] items = new CharSequence[] {LocaleController.getString("Unblock", R.string.Unblock)}; CharSequence[] items = new CharSequence[] {LocaleController.getString("Unblock", R.string.Unblock)};
builder.setItems(items, new DialogInterface.OnClickListener() { builder.setItems(items, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void onClick(DialogInterface dialogInterface, int i) {
......
/*
* This is the source code of Telegram for Android v. 1.7.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.
*/
package org.telegram.ui.Cells;
import android.content.Context;
import android.view.Gravity;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import org.telegram.android.AndroidUtilities;
public class LoadingCell extends FrameLayout {
public LoadingCell(Context context) {
super(context);
ProgressBar progressBar = new ProgressBar(context);
addView(progressBar);
LayoutParams layoutParams = (FrameLayout.LayoutParams) progressBar.getLayoutParams();
layoutParams.width = LayoutParams.WRAP_CONTENT;
layoutParams.height = LayoutParams.WRAP_CONTENT;
layoutParams.gravity = Gravity.CENTER;
progressBar.setLayoutParams(layoutParams);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(54), MeasureSpec.EXACTLY));
}
}
...@@ -392,15 +392,19 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen ...@@ -392,15 +392,19 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
} }
if (selectedContacts.containsKey(user.id)) { if (selectedContacts.containsKey(user.id)) {
XImageSpan span = selectedContacts.get(user.id); try {
selectedContacts.remove(user.id); XImageSpan span = selectedContacts.get(user.id);
SpannableStringBuilder text = new SpannableStringBuilder(userSelectEditText.getText()); selectedContacts.remove(user.id);
text.delete(text.getSpanStart(span), text.getSpanEnd(span)); SpannableStringBuilder text = new SpannableStringBuilder(userSelectEditText.getText());
allSpans.remove(span); text.delete(text.getSpanStart(span), text.getSpanEnd(span));
ignoreChange = true; allSpans.remove(span);
userSelectEditText.setText(text); ignoreChange = true;
userSelectEditText.setSelection(text.length()); userSelectEditText.setText(text);
ignoreChange = false; userSelectEditText.setSelection(text.length());
ignoreChange = false;
} catch (Exception e) {
FileLog.e("tmessages", e);
}
} else { } else {
if (selectedContacts.size() == maxCount) { if (selectedContacts.size() == maxCount) {
return; return;
......
...@@ -46,6 +46,7 @@ import org.telegram.ui.Views.AvatarDrawable; ...@@ -46,6 +46,7 @@ import org.telegram.ui.Views.AvatarDrawable;
import org.telegram.ui.Views.AvatarUpdater; import org.telegram.ui.Views.AvatarUpdater;
import org.telegram.ui.Views.BackupImageView; import org.telegram.ui.Views.BackupImageView;
import org.telegram.ui.ActionBar.BaseFragment; import org.telegram.ui.ActionBar.BaseFragment;
import org.telegram.ui.Views.FrameLayoutFixed;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.concurrent.Semaphore; import java.util.concurrent.Semaphore;
...@@ -200,11 +201,12 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati ...@@ -200,11 +201,12 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
LinearLayout linearLayout = (LinearLayout) fragmentView; LinearLayout linearLayout = (LinearLayout) fragmentView;
linearLayout.setOrientation(LinearLayout.VERTICAL); linearLayout.setOrientation(LinearLayout.VERTICAL);
FrameLayout frameLayout = new FrameLayout(getParentActivity()); FrameLayout frameLayout = new FrameLayoutFixed(getParentActivity());
linearLayout.addView(frameLayout); linearLayout.addView(frameLayout);
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) frameLayout.getLayoutParams(); LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) frameLayout.getLayoutParams();
layoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT; layoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = LinearLayout.LayoutParams.WRAP_CONTENT; layoutParams.height = LinearLayout.LayoutParams.WRAP_CONTENT;
layoutParams.gravity = Gravity.TOP | Gravity.LEFT;
frameLayout.setLayoutParams(layoutParams); frameLayout.setLayoutParams(layoutParams);
avatarImage = new BackupImageView(getParentActivity()); avatarImage = new BackupImageView(getParentActivity());
...@@ -217,7 +219,9 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati ...@@ -217,7 +219,9 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
layoutParams1.height = AndroidUtilities.dp(64); layoutParams1.height = AndroidUtilities.dp(64);
layoutParams1.topMargin = AndroidUtilities.dp(12); layoutParams1.topMargin = AndroidUtilities.dp(12);
layoutParams1.bottomMargin = AndroidUtilities.dp(12); layoutParams1.bottomMargin = AndroidUtilities.dp(12);
layoutParams1.leftMargin = AndroidUtilities.dp(16); layoutParams1.leftMargin = LocaleController.isRTL ? 0 : AndroidUtilities.dp(16);
layoutParams1.rightMargin = LocaleController.isRTL ? AndroidUtilities.dp(16) : 0;
layoutParams1.gravity = Gravity.TOP | (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
avatarImage.setLayoutParams(layoutParams1); avatarImage.setLayoutParams(layoutParams1);
if (!isBroadcast) { if (!isBroadcast) {
avatarDrawable.setDrawPhoto(true); avatarDrawable.setDrawPhoto(true);
...@@ -263,7 +267,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati ...@@ -263,7 +267,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
nameToSet = null; nameToSet = null;
} }
nameTextView.setMaxLines(4); nameTextView.setMaxLines(4);
nameTextView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT); nameTextView.setGravity(Gravity.CENTER_VERTICAL | (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT));
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
nameTextView.setHintTextColor(0xff979797); nameTextView.setHintTextColor(0xff979797);
nameTextView.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI); nameTextView.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
...@@ -275,8 +279,8 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati ...@@ -275,8 +279,8 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
layoutParams1 = (FrameLayout.LayoutParams) nameTextView.getLayoutParams(); layoutParams1 = (FrameLayout.LayoutParams) nameTextView.getLayoutParams();
layoutParams1.width = FrameLayout.LayoutParams.MATCH_PARENT; layoutParams1.width = FrameLayout.LayoutParams.MATCH_PARENT;
layoutParams1.height = FrameLayout.LayoutParams.WRAP_CONTENT; layoutParams1.height = FrameLayout.LayoutParams.WRAP_CONTENT;
layoutParams1.leftMargin = AndroidUtilities.dp(96); layoutParams1.leftMargin = LocaleController.isRTL ? AndroidUtilities.dp(16) : AndroidUtilities.dp(96);
layoutParams1.rightMargin = AndroidUtilities.dp(16); layoutParams1.rightMargin = LocaleController.isRTL ? AndroidUtilities.dp(96) : AndroidUtilities.dp(16);
layoutParams1.gravity = Gravity.CENTER_VERTICAL; layoutParams1.gravity = Gravity.CENTER_VERTICAL;
nameTextView.setLayoutParams(layoutParams1); nameTextView.setLayoutParams(layoutParams1);
if (!isBroadcast) { if (!isBroadcast) {
......
...@@ -648,9 +648,15 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa ...@@ -648,9 +648,15 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
actionBarLayout.showLastFragment(); actionBarLayout.showLastFragment();
rightActionBarLayout.showLastFragment(); rightActionBarLayout.showLastFragment();
} }
drawerLayoutContainer.setAllowOpenDrawer(false);
} }
if (open_settings != 0) { if (open_settings != 0) {
actionBarLayout.presentFragment(new SettingsActivity(), false, true, true); actionBarLayout.presentFragment(new SettingsActivity(), false, true, true);
drawerLayoutContainer.setAllowOpenDrawer(false);
if (AndroidUtilities.isTablet()) {
layersActionBarLayout.showLastFragment();
rightActionBarLayout.showLastFragment();
}
pushOpened = true; pushOpened = true;
} }
if (!pushOpened && !isNew) { if (!pushOpened && !isNew) {
...@@ -1280,5 +1286,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa ...@@ -1280,5 +1286,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
actionBarLayout.showLastFragment(); actionBarLayout.showLastFragment();
} }
} }
drawerLayoutAdapter.notifyDataSetChanged();
} }
} }
...@@ -447,6 +447,9 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter ...@@ -447,6 +447,9 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
@Override @Override
public void onScroll(AbsListView absListView, int firstVisibleItem, int visibleItemCount, int totalItemCount) { public void onScroll(AbsListView absListView, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
if (searching && searchWas) { if (searching && searchWas) {
if (visibleItemCount > 0 && absListView.getLastVisiblePosition() == totalItemCount - 1 && !dialogsSearchAdapter.isMessagesSearchEndReached()) {
dialogsSearchAdapter.loadMoreSearchMessages();
}
return; return;
} }
if (visibleItemCount > 0) { if (visibleItemCount > 0) {
...@@ -507,6 +510,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter ...@@ -507,6 +510,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
@Override @Override
public void onGlobalLayout() { public void onGlobalLayout() {
ViewProxy.setTranslationY(floatingButton, floatingHidden ? AndroidUtilities.dp(100) : 0); ViewProxy.setTranslationY(floatingButton, floatingHidden ? AndroidUtilities.dp(100) : 0);
floatingButton.setClickable(!floatingHidden);
if (floatingButton != null) { if (floatingButton != null) {
if (Build.VERSION.SDK_INT < 16) { if (Build.VERSION.SDK_INT < 16) {
floatingButton.getViewTreeObserver().removeGlobalOnLayoutListener(this); floatingButton.getViewTreeObserver().removeGlobalOnLayoutListener(this);
...@@ -578,6 +582,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter ...@@ -578,6 +582,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
floatingHidden = hide; floatingHidden = hide;
ObjectAnimatorProxy animator = ObjectAnimatorProxy.ofFloatProxy(floatingButton, "translationY", floatingHidden ? AndroidUtilities.dp(100) : 0).setDuration(300); ObjectAnimatorProxy animator = ObjectAnimatorProxy.ofFloatProxy(floatingButton, "translationY", floatingHidden ? AndroidUtilities.dp(100) : 0).setDuration(300);
animator.setInterpolator(floatingInterpolator); animator.setInterpolator(floatingInterpolator);
floatingButton.setClickable(!hide);
animator.start(); animator.start();
} }
......
...@@ -146,7 +146,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -146,7 +146,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
private long animationDuration; private long animationDuration;
private long animationStartTime; private long animationStartTime;
private GestureDetector gestureDetector; private GestureDetector gestureDetector;
private DecelerateInterpolator interpolator = new DecelerateInterpolator(); private DecelerateInterpolator interpolator = new DecelerateInterpolator(1.5f);
private float pinchStartDistance = 0; private float pinchStartDistance = 0;
private float pinchStartScale = 1; private float pinchStartScale = 1;
private float pinchCenterX; private float pinchCenterX;
...@@ -247,14 +247,6 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -247,14 +247,6 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
} }
} }
public float getRadOffset() {
return radOffset;
}
public void setRadOffset(float value) {
radOffset = value;
}
public void setProgress(float value, boolean animated) { public void setProgress(float value, boolean animated) {
if (!animated) { if (!animated) {
animatedProgressValue = value; animatedProgressValue = value;
...@@ -1396,26 +1388,39 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -1396,26 +1388,39 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
setIndexToImage(centerImage, currentIndex); setIndexToImage(centerImage, currentIndex);
setIndexToImage(rightImage, currentIndex + 1); setIndexToImage(rightImage, currentIndex + 1);
setIndexToImage(leftImage, currentIndex - 1); setIndexToImage(leftImage, currentIndex - 1);
for (int a = 0; a < 3; a++) {
checkProgress(a, false);
}
} else { } else {
checkProgress(0, false);
if (prevIndex > currentIndex) { if (prevIndex > currentIndex) {
ImageReceiver temp = rightImage; ImageReceiver temp = rightImage;
rightImage = centerImage; rightImage = centerImage;
centerImage = leftImage; centerImage = leftImage;
leftImage = temp; leftImage = temp;
RadialProgressView tempProgress = radialProgressViews[0];
radialProgressViews[0] = radialProgressViews[2];
radialProgressViews[2] = tempProgress;
setIndexToImage(leftImage, currentIndex - 1); setIndexToImage(leftImage, currentIndex - 1);
radialProgressViews[0].setRadOffset(radialProgressViews[2].getRadOffset());
checkProgress(1, false);
checkProgress(2, false);
} else if (prevIndex < currentIndex) { } else if (prevIndex < currentIndex) {
ImageReceiver temp = leftImage; ImageReceiver temp = leftImage;
leftImage = centerImage; leftImage = centerImage;
centerImage = rightImage; centerImage = rightImage;
rightImage = temp; rightImage = temp;
radialProgressViews[0].setRadOffset(radialProgressViews[1].getRadOffset());
RadialProgressView tempProgress = radialProgressViews[0];
radialProgressViews[0] = radialProgressViews[1];
radialProgressViews[1] = tempProgress;
setIndexToImage(rightImage, currentIndex + 1); setIndexToImage(rightImage, currentIndex + 1);
}
}
for (int a = 0; a < 3; a++) { checkProgress(1, false);
checkProgress(a, false); checkProgress(2, false);
}
} }
} }
...@@ -1970,23 +1975,25 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -1970,23 +1975,25 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
if (animationStartTime == 0) { if (animationStartTime == 0) {
AndroidUtilities.unlockOrientation(parentActivity); AndroidUtilities.unlockOrientation(parentActivity);
} }
return false; //return false;
} }
if(ev.getPointerCount() == 1 && gestureDetector.onTouchEvent(ev) && doubleTap) { if(ev.getPointerCount() == 1 && gestureDetector.onTouchEvent(ev) && doubleTap) {
doubleTap = false; doubleTap = false;
moving = false; moving = false;
zooming = false; zooming = false;
checkMinMax(false); if (animationInProgress == 0 && animationStartTime == 0) {
return true; checkMinMax(false);
return true;
}
} }
if (ev.getActionMasked() == MotionEvent.ACTION_DOWN || ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) { if (ev.getActionMasked() == MotionEvent.ACTION_DOWN || ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) {
if (!scroller.isFinished()) { if (!scroller.isFinished()) {
scroller.abortAnimation(); scroller.abortAnimation();
} }
if (!draggingDown && !changingPage) { if (!draggingDown) {
if (canZoom && ev.getPointerCount() == 2) { if (canZoom && ev.getPointerCount() == 2 && !changingPage) {
pinchStartDistance = (float) Math.hypot(ev.getX(1) - ev.getX(0), ev.getY(1) - ev.getY(0)); pinchStartDistance = (float) Math.hypot(ev.getX(1) - ev.getX(0), ev.getY(1) - ev.getY(0));
pinchStartScale = scale; pinchStartScale = scale;
pinchCenterX = (ev.getX(0) + ev.getX(1)) / 2.0f; pinchCenterX = (ev.getX(0) + ev.getX(1)) / 2.0f;
...@@ -2033,7 +2040,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -2033,7 +2040,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
} else if (draggingDown) { } else if (draggingDown) {
translationY = ev.getY() - dragY; translationY = ev.getY() - dragY;
containerView.invalidate(); containerView.invalidate();
} else if (!invalidCoords && animationStartTime == 0) { } else if (!invalidCoords/* && animationStartTime == 0*/) {
float moveDx = moveStartX - ev.getX(); float moveDx = moveStartX - ev.getX();
float moveDy = moveStartY - ev.getY(); float moveDy = moveStartY - ev.getY();
if (moving || scale == 1 && Math.abs(moveDy) + AndroidUtilities.dp(12) < Math.abs(moveDx) || scale != 1) { if (moving || scale == 1 && Math.abs(moveDy) + AndroidUtilities.dp(12) < Math.abs(moveDx) || scale != 1) {
...@@ -2217,7 +2224,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -2217,7 +2224,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
float ai = -1; float ai = -1;
if (System.currentTimeMillis() - animationStartTime < animationDuration) { if (System.currentTimeMillis() - animationStartTime < animationDuration) {
ai = interpolator.getInterpolation((float)(System.currentTimeMillis() - animationStartTime) / animationDuration); ai = interpolator.getInterpolation((float)(System.currentTimeMillis() - animationStartTime) / animationDuration);
if (ai >= 0.95f) { if (ai >= 0.99f) {
ai = -1; ai = -1;
} }
} }
...@@ -2478,7 +2485,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -2478,7 +2485,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
if (!canZoom || scale == 1.0f && (translationY != 0 || translationX != 0)) { if (!canZoom || scale == 1.0f && (translationY != 0 || translationX != 0)) {
return false; return false;
} }
if (animationStartTime != 0) { if (animationStartTime != 0 || animationInProgress != 0) {
return false; return false;
} }
if (scale == 1.0f) { if (scale == 1.0f) {
......
...@@ -178,6 +178,16 @@ public class PopupNotificationActivity extends Activity implements NotificationC ...@@ -178,6 +178,16 @@ public class PopupNotificationActivity extends Activity implements NotificationC
MessagesController.getInstance().sendTyping(currentMessageObject.getDialogId(), classGuid); MessagesController.getInstance().sendTyping(currentMessageObject.getDialogId(), classGuid);
} }
} }
@Override
public void onAttachButtonHidden() {
}
@Override
public void onAttachButtonShow() {
}
}); });
setContentView(R.layout.popup_notification_layout); setContentView(R.layout.popup_notification_layout);
......
...@@ -618,20 +618,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. ...@@ -618,20 +618,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
@Override @Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
if (totalItemCount == 0) { checkListViewScroll();
return;
}
int height = 0;
View child = view.getChildAt(0);
if (child != null) {
if (firstVisibleItem == 0) {
height = AndroidUtilities.dp(88) + child.getTop();
}
if (actionBar.getExtraHeight() != height) {
actionBar.setExtraHeight(height, true);
needLayout();
}
}
} }
}); });
...@@ -671,6 +658,23 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. ...@@ -671,6 +658,23 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
} }
} }
private void checkListViewScroll() {
if (listView.getChildCount() == 0) {
return;
}
int height = 0;
View child = listView.getChildAt(0);
if (child != null) {
if (listView.getFirstVisiblePosition() == 0) {
height = AndroidUtilities.dp(88) + (child.getTop() < 0 ? child.getTop() : 0);
}
if (actionBar.getExtraHeight() != height) {
actionBar.setExtraHeight(height, true);
needLayout();
}
}
}
private void needLayout() { private void needLayout() {
FrameLayout.LayoutParams layoutParams; FrameLayout.LayoutParams layoutParams;
if (listView != null) { if (listView != null) {
...@@ -697,8 +701,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. ...@@ -697,8 +701,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
layoutParams.topMargin = (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + AndroidUtilities.getCurrentActionBarHeight() + actionBar.getExtraHeight() - AndroidUtilities.dp(29.5f); layoutParams.topMargin = (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + AndroidUtilities.getCurrentActionBarHeight() + actionBar.getExtraHeight() - AndroidUtilities.dp(29.5f);
writeButton.setLayoutParams(layoutParams); writeButton.setLayoutParams(layoutParams);
ViewProxy.setAlpha(writeButton, diff); ViewProxy.setAlpha(writeButton, diff);
writeButton.setEnabled(diff > 0.02);
writeButton.setVisibility(diff <= 0.02 ? View.GONE : View.VISIBLE); writeButton.setVisibility(diff <= 0.02 ? View.GONE : View.VISIBLE);
if (writeButton.getVisibility() == View.GONE) {
writeButton.clearAnimation();
}
} }
avatarImage.imageReceiver.setRoundRadius(AndroidUtilities.dp(avatarSize / 2)); avatarImage.imageReceiver.setRoundRadius(AndroidUtilities.dp(avatarSize / 2));
...@@ -815,6 +821,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. ...@@ -815,6 +821,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
updateRowsIds(); updateRowsIds();
if (listAdapter != null) { if (listAdapter != null) {
listAdapter.notifyDataSetChanged(); listAdapter.notifyDataSetChanged();
checkListViewScroll();
} }
} }
} else if (id == NotificationCenter.blockedUsersDidLoaded) { } else if (id == NotificationCenter.blockedUsersDidLoaded) {
...@@ -831,6 +838,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. ...@@ -831,6 +838,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
updateRowsIds(); updateRowsIds();
if (listAdapter != null) { if (listAdapter != null) {
listAdapter.notifyDataSetChanged(); listAdapter.notifyDataSetChanged();
checkListViewScroll();
} }
} }
} else if (id == NotificationCenter.closeChats) { } else if (id == NotificationCenter.closeChats) {
......
...@@ -373,7 +373,6 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter ...@@ -373,7 +373,6 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
listView = new ListView(getParentActivity()); listView = new ListView(getParentActivity());
listView.setDivider(null); listView.setDivider(null);
listView.setDrawingCacheEnabled(false);
listView.setDividerHeight(0); listView.setDividerHeight(0);
listView.setVerticalScrollBarEnabled(false); listView.setVerticalScrollBarEnabled(false);
AndroidUtilities.setListViewEdgeEffectColor(listView, AvatarDrawable.getProfileBackColorForId(5)); AndroidUtilities.setListViewEdgeEffectColor(listView, AvatarDrawable.getProfileBackColorForId(5));
...@@ -659,7 +658,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter ...@@ -659,7 +658,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
View child = view.getChildAt(0); View child = view.getChildAt(0);
if (child != null) { if (child != null) {
if (firstVisibleItem == 0) { if (firstVisibleItem == 0) {
height = AndroidUtilities.dp(88) + child.getTop(); height = AndroidUtilities.dp(88) + (child.getTop() < 0 ? child.getTop() : 0);
} }
if (actionBar.getExtraHeight() != height) { if (actionBar.getExtraHeight() != height) {
actionBar.setExtraHeight(height, true); actionBar.setExtraHeight(height, true);
...@@ -885,8 +884,10 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter ...@@ -885,8 +884,10 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
layoutParams.topMargin = (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + AndroidUtilities.getCurrentActionBarHeight() + actionBar.getExtraHeight() - AndroidUtilities.dp(29.5f); layoutParams.topMargin = (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + AndroidUtilities.getCurrentActionBarHeight() + actionBar.getExtraHeight() - AndroidUtilities.dp(29.5f);
writeButton.setLayoutParams(layoutParams); writeButton.setLayoutParams(layoutParams);
ViewProxy.setAlpha(writeButton, diff); ViewProxy.setAlpha(writeButton, diff);
writeButton.setEnabled(diff > 0.02);
writeButton.setVisibility(diff <= 0.02 ? View.GONE : View.VISIBLE); writeButton.setVisibility(diff <= 0.02 ? View.GONE : View.VISIBLE);
if (writeButton.getVisibility() == View.GONE) {
writeButton.clearAnimation();
}
avatarImage.imageReceiver.setRoundRadius(AndroidUtilities.dp(avatarSize / 2)); avatarImage.imageReceiver.setRoundRadius(AndroidUtilities.dp(avatarSize / 2));
layoutParams = (FrameLayout.LayoutParams) avatarImage.getLayoutParams(); layoutParams = (FrameLayout.LayoutParams) avatarImage.getLayoutParams();
...@@ -936,7 +937,9 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter ...@@ -936,7 +937,9 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
photo = user.photo.photo_small; photo = user.photo.photo_small;
photoBig = user.photo.photo_big; photoBig = user.photo.photo_big;
} }
avatarImage.setImage(photo, "50_50", new AvatarDrawable(user, true)); AvatarDrawable avatarDrawable = new AvatarDrawable(user, true);
avatarDrawable.setColor(0xff5c98cd);
avatarImage.setImage(photo, "50_50", avatarDrawable);
avatarImage.imageReceiver.setVisible(!PhotoViewer.getInstance().isShowingImage(photoBig), false); avatarImage.imageReceiver.setVisible(!PhotoViewer.getInstance().isShowingImage(photoBig), false);
nameTextView.setText(ContactsController.formatName(user.first_name, user.last_name)); nameTextView.setText(ContactsController.formatName(user.first_name, user.last_name));
......
...@@ -54,6 +54,8 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -54,6 +54,8 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
public static interface ChatActivityEnterViewDelegate { public static interface ChatActivityEnterViewDelegate {
public abstract void onMessageSend(); public abstract void onMessageSend();
public abstract void needSendTyping(); public abstract void needSendTyping();
public abstract void onAttachButtonHidden();
public abstract void onAttachButtonShow();
} }
private EditText messsageEditText; private EditText messsageEditText;
...@@ -136,6 +138,9 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -136,6 +138,9 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
attachButton = (FrameLayout) containerView.findViewById(R.id.chat_attach_button); attachButton = (FrameLayout) containerView.findViewById(R.id.chat_attach_button);
if (attachButton != null) { if (attachButton != null) {
ViewProxy.setPivotX(attachButton, AndroidUtilities.dp(48)); ViewProxy.setPivotX(attachButton, AndroidUtilities.dp(48));
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
layoutParams.rightMargin = AndroidUtilities.dp(50);
messsageEditText.setLayoutParams(layoutParams);
} }
sendButton = (ImageButton) containerView.findViewById(R.id.chat_send_button); sendButton = (ImageButton) containerView.findViewById(R.id.chat_send_button);
...@@ -380,14 +385,17 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -380,14 +385,17 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
public void onAnimationEnd(Object animation) { public void onAnimationEnd(Object animation) {
if (runningAnimation2.equals(animation)) { if (runningAnimation2.equals(animation)) {
attachButton.setVisibility(View.GONE); attachButton.setVisibility(View.GONE);
attachButton.clearAnimation();
} }
} }
}); });
runningAnimation2.start(); runningAnimation2.start();
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams(); FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
layoutParams.rightMargin = AndroidUtilities.dp(2); layoutParams.rightMargin = AndroidUtilities.dp(0);
messsageEditText.setLayoutParams(layoutParams); messsageEditText.setLayoutParams(layoutParams);
delegate.onAttachButtonHidden();
} }
sendButton.setVisibility(View.VISIBLE); sendButton.setVisibility(View.VISIBLE);
...@@ -409,7 +417,8 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -409,7 +417,8 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
public void onAnimationEnd(Object animation) { public void onAnimationEnd(Object animation) {
if (runningAnimation.equals(animation)) { if (runningAnimation.equals(animation)) {
sendButton.setVisibility(View.VISIBLE); sendButton.setVisibility(View.VISIBLE);
audioSendButton.setVisibility(View.INVISIBLE); audioSendButton.setVisibility(View.GONE);
audioSendButton.clearAnimation();
runningAnimation = null; runningAnimation = null;
runningAnimationType = 0; runningAnimationType = 0;
} }
...@@ -424,9 +433,15 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -424,9 +433,15 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
ViewProxy.setScaleY(sendButton, 1.0f); ViewProxy.setScaleY(sendButton, 1.0f);
ViewProxy.setAlpha(sendButton, 1.0f); ViewProxy.setAlpha(sendButton, 1.0f);
sendButton.setVisibility(View.VISIBLE); sendButton.setVisibility(View.VISIBLE);
audioSendButton.setVisibility(View.INVISIBLE); audioSendButton.setVisibility(View.GONE);
audioSendButton.clearAnimation();
if (attachButton != null) { if (attachButton != null) {
attachButton.setVisibility(View.GONE); attachButton.setVisibility(View.GONE);
attachButton.clearAnimation();
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
layoutParams.rightMargin = AndroidUtilities.dp(0);
messsageEditText.setLayoutParams(layoutParams);
} }
} }
} }
...@@ -456,8 +471,10 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -456,8 +471,10 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
runningAnimation2.start(); runningAnimation2.start();
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams(); FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
layoutParams.rightMargin = AndroidUtilities.dp(2); layoutParams.rightMargin = AndroidUtilities.dp(50);
messsageEditText.setLayoutParams(layoutParams); messsageEditText.setLayoutParams(layoutParams);
delegate.onAttachButtonShow();
} }
audioSendButton.setVisibility(View.VISIBLE); audioSendButton.setVisibility(View.VISIBLE);
...@@ -478,7 +495,8 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -478,7 +495,8 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
@Override @Override
public void onAnimationEnd(Object animation) { public void onAnimationEnd(Object animation) {
if (runningAnimation.equals(animation)) { if (runningAnimation.equals(animation)) {
sendButton.setVisibility(View.INVISIBLE); sendButton.setVisibility(View.GONE);
sendButton.clearAnimation();
audioSendButton.setVisibility(View.VISIBLE); audioSendButton.setVisibility(View.VISIBLE);
runningAnimation = null; runningAnimation = null;
runningAnimationType = 0; runningAnimationType = 0;
...@@ -493,10 +511,14 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -493,10 +511,14 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
ViewProxy.setScaleX(audioSendButton, 1.0f); ViewProxy.setScaleX(audioSendButton, 1.0f);
ViewProxy.setScaleY(audioSendButton, 1.0f); ViewProxy.setScaleY(audioSendButton, 1.0f);
ViewProxy.setAlpha(audioSendButton, 1.0f); ViewProxy.setAlpha(audioSendButton, 1.0f);
sendButton.setVisibility(View.INVISIBLE); sendButton.setVisibility(View.GONE);
sendButton.clearAnimation();
audioSendButton.setVisibility(View.VISIBLE); audioSendButton.setVisibility(View.VISIBLE);
if (attachButton != null) { if (attachButton != null) {
attachButton.setVisibility(View.VISIBLE); attachButton.setVisibility(View.VISIBLE);
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
layoutParams.rightMargin = AndroidUtilities.dp(50);
messsageEditText.setLayoutParams(layoutParams);
} }
} }
} }
......
...@@ -17,6 +17,7 @@ import android.widget.AbsListView; ...@@ -17,6 +17,7 @@ import android.widget.AbsListView;
import android.widget.ListAdapter; import android.widget.ListAdapter;
import android.widget.ListView; import android.widget.ListView;
import org.telegram.android.LocaleController;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.ui.Adapters.BaseSectionsAdapter; import org.telegram.ui.Adapters.BaseSectionsAdapter;
...@@ -181,7 +182,7 @@ public class SectionsListView extends ListView implements AbsListView.OnScrollLi ...@@ -181,7 +182,7 @@ public class SectionsListView extends ListView implements AbsListView.OnScrollLi
for (View header : headers) { for (View header : headers) {
int saveCount = canvas.save(); int saveCount = canvas.save();
int top = (Integer)header.getTag(); int top = (Integer)header.getTag();
canvas.translate(0, top); canvas.translate(LocaleController.isRTL ? getWidth() - header.getWidth() : 0, top);
canvas.clipRect(0, 0, getWidth(), header.getMeasuredHeight()); canvas.clipRect(0, 0, getWidth(), header.getMeasuredHeight());
if (top < 0) { if (top < 0) {
canvas.saveLayerAlpha(0, top, header.getWidth(), top + canvas.getHeight(), (int)(255 * (1.0f + (float)top / (float)header.getMeasuredHeight())), Canvas.HAS_ALPHA_LAYER_SAVE_FLAG); canvas.saveLayerAlpha(0, top, header.getWidth(), top + canvas.getHeight(), (int)(255 * (1.0f + (float)top / (float)header.getMeasuredHeight())), Canvas.HAS_ALPHA_LAYER_SAVE_FLAG);
......
...@@ -297,7 +297,11 @@ public class WallpapersActivity extends BaseFragment implements NotificationCent ...@@ -297,7 +297,11 @@ public class WallpapersActivity extends BaseFragment implements NotificationCent
loadingFileObject = null; loadingFileObject = null;
loadingFile = null; loadingFile = null;
loadingSize = null; loadingSize = null;
backgroundImage.setImageURI(Uri.fromFile(f)); try {
backgroundImage.setImageURI(Uri.fromFile(f));
} catch (Throwable e) {
FileLog.e("tmessages", e);
}
backgroundImage.setBackgroundColor(0); backgroundImage.setBackgroundColor(0);
selectedColor = 0; selectedColor = 0;
doneButton.setEnabled(true); doneButton.setEnabled(true);
......
TMessagesProj/src/main/res/drawable-hdpi/ic_launcher.png

5.43 KB | W: | H:

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

4.96 KB | W: | H:

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

3.54 KB | W: | H:

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

3.32 KB | W: | H:

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

5.36 KB | W: | H:

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

6.22 KB | W: | H:

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

8.81 KB | W: | H:

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

9.67 KB | W: | H:

TMessagesProj/src/main/res/drawable-xxhdpi/ic_launcher.png
TMessagesProj/src/main/res/drawable-xxhdpi/ic_launcher.png
TMessagesProj/src/main/res/drawable-xxhdpi/ic_launcher.png
TMessagesProj/src/main/res/drawable-xxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
android:background="@drawable/compose_panel" android:background="@drawable/compose_panel"
android:orientation="horizontal"> android:orientation="horizontal">
<FrameLayout <org.telegram.ui.Views.FrameLayoutFixed
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"> android:layout_weight="1">
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
</org.telegram.ui.Views.FrameLayoutFixed> </org.telegram.ui.Views.FrameLayoutFixed>
</FrameLayout> </org.telegram.ui.Views.FrameLayoutFixed>
<FrameLayout <FrameLayout
android:layout_width="48dp" android:layout_width="48dp"
......
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:padding="6dp"
android:id="@+id/progress">
</ProgressBar>
</RelativeLayout>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
android:background="@drawable/compose_panel" android:background="@drawable/compose_panel"
android:orientation="horizontal"> android:orientation="horizontal">
<FrameLayout <org.telegram.ui.Views.FrameLayoutFixed
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"> android:layout_weight="1">
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
</org.telegram.ui.Views.FrameLayoutFixed> </org.telegram.ui.Views.FrameLayoutFixed>
</FrameLayout> </org.telegram.ui.Views.FrameLayoutFixed>
<FrameLayout <FrameLayout
android:layout_width="48dp" android:layout_width="48dp"
......
...@@ -143,6 +143,7 @@ ...@@ -143,6 +143,7 @@
<string name="ReplyToUser">Responder a %1$s</string> <string name="ReplyToUser">Responder a %1$s</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string> <string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view--> <!--contacts view-->
<string name="NewMessageTitle">Nuevo mensaje</string>
<string name="SelectContact">Elegir contacto</string> <string name="SelectContact">Elegir contacto</string>
<string name="NoContacts">Aún sin contactos</string> <string name="NoContacts">Aún sin contactos</string>
<string name="InviteText">Oye, cambiémonos a Telegram: http://telegram.org/dl2</string> <string name="InviteText">Oye, cambiémonos a Telegram: http://telegram.org/dl2</string>
...@@ -308,7 +309,7 @@ ...@@ -308,7 +309,7 @@
<string name="LastSeenHelp">Elige quién puede ver tu última conexión.</string> <string name="LastSeenHelp">Elige quién puede ver tu última conexión.</string>
<string name="LastSeenTitle">¿Quién puede ver tu última conexión?</string> <string name="LastSeenTitle">¿Quién puede ver tu última conexión?</string>
<string name="AddExceptions">Añadir excepciones</string> <string name="AddExceptions">Añadir excepciones</string>
<string name="CustomHelp">Importante: no podrás ver la última conexión de las personas con las que no compartes la tuya. En su lugar, se mostrarán conexiones indeterminadas (recientemente, hace unos días, hace unas semanas).</string> <string name="CustomHelp">Importante: No podrás ver la última conexión de las personas con las que no compartes la tuya. En su lugar, se mostrarán conexiones indeterminadas (recientemente, hace unos días, hace unas semanas).</string>
<string name="AlwaysShareWith">Compartir siempre con</string> <string name="AlwaysShareWith">Compartir siempre con</string>
<string name="NeverShareWith">Nunca compartir con</string> <string name="NeverShareWith">Nunca compartir con</string>
<string name="CustomShareSettingsHelp">Estos ajustes anularán los valores de arriba.</string> <string name="CustomShareSettingsHelp">Estos ajustes anularán los valores de arriba.</string>
...@@ -399,6 +400,7 @@ ...@@ -399,6 +400,7 @@
<string name="AreYouSureSecretChat">¿Quieres iniciar un chat secreto?</string> <string name="AreYouSureSecretChat">¿Quieres iniciar un chat secreto?</string>
<string name="AreYouSureRegistration">¿Quieres cancelar el registro?</string> <string name="AreYouSureRegistration">¿Quieres cancelar el registro?</string>
<string name="AreYouSureClearHistory">¿Quieres eliminar el historial?</string> <string name="AreYouSureClearHistory">¿Quieres eliminar el historial?</string>
<string name="AreYouSureDeleteMessages">¿Quieres eliminar %1$s?</string>
<string name="SendMessagesToGroup">¿Enviar mensajes a %1$s?</string> <string name="SendMessagesToGroup">¿Enviar mensajes a %1$s?</string>
<string name="ForwardMessagesToGroup">¿Reenviar mensajes a %1$s?</string> <string name="ForwardMessagesToGroup">¿Reenviar mensajes a %1$s?</string>
<string name="FeatureUnavailable">Lo siento, esta característica no está disponible en tu país actualmente.</string> <string name="FeatureUnavailable">Lo siento, esta característica no está disponible en tu país actualmente.</string>
......
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