1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-12-18 03:59:43 +01:00

Bug fixes

This commit is contained in:
DrKLO 2014-11-21 03:14:44 +03:00
parent a38e46cd8b
commit baed4120bc
26 changed files with 444 additions and 85 deletions

View File

@ -80,7 +80,7 @@ android {
defaultConfig {
minSdkVersion 8
targetSdkVersion 21
versionCode 392
versionCode 393
versionName "2.0.3"
}
}

View File

@ -791,6 +791,11 @@ public class LocaleController {
user.status.expires = -102;
}
}
if (user != null && user.status != null && user.status.expires <= 0) {
if (MessagesController.getInstance().onlinePrivacy.containsKey(user.id)) {
return getString("Online", R.string.Online);
}
}
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);
} else {

View File

@ -52,9 +52,10 @@ public class MessagesController implements NotificationCenter.NotificationCenter
public ArrayList<TLRPC.TL_dialog> dialogsServerOnly = new ArrayList<TLRPC.TL_dialog>();
public ConcurrentHashMap<Long, TLRPC.TL_dialog> dialogs_dict = new ConcurrentHashMap<Long, TLRPC.TL_dialog>(100, 1.0f, 2);
public HashMap<Integer, MessageObject> dialogMessage = new HashMap<Integer, MessageObject>();
public ConcurrentHashMap<Long, ArrayList<PrintingUser>> printingUsers = new ConcurrentHashMap<Long, ArrayList<PrintingUser>>(100, 1.0f, 2);
public ConcurrentHashMap<Long, ArrayList<PrintingUser>> printingUsers = new ConcurrentHashMap<Long, ArrayList<PrintingUser>>(20, 1.0f, 2);
public HashMap<Long, CharSequence> printingStrings = new HashMap<Long, CharSequence>();
public HashMap<Long, Boolean> sendingTypings = new HashMap<Long, Boolean>();
public ConcurrentHashMap<Integer, Integer> onlinePrivacy = new ConcurrentHashMap<Integer, Integer>(20, 1.0f, 2);
private int lastPrintingStringCount = 0;
public boolean loadingBlockedUsers = false;
@ -316,6 +317,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
dialogMessage.clear();
printingUsers.clear();
printingStrings.clear();
onlinePrivacy.clear();
totalDialogsCount = 0;
lastPrintingStringCount = 0;
updatesQueue.clear();
@ -1068,15 +1070,17 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (offset == 0) {
TLRPC.TL_dialog dialog = dialogs_dict.get(did);
if (!onlyHistory) {
dialogs.remove(dialog);
dialogsServerOnly.remove(dialog);
dialogs_dict.remove(did);
totalDialogsCount--;
} else {
dialog.unread_count = 0;
if (dialog != null) {
if (!onlyHistory) {
dialogs.remove(dialog);
dialogsServerOnly.remove(dialog);
dialogs_dict.remove(did);
totalDialogsCount--;
} else {
dialog.unread_count = 0;
}
dialogMessage.remove(dialog.top_message);
}
dialogMessage.remove(dialog.top_message);
MessagesStorage.getInstance().getStorageQueue().postRunnable(new Runnable() {
@Override
public void run() {
@ -1214,6 +1218,29 @@ public class MessagesController implements NotificationCenter.NotificationCenter
processUpdatesQueue(0);
}
}
if (!onlinePrivacy.isEmpty()) {
ArrayList<Integer> toRemove = null;
int currentServerTime = ConnectionsManager.getInstance().getCurrentTime();
for (ConcurrentHashMap.Entry<Integer, Integer> entry : onlinePrivacy.entrySet()) {
if (entry.getValue() < currentServerTime - 30) {
if (toRemove == null) {
toRemove = new ArrayList<Integer>();
}
toRemove.add(entry.getKey());
}
}
if (toRemove != null) {
for (Integer uid : toRemove) {
onlinePrivacy.remove(uid);
}
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
NotificationCenter.getInstance().postNotificationName(NotificationCenter.updateInterfaces, UPDATE_MASK_STATUS);
}
});
}
}
if (!printingUsers.isEmpty() || lastPrintingStringCount != printingUsers.size()) {
boolean updated = false;
ArrayList<Long> keys = new ArrayList<Long>(printingUsers.keySet());
@ -2678,12 +2705,18 @@ public class MessagesController implements NotificationCenter.NotificationCenter
boolean needGetDiff = false;
boolean needReceivedQueue = false;
boolean addedToQueue = false;
boolean updateStatus = false;
if (updates instanceof TLRPC.TL_updateShort) {
ArrayList<TLRPC.Update> arr = new ArrayList<TLRPC.Update>();
arr.add(updates.update);
processUpdateArray(arr, null, null);
} else if (updates instanceof TLRPC.TL_updateShortChatMessage) {
boolean missingData = getChat(updates.chat_id) == null || getUser(updates.from_id) == null;
TLRPC.User user = getUser(updates.from_id);
if (user != null && user.status != null && user.status.expires <= 0) {
onlinePrivacy.put(user.id, ConnectionsManager.getInstance().getCurrentTime());
updateStatus = true;
}
boolean missingData = getChat(updates.chat_id) == null || user == null;
if (missingData) {
needGetDiff = true;
} else {
@ -2748,7 +2781,12 @@ public class MessagesController implements NotificationCenter.NotificationCenter
}
}
} else if (updates instanceof TLRPC.TL_updateShortMessage) {
boolean missingData = getUser(updates.from_id) == null;
TLRPC.User user = getUser(updates.from_id);
if (user != null && user.status != null && user.status.expires <= 0) {
onlinePrivacy.put(user.id, ConnectionsManager.getInstance().getCurrentTime());
updateStatus = true;
}
boolean missingData = user == null;
if (missingData) {
needGetDiff = true;
} else {
@ -2895,6 +2933,14 @@ public class MessagesController implements NotificationCenter.NotificationCenter
}
});
}
if (updateStatus) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
NotificationCenter.getInstance().postNotificationName(NotificationCenter.updateInterfaces, UPDATE_MASK_STATUS);
}
});
}
MessagesStorage.getInstance().saveDiffParams(MessagesStorage.lastSeqValue, MessagesStorage.lastPtsValue, MessagesStorage.lastDateValue, MessagesStorage.lastQtsValue);
}
@ -2954,9 +3000,15 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (update instanceof TLRPC.TL_updateNewMessage) {
TLRPC.TL_updateNewMessage upd = (TLRPC.TL_updateNewMessage)update;
if (checkForUsers) {
if (usersDict.get(upd.message.from_id) == null && getUser(upd.message.from_id) == null || upd.message.to_id.chat_id != 0 && chatsDict.get(upd.message.to_id.chat_id) == null && getChat(upd.message.to_id.chat_id) == null) {
TLRPC.User user = getUser(upd.message.from_id);
if (usersDict.get(upd.message.from_id) == null && user == null || upd.message.to_id.chat_id != 0 && chatsDict.get(upd.message.to_id.chat_id) == null && getChat(upd.message.to_id.chat_id) == null) {
return false;
}
if (user != null && user.status != null && user.status.expires <= 0) {
onlinePrivacy.put(upd.message.from_id, ConnectionsManager.getInstance().getCurrentTime());
interfaceUpdateMask |= UPDATE_MASK_STATUS;
}
}
messagesArr.add(upd.message);
MessageObject obj = new MessageObject(upd.message, usersDict, 2);
@ -3018,6 +3070,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
arr.add(newUser);
printChanged = true;
}
onlinePrivacy.put(update.user_id, ConnectionsManager.getInstance().getCurrentTime());
}
} else if (update instanceof TLRPC.TL_updateChatParticipants) {
interfaceUpdateMask |= UPDATE_MASK_CHAT_MEMBERS;
@ -3143,6 +3196,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
arr.add(newUser);
printChanged = true;
}
onlinePrivacy.put(update.user_id, ConnectionsManager.getInstance().getCurrentTime());
}
} else if (update instanceof TLRPC.TL_updateEncryptedMessagesRead) {
markAsReadEncrypted.put(update.chat_id, Math.max(update.max_date, update.date));

View File

@ -8,6 +8,7 @@
package org.telegram.android;
import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
@ -235,8 +236,10 @@ public class NotificationsController {
try {
AlarmManager alarm = (AlarmManager) ApplicationLoader.applicationContext.getSystemService(Context.ALARM_SERVICE);
PendingIntent pintent = PendingIntent.getService(ApplicationLoader.applicationContext, 0, new Intent(ApplicationLoader.applicationContext, NotificationRepeat.class), 0);
if (personal_count > 0) {
alarm.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + 60 * 60 * 1000, pintent);
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
int minutes = preferences.getInt("repeat_messages", 60);
if (minutes > 0 || personal_count > 0) {
alarm.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + minutes * 60 * 1000, pintent);
} else {
alarm.cancel(pintent);
}
@ -289,6 +292,9 @@ public class NotificationsController {
boolean inAppSounds = false;
boolean inAppVibrate = false;
boolean inAppPreview = false;
boolean inAppPriority = false;
int priority = 0;
int priority_override = 0;
int vibrate_override = 0;
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Context.MODE_PRIVATE);
@ -302,7 +308,9 @@ public class NotificationsController {
inAppSounds = preferences.getBoolean("EnableInAppSounds", true);
inAppVibrate = preferences.getBoolean("EnableInAppVibrate", true);
inAppPreview = preferences.getBoolean("EnableInAppPreview", true);
inAppPriority = preferences.getBoolean("EnableInAppPriority", false);
vibrate_override = preferences.getInt("vibrate_" + dialog_id, 0);
priority_override = preferences.getInt("priority_" + dialog_id, 3);
choosenSoundPath = preferences.getString("sound_path_" + dialog_id, null);
if (chat_id != 0) {
@ -312,6 +320,7 @@ public class NotificationsController {
choosenSoundPath = preferences.getString("GroupSoundPath", defaultPath);
}
needVibrate = preferences.getInt("vibrate_group", 0);
priority = preferences.getInt("priority_group", 1);
ledColor = preferences.getInt("GroupLed", 0xff00ff00);
} else if (user_id != 0) {
if (choosenSoundPath != null && choosenSoundPath.equals(defaultPath)) {
@ -320,12 +329,17 @@ public class NotificationsController {
choosenSoundPath = preferences.getString("GlobalSoundPath", defaultPath);
}
needVibrate = preferences.getInt("vibrate_messages", 0);
priority = preferences.getInt("priority_group", 1);
ledColor = preferences.getInt("MessagesLed", 0xff00ff00);
}
if (preferences.contains("color_" + dialog_id)) {
ledColor = preferences.getInt("color_" + dialog_id, 0);
}
if (priority_override != 3) {
priority = priority_override;
}
if (needVibrate == 2 && (vibrate_override == 1 || vibrate_override == 3 || vibrate_override == 5) || needVibrate != 2 && vibrate_override == 2 || vibrate_override != 0) {
needVibrate = vibrate_override;
}
@ -336,6 +350,11 @@ public class NotificationsController {
if (!inAppVibrate) {
needVibrate = 2;
}
if (!inAppPriority) {
priority = 0;
} else if (priority == 2) {
priority = 1;
}
}
}
@ -397,9 +416,13 @@ public class NotificationsController {
.setGroup("messages")
.setGroupSummary(true);
//if (ApplicationLoader.mainInterfacePaused) {
// mBuilder.setPriority(NotificationCompat.PRIORITY_HIGH);
//}
if (priority == 0) {
mBuilder.setPriority(NotificationCompat.PRIORITY_DEFAULT);
} else if (priority == 1) {
mBuilder.setPriority(NotificationCompat.PRIORITY_HIGH);
} else if (priority == 2) {
mBuilder.setPriority(NotificationCompat.PRIORITY_MAX);
}
String lastMessage = null;
String lastMessageFull = null;

View File

@ -1856,10 +1856,21 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
}
}
private static void prepareSendingDocumentInternal(final String path, String originalPath, final long dialog_id) {
if (path == null || path.length() == 0) {
private static void prepareSendingDocumentInternal(String path, String originalPath, Uri uri, String mime, final long dialog_id) {
if ((path == null || path.length() == 0) && uri == null) {
return;
}
MimeTypeMap myMime = MimeTypeMap.getSingleton();
if (uri != null) {
String extension = null;
if (mime != null) {
extension = myMime.getExtensionFromMimeType(mime);
}
if (extension == null) {
extension = "txt";
}
path = MediaController.copyDocumentToCache(uri, extension);
}
final File f = new File(path);
if (!f.exists() || f.length() == 0) {
return;
@ -1893,7 +1904,6 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
document.size = (int)f.length();
document.dc_id = 0;
if (ext.length() != 0) {
MimeTypeMap myMime = MimeTypeMap.getSingleton();
String mimeType = myMime.getMimeTypeFromExtension(ext.toLowerCase());
if (mimeType != null) {
document.mime_type = mimeType;
@ -1921,34 +1931,46 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
final TLRPC.TL_document documentFinal = document;
final String originalPathFinal = originalPath;
final String pathFinal = path;
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
SendMessagesHelper.getInstance().sendMessage(documentFinal, originalPathFinal, path, dialog_id);
SendMessagesHelper.getInstance().sendMessage(documentFinal, originalPathFinal, pathFinal, dialog_id);
}
});
}
public static void prepareSendingDocument(String path, String originalPath, long dialog_id) {
if (path == null || originalPath == null) {
public static void prepareSendingDocument(String path, String originalPath, Uri uri, String mine, long dialog_id) {
if ((path == null || originalPath == null) && uri == null) {
return;
}
ArrayList<String> paths = new ArrayList<String>();
ArrayList<String> originalPaths = new ArrayList<String>();
ArrayList<Uri> uris = null;
if (uri != null) {
uris = new ArrayList<Uri>();
}
paths.add(path);
originalPaths.add(originalPath);
prepareSendingDocuments(paths, originalPaths, dialog_id);
prepareSendingDocuments(paths, originalPaths, uris, mine, dialog_id);
}
public static void prepareSendingDocuments(final ArrayList<String> paths, final ArrayList<String> originalPaths, final long dialog_id) {
if (paths == null && originalPaths == null || paths != null && originalPaths != null && paths.size() != originalPaths.size()) {
public static void prepareSendingDocuments(final ArrayList<String> paths, final ArrayList<String> originalPaths, final ArrayList<Uri> uris, final String mime, final long dialog_id) {
if (paths == null && originalPaths == null && uris == null || paths != null && originalPaths != null && paths.size() != originalPaths.size()) {
return;
}
new Thread(new Runnable() {
@Override
public void run() {
for (int a = 0; a < paths.size(); a++) {
prepareSendingDocumentInternal(paths.get(a), originalPaths.get(a), dialog_id);
if (paths != null) {
for (int a = 0; a < paths.size(); a++) {
prepareSendingDocumentInternal(paths.get(a), originalPaths.get(a), null, mime, dialog_id);
}
}
if (uris != null) {
for (int a = 0; a < uris.size(); a++) {
prepareSendingDocumentInternal(null, null, uris.get(a), mime, dialog_id);
}
}
}
}).start();
@ -2050,7 +2072,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
}
if (sendAsDocuments != null && !sendAsDocuments.isEmpty()) {
for (int a = 0; a < sendAsDocuments.size(); a++) {
prepareSendingDocumentInternal(sendAsDocuments.get(a), sendAsDocumentsOriginal.get(a), dialog_id);
prepareSendingDocumentInternal(sendAsDocuments.get(a), sendAsDocumentsOriginal.get(a), null, "gif", dialog_id);
}
}
}

View File

@ -628,7 +628,7 @@ public class ActionBarLayout extends FrameLayout {
currentAnimation = new AnimatorSetProxy();
currentAnimation.playTogether(
ObjectAnimatorProxy.ofFloat(containerView, "alpha", 0.0f, 1.0f),
ObjectAnimatorProxy.ofFloat(containerView, "translationY", AndroidUtilities.dp(48), 0));
ObjectAnimatorProxy.ofFloat(containerView, "translationX", AndroidUtilities.dp(48), 0));
currentAnimation.setInterpolator(new DecelerateInterpolator(1.5f));
currentAnimation.setDuration(200);
currentAnimation.addListener(new AnimatorListenerAdapterProxy() {
@ -730,14 +730,14 @@ public class ActionBarLayout extends FrameLayout {
@Override
public void run() {
closeLastFragmentInternalRemoveOld(currentFragment);
ViewProxy.setTranslationY(containerViewBack, 0);
ViewProxy.setTranslationX(containerViewBack, 0);
}
};
currentAnimation = new AnimatorSetProxy();
currentAnimation.playTogether(
ObjectAnimatorProxy.ofFloat(containerViewBack, "alpha", 1.0f, 0.0f),
ObjectAnimatorProxy.ofFloat(containerViewBack, "translationY", 0, AndroidUtilities.dp(48)));
ObjectAnimatorProxy.ofFloat(containerViewBack, "translationX", 0, AndroidUtilities.dp(48)));
currentAnimation.setInterpolator(new DecelerateInterpolator(1.5f));
currentAnimation.setDuration(200);
currentAnimation.addListener(new AnimatorListenerAdapterProxy() {

View File

@ -52,6 +52,7 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
private boolean needMessagesSearch;
private boolean messagesSearchEndReached;
private String lastMessagesSearchString;
private int lastSearchId = 0;
public static interface MessagesActivitySearchAdapterDelegate {
public abstract void searchStateChanged(boolean searching);
@ -137,15 +138,17 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
}, true, RPCRequest.RPCRequestClassGeneric | RPCRequest.RPCRequestClassFailOnServerErrors);
}
private void searchDialogsInternal(final String query, final boolean serverOnly) {
private void searchDialogsInternal(final String query, final boolean serverOnly, final int searchId) {
MessagesStorage.getInstance().getStorageQueue().postRunnable(new Runnable() {
@Override
public void run() {
try {
FileLog.e("tmessages", "trigger search");
ArrayList<TLRPC.User> encUsers = new ArrayList<TLRPC.User>();
String q = query.trim().toLowerCase();
if (q.length() == 0) {
updateSearchResults(new ArrayList<TLObject>(), new ArrayList<CharSequence>(), new ArrayList<TLRPC.User>());
lastSearchId = -1;
updateSearchResults(new ArrayList<TLObject>(), new ArrayList<CharSequence>(), new ArrayList<TLRPC.User>(), lastSearchId);
return;
}
ArrayList<TLObject> resultArray = new ArrayList<TLObject>();
@ -253,7 +256,7 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
}
}
cursor.dispose();
updateSearchResults(resultArray, resultArrayNames, encUsers);
updateSearchResults(resultArray, resultArrayNames, encUsers, searchId);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
@ -261,10 +264,13 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
});
}
private void updateSearchResults(final ArrayList<TLObject> result, final ArrayList<CharSequence> names, final ArrayList<TLRPC.User> encUsers) {
private void updateSearchResults(final ArrayList<TLObject> result, final ArrayList<CharSequence> names, final ArrayList<TLRPC.User> encUsers, final int searchId) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
if (searchId != lastSearchId) {
return;
}
for (TLObject obj : result) {
if (obj instanceof TLRPC.User) {
TLRPC.User user = (TLRPC.User) obj;
@ -313,6 +319,7 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
queryServerSearch(null);
notifyDataSetChanged();
} else {
final int searchId = ++lastSearchId;
searchTimer = new Timer();
searchTimer.schedule(new TimerTask() {
@Override
@ -323,7 +330,7 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
} catch (Exception e) {
FileLog.e("tmessages", e);
}
searchDialogsInternal(query, serverOnly);
searchDialogsInternal(query, serverOnly, searchId);
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {

View File

@ -574,7 +574,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
@Override
public void didSelectFile(DocumentSelectActivity activity, String path) {
activity.finishFragment();
SendMessagesHelper.prepareSendingDocument(path, path, dialog_id);
SendMessagesHelper.prepareSendingDocument(path, path, null, null, dialog_id);
}
@Override
@ -854,7 +854,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
addContactItem = headerItem.addSubItem(share_contact, "", 0);
}
if (currentEncryptedChat != null) {
timeItem2 = headerItem.addSubItem(chat_enc_timer, LocaleController.getString("MessageLifetime", R.string.MessageLifetime), 0);
timeItem2 = headerItem.addSubItem(chat_enc_timer, LocaleController.getString("SetTimer", R.string.SetTimer), 0);
}
headerItem.addSubItem(clear_history, LocaleController.getString("ClearHistory", R.string.ClearHistory), 0);
if (currentChat != null && !isBroadcast) {
@ -957,14 +957,16 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
} else {
chatListView.setCacheColorHint(0);
try {
if (selectedBackground == 1000001) {
((SizeNotifierRelativeLayout) contentView).setBackgroundImage(R.drawable.background_hd);
if (ApplicationLoader.cachedWallpaper != null) {
isCustomTheme = selectedBackground != 1000001;
((SizeNotifierRelativeLayout) contentView).setBackgroundImage(ApplicationLoader.cachedWallpaper);
} else {
File toFile = new File(ApplicationLoader.applicationContext.getFilesDir(), "wallpaper.jpg");
if (toFile.exists()) {
if (ApplicationLoader.cachedWallpaper != null) {
((SizeNotifierRelativeLayout) contentView).setBackgroundImage(ApplicationLoader.cachedWallpaper);
} else {
if (selectedBackground == 1000001) {
((SizeNotifierRelativeLayout) contentView).setBackgroundImage(R.drawable.background_hd);
ApplicationLoader.cachedWallpaper = ((SizeNotifierRelativeLayout) contentView).getBackgroundImage();
} else {
File toFile = new File(ApplicationLoader.applicationContext.getFilesDir(), "wallpaper.jpg");
if (toFile.exists()) {
Drawable drawable = Drawable.createFromPath(toFile.getAbsolutePath());
if (drawable != null) {
((SizeNotifierRelativeLayout) contentView).setBackgroundImage(drawable);
@ -973,10 +975,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
contentView.setBackgroundColor(-2693905);
chatListView.setCacheColorHint(-2693905);
}
isCustomTheme = true;
} else {
((SizeNotifierRelativeLayout) contentView).setBackgroundImage(R.drawable.background_hd);
ApplicationLoader.cachedWallpaper = ((SizeNotifierRelativeLayout) contentView).getBackgroundImage();
isCustomTheme = false;
}
isCustomTheme = true;
} else {
((SizeNotifierRelativeLayout) contentView).setBackgroundImage(R.drawable.background_hd);
}
}
} catch (Throwable e) {
@ -1792,7 +1796,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
showAttachmentError();
return;
}
SendMessagesHelper.prepareSendingDocument(tempPath, originalPath, dialog_id);
SendMessagesHelper.prepareSendingDocument(tempPath, originalPath, null, null, dialog_id);
}
}
}

View File

@ -65,6 +65,8 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
private String sendingText;
private ArrayList<Uri> photoPathsArray;
private ArrayList<String> documentsPathsArray;
private ArrayList<Uri> documentsUrisArray;
private String documentsMimeType;
private ArrayList<String> documentsOriginalPathsArray;
private ArrayList<TLRPC.User> contactsToSend;
private int currentConnectionState;
@ -375,6 +377,8 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
sendingText = null;
documentsPathsArray = null;
documentsOriginalPathsArray = null;
documentsMimeType = null;
documentsUrisArray = null;
contactsToSend = null;
if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) == 0) {
@ -501,7 +505,11 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
documentsOriginalPathsArray.add(uri.toString());
}
} else {
error = true;
if (documentsUrisArray == null) {
documentsUrisArray = new ArrayList<Uri>();
}
documentsUrisArray.add(uri);
documentsMimeType = type;
}
}
if (error) {
@ -628,7 +636,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
pushOpened = false;
isNew = false;
}
if (videoPath != null || photoPathsArray != null || sendingText != null || documentsPathsArray != null || contactsToSend != null) {
if (videoPath != null || photoPathsArray != null || sendingText != null || documentsPathsArray != null || contactsToSend != null || documentsUrisArray != null) {
if (!AndroidUtilities.isTablet()) {
NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
}
@ -753,8 +761,8 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
if (photoPathsArray != null) {
SendMessagesHelper.prepareSendingPhotos(null, photoPathsArray, dialog_id);
}
if (documentsPathsArray != null) {
SendMessagesHelper.prepareSendingDocuments(documentsPathsArray, documentsOriginalPathsArray, dialog_id);
if (documentsPathsArray != null || documentsUrisArray != null) {
SendMessagesHelper.prepareSendingDocuments(documentsPathsArray, documentsOriginalPathsArray, documentsUrisArray, documentsMimeType, dialog_id);
}
if (contactsToSend != null && !contactsToSend.isEmpty()) {
for (TLRPC.User user : contactsToSend) {
@ -1095,16 +1103,26 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (AndroidUtilities.isTablet()) {
if (layersActionBarLayout.getVisibility() == View.VISIBLE && !layersActionBarLayout.fragmentsStack.isEmpty()) {
layersActionBarLayout.onKeyUp(keyCode, event);
} else if (rightActionBarLayout.getVisibility() == View.VISIBLE && !rightActionBarLayout.fragmentsStack.isEmpty()) {
rightActionBarLayout.onKeyUp(keyCode, event);
if (keyCode == KeyEvent.KEYCODE_MENU) {
if (AndroidUtilities.isTablet()) {
if (layersActionBarLayout.getVisibility() == View.VISIBLE && !layersActionBarLayout.fragmentsStack.isEmpty()) {
layersActionBarLayout.onKeyUp(keyCode, event);
} else if (rightActionBarLayout.getVisibility() == View.VISIBLE && !rightActionBarLayout.fragmentsStack.isEmpty()) {
rightActionBarLayout.onKeyUp(keyCode, event);
} else {
actionBarLayout.onKeyUp(keyCode, event);
}
} else {
actionBarLayout.onKeyUp(keyCode, event);
if (actionBarLayout.fragmentsStack.size() == 1) {
if (!drawerLayoutContainer.isDrawerOpened()) {
drawerLayoutContainer.openDrawer(false);
} else {
drawerLayoutContainer.closeDrawer(false);
}
} else {
actionBarLayout.onKeyUp(keyCode, event);
}
}
} else {
actionBarLayout.onKeyUp(keyCode, event);
}
return super.onKeyUp(keyCode, event);
}

View File

@ -17,6 +17,7 @@ import android.content.SharedPreferences;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
@ -60,6 +61,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
private int messageSoundRow;
private int messageLedRow;
private int messagePopupNotificationRow;
private int messagePriorityRow;
private int groupSectionRow2;
private int groupSectionRow;
private int groupAlertRow;
@ -68,11 +70,13 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
private int groupSoundRow;
private int groupLedRow;
private int groupPopupNotificationRow;
private int groupPriorityRow;
private int inappSectionRow2;
private int inappSectionRow;
private int inappSoundRow;
private int inappVibrateRow;
private int inappPreviewRow;
private int inappPriorityRow;
private int eventsSectionRow2;
private int eventsSectionRow;
private int contactJoinedRow;
@ -80,6 +84,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
private int otherSectionRow;
private int badgeNumberRow;
private int pebbleAlertRow;
private int repeatRow;
private int resetSectionRow2;
private int resetSectionRow;
private int resetNotificationsRow;
@ -96,6 +101,11 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
messageVibrateRow = rowCount++;
messagePopupNotificationRow = rowCount++;
messageSoundRow = rowCount++;
if (Build.VERSION.SDK_INT >= 21) {
messagePriorityRow = rowCount++;
} else {
messagePriorityRow = -1;
}
groupSectionRow2 = rowCount++;
groupSectionRow = rowCount++;
groupAlertRow = rowCount++;
@ -104,11 +114,21 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
groupVibrateRow = rowCount++;
groupPopupNotificationRow = rowCount++;
groupSoundRow = rowCount++;
if (Build.VERSION.SDK_INT >= 21) {
groupPriorityRow = rowCount++;
} else {
groupPriorityRow = -1;
}
inappSectionRow2 = rowCount++;
inappSectionRow = rowCount++;
inappSoundRow = rowCount++;
inappVibrateRow = rowCount++;
inappPreviewRow = rowCount++;
if (Build.VERSION.SDK_INT >= 21) {
inappPriorityRow = rowCount++;
} else {
inappPriorityRow = -1;
}
eventsSectionRow2 = rowCount++;
eventsSectionRow = rowCount++;
contactJoinedRow = rowCount++;
@ -116,6 +136,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
otherSectionRow = rowCount++;
badgeNumberRow = rowCount++;
pebbleAlertRow = rowCount++;
repeatRow = rowCount++;
resetSectionRow2 = rowCount++;
resetSectionRow = rowCount++;
resetNotificationsRow = rowCount++;
@ -273,6 +294,12 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
enabled = preferences.getBoolean("EnableInAppPreview", true);
editor.putBoolean("EnableInAppPreview", !enabled);
editor.commit();
} else if (i == inappPriorityRow) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
enabled = preferences.getBoolean("EnableInAppPriority", false);
editor.putBoolean("EnableInAppPriority", !enabled);
editor.commit();
} else if (i == contactJoinedRow) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
@ -429,6 +456,66 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showAlertDialog(builder);
} else if (i == messagePriorityRow || i == groupPriorityRow) {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority));
builder.setItems(new CharSequence[] {
LocaleController.getString("NotificationsPriorityDefault", R.string.NotificationsPriorityDefault),
LocaleController.getString("NotificationsPriorityHigh", R.string.NotificationsPriorityHigh),
LocaleController.getString("NotificationsPriorityMax", R.string.NotificationsPriorityMax)
}, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
if (i == messagePriorityRow) {
preferences.edit().putInt("priority_messages", which).commit();
} else if (i == groupPriorityRow) {
preferences.edit().putInt("priority_group", which).commit();
}
if (listView != null) {
listView.invalidateViews();
}
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showAlertDialog(builder);
} else if (i == repeatRow) {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("RepeatNotifications", R.string.RepeatNotifications));
builder.setItems(new CharSequence[] {
LocaleController.getString("ShortMessageLifetimeForever", R.string.ShortMessageLifetimeForever),
LocaleController.formatPluralString("Minutes", 5),
LocaleController.formatPluralString("Minutes", 10),
LocaleController.formatPluralString("Minutes", 30),
LocaleController.formatPluralString("Hours", 1),
LocaleController.formatPluralString("Hours", 2),
LocaleController.formatPluralString("Hours", 4)
}, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
int minutes = 0;
if (which == 1) {
minutes = 5;
} else if (which == 2) {
minutes = 10;
} else if (which == 3) {
minutes = 30;
} else if (which == 4) {
minutes = 60;
} else if (which == 5) {
minutes = 60 * 2;
} else if (which == 6) {
minutes = 60 * 4;
}
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
preferences.edit().putInt("repeat_messages", minutes).commit();
if (listView != null) {
listView.invalidateViews();
}
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showAlertDialog(builder);
}
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(!enabled);
@ -597,11 +684,13 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
} else if (i == inappVibrateRow) {
checkCell.setTextAndCheck(LocaleController.getString("InAppVibrate", R.string.InAppVibrate), preferences.getBoolean("EnableInAppVibrate", true), true);
} else if (i == inappPreviewRow) {
checkCell.setTextAndCheck(LocaleController.getString("InAppPreview", R.string.InAppPreview), preferences.getBoolean("EnableInAppPreview", true), false);
checkCell.setTextAndCheck(LocaleController.getString("InAppPreview", R.string.InAppPreview), preferences.getBoolean("EnableInAppPreview", true), true);
} else if (i == inappPriorityRow) {
checkCell.setTextAndCheck(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority), preferences.getBoolean("EnableInAppPriority", false), false);
} else if (i == contactJoinedRow) {
checkCell.setTextAndCheck(LocaleController.getString("ContactJoined", R.string.ContactJoined), preferences.getBoolean("EnableContactJoined", true), false);
} else if (i == pebbleAlertRow) {
checkCell.setTextAndCheck(LocaleController.getString("Pebble", R.string.Pebble), preferences.getBoolean("EnablePebbleNotifications", false), false);
checkCell.setTextAndCheck(LocaleController.getString("Pebble", R.string.Pebble), preferences.getBoolean("EnablePebbleNotifications", false), true);
} else if (i == notificationsServiceRow) {
checkCell.setTextAndCheck(LocaleController.getString("NotificationsService", R.string.NotificationsService), preferences.getBoolean("pushService", true), false);
} else if (i == badgeNumberRow) {
@ -627,7 +716,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
if (value.equals("NoSound")) {
value = LocaleController.getString("NoSound", R.string.NoSound);
}
textCell.setTextAndValue(LocaleController.getString("Sound", R.string.Sound), value, false);
textCell.setTextAndValue(LocaleController.getString("Sound", R.string.Sound), value, true);
} else if (i == resetNotificationsRow) {
textCell.setMultilineDetail(true);
textCell.setTextAndValue(LocaleController.getString("ResetAllNotifications", R.string.ResetAllNotifications), LocaleController.getString("UndoAllCustom", R.string.UndoAllCustom), false);
@ -667,6 +756,33 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
} else if (value == 3) {
textCell.setTextAndValue(LocaleController.getString("Vibrate", R.string.Vibrate), LocaleController.getString("Long", R.string.Long), true);
}
} else if (i == repeatRow) {
textCell.setMultilineDetail(false);
int minutes = preferences.getInt("repeat_messages", 60);
String value;
if (minutes == 0) {
value = LocaleController.getString("ShortMessageLifetimeForever", R.string.ShortMessageLifetimeForever);
} else if (minutes < 60) {
value = LocaleController.formatPluralString("Minutes", minutes);
} else {
value = LocaleController.formatPluralString("Hours", minutes / 60);
}
textCell.setTextAndValue(LocaleController.getString("RepeatNotifications", R.string.RepeatNotifications), value, false);
} else if (i == messagePriorityRow || i == groupPriorityRow) {
textCell.setMultilineDetail(false);
int value = 0;
if (i == messagePriorityRow) {
value = preferences.getInt("priority_messages", 1);
} else if (i == groupPriorityRow) {
value = preferences.getInt("priority_group", 1);
}
if (value == 0) {
textCell.setTextAndValue(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority), LocaleController.getString("NotificationsPriorityDefault", R.string.NotificationsPriorityDefault), false);
} else if (value == 1) {
textCell.setTextAndValue(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority), LocaleController.getString("NotificationsPriorityHigh", R.string.NotificationsPriorityHigh), false);
} else if (value == 2) {
textCell.setTextAndValue(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority), LocaleController.getString("NotificationsPriorityMax", R.string.NotificationsPriorityMax), false);
}
}
} else if (type == 3) {
if (view == null) {
@ -697,7 +813,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
} else if (i == messageAlertRow || i == messagePreviewRow || i == groupAlertRow ||
i == groupPreviewRow || i == inappSoundRow || i == inappVibrateRow ||
i == inappPreviewRow || i == contactJoinedRow || i == pebbleAlertRow ||
i == notificationsServiceRow || i == badgeNumberRow) {
i == notificationsServiceRow || i == badgeNumberRow || i == inappPriorityRow) {
return 1;
} else if (i == messageLedRow || i == groupLedRow) {
return 3;

View File

@ -1125,11 +1125,12 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
}
} else if (chat_id != 0) {
ActionBarMenuItem item = menu.addItem(0, R.drawable.ic_ab_other);
item.addSubItem(edit_name, LocaleController.getString("EditName", R.string.EditName), 0);
if (chat_id > 0) {
item.addSubItem(add_member, LocaleController.getString("AddMember", R.string.AddMember), 0);
item.addSubItem(edit_name, LocaleController.getString("EditName", R.string.EditName), 0);
item.addSubItem(leave_group, LocaleController.getString("DeleteAndExit", R.string.DeleteAndExit), 0);
} else {
item.addSubItem(edit_name, LocaleController.getString("EditName", R.string.EditName), 0);
item.addSubItem(add_member, LocaleController.getString("AddRecipient", R.string.AddRecipient), 0);
}
}

View File

@ -17,6 +17,7 @@ import android.content.SharedPreferences;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.view.LayoutInflater;
@ -53,6 +54,7 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
private int settingsNotificationsRow;
private int settingsVibrateRow;
private int settingsSoundRow;
private int settingsPriorityRow;
private int settingsLedRow;
private int rowCount = 0;
@ -66,6 +68,11 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
settingsNotificationsRow = rowCount++;
settingsVibrateRow = rowCount++;
settingsSoundRow = rowCount++;
if (Build.VERSION.SDK_INT >= 21) {
settingsPriorityRow = rowCount++;
} else {
settingsPriorityRow = -1;
}
settingsLedRow = rowCount++;
NotificationCenter.getInstance().addObserver(this, NotificationCenter.notificationsSettingsUpdated);
return super.onFragmentCreate();
@ -253,6 +260,31 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
}
});
showAlertDialog(builder);
} else if (i == settingsPriorityRow) {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority));
builder.setItems(new CharSequence[] {
LocaleController.getString("SettingsDefault", R.string.SettingsDefault),
LocaleController.getString("NotificationsPriorityDefault", R.string.NotificationsPriorityDefault),
LocaleController.getString("NotificationsPriorityHigh", R.string.NotificationsPriorityHigh),
LocaleController.getString("NotificationsPriorityMax", R.string.NotificationsPriorityMax)
}, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == 0) {
which = 3;
} else {
which--;
}
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
preferences.edit().putInt("priority_" + dialog_id, which).commit();
if (listView != null) {
listView.invalidateViews();
}
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showAlertDialog(builder);
}
}
});
@ -425,6 +457,17 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
value = LocaleController.getString("NoSound", R.string.NoSound);
}
textCell.setTextAndValue(LocaleController.getString("Sound", R.string.Sound), value, true);
} else if (i == settingsPriorityRow) {
int value = preferences.getInt("priority_" + dialog_id, 3);
if (value == 0) {
textCell.setTextAndValue(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority), LocaleController.getString("NotificationsPriorityDefault", R.string.NotificationsPriorityDefault), true);
} else if (value == 1) {
textCell.setTextAndValue(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority), LocaleController.getString("NotificationsPriorityHigh", R.string.NotificationsPriorityHigh), true);
} else if (value == 2) {
textCell.setTextAndValue(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority), LocaleController.getString("NotificationsPriorityMax", R.string.NotificationsPriorityMax), true);
} else if (value == 3) {
textCell.setTextAndValue(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority), LocaleController.getString("SettingsDefault", R.string.SettingsDefault), true);
}
}
} else if (type == 1) {
if (view == null) {
@ -450,7 +493,7 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
@Override
public int getItemViewType(int i) {
if (i == settingsNotificationsRow || i == settingsVibrateRow || i == settingsSoundRow) {
if (i == settingsNotificationsRow || i == settingsVibrateRow || i == settingsSoundRow || i == settingsPriorityRow) {
return 0;
} else if (i == settingsLedRow) {
return 1;

View File

@ -44,6 +44,7 @@ public class AvatarDrawable extends Drawable {
private StaticLayout textLayout;
private float textWidth;
private float textHeight;
private float textLeft;
private boolean isProfile;
private boolean drawBrodcast;
private boolean drawPhoto;
@ -168,6 +169,7 @@ public class AvatarDrawable extends Drawable {
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);
}
@ -205,7 +207,7 @@ public class AvatarDrawable extends Drawable {
broadcastDrawable.draw(canvas);
} else {
if (textLayout != null) {
canvas.translate((size - textWidth) / 2, (size - textHeight) / 2);
canvas.translate((size - textWidth) / 2 - textLeft, (size - textHeight) / 2);
textLayout.draw(canvas);
} else if (drawPhoto && photoDrawable != null) {
int x = (size - photoDrawable.getIntrinsicWidth()) / 2;

View File

@ -145,6 +145,9 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
sendButton = (ImageButton) containerView.findViewById(R.id.chat_send_button);
sendButton.setVisibility(View.INVISIBLE);
ViewProxy.setScaleX(sendButton, 0.1f);
ViewProxy.setScaleY(sendButton, 0.1f);
ViewProxy.setAlpha(sendButton, 0.0f);
emojiButton = (ImageView) containerView.findViewById(R.id.chat_smile_button);
audioSendButton = (ImageButton) containerView.findViewById(R.id.chat_audio_send_button);
recordPanel = containerView.findViewById(R.id.record_panel);

View File

@ -52,6 +52,10 @@ public class SizeNotifierRelativeLayout extends RelativeLayout {
backgroundDrawable = bitmap;
}
public Drawable getBackgroundImage() {
return backgroundDrawable;
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);

View File

@ -118,7 +118,7 @@
android:layout_marginLeft="52dp"
android:layout_marginRight="2dp"
android:background="@null"
android:layout_marginBottom="12dp"
android:paddingBottom="12dp"
android:paddingTop="11dp"
android:textCursorDrawable="@null"
android:textColor="#000000"/>

View File

@ -60,7 +60,7 @@
android:layout_marginLeft="52dp"
android:layout_marginRight="2dp"
android:background="@null"
android:layout_marginBottom="12dp"
android:paddingBottom="12dp"
android:paddingTop="11dp"
android:textCursorDrawable="@null"
android:textColor="#000000"/>

View File

@ -106,6 +106,7 @@
<string name="SaveToDownloads">حفظ في الجهاز</string>
<string name="ApplyLocalizationFile">تطبيق ملف التعريب</string>
<string name="UnsupportedAttachment">المرفق غير مدعوم</string>
<string name="SetTimer">عداد التدمير الذاتي</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s قام بتعيين عداد التدمير الذاتي إلى to %2$s</string>
<string name="MessageLifetimeChangedOutgoing">لقد قمت بتعيين التدمير الذاتي إلى %1$s</string>
@ -143,7 +144,6 @@
<string name="ReplyToUser">الرد على %1$s</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view-->
<string name="NewMessageTitle">رسالة جديدة</string>
<string name="SelectContact">اختر جهة اتصال</string>
<string name="NoContacts">لا توجد جهات اتصال بعد</string>
<string name="InviteText">http://telegram.org/dl2 مرحبا! هيا نستخدم تيليجرام: </string>
@ -158,6 +158,7 @@
<string name="WithinAWeek">آخر ظهور خلال أسبوع</string>
<string name="WithinAMonth">آخر ظهور خلال شهر</string>
<string name="ALongTimeAgo">آخر ظهور خلال فترة طويلة</string>
<string name="NewMessageTitle">رسالة جديدة</string>
<!--group create view-->
<string name="SendMessageTo">إرسال الرسالة إلى...</string>
<string name="EnterGroupNamePlaceholder">أدخل اسم للمجموعة</string>
@ -271,6 +272,12 @@
<string name="NoMediaAutoDownload">لا يوجد وسائط</string>
<string name="SaveToGallerySettings">حفظ في الجهاز</string>
<string name="EditName">تعديل الاسم</string>
<string name="NotificationsPriority">Priority</string>
<string name="NotificationsPriorityDefault">Default</string>
<string name="NotificationsPriorityLow">Low</string>
<string name="NotificationsPriorityHigh">High</string>
<string name="NotificationsPriorityMax">Max</string>
<string name="RepeatNotifications">Repeat Notifications</string>
<!--media view-->
<string name="NoMedia">لا توجد وسائط بعد</string>
<!--map view-->

View File

@ -46,7 +46,7 @@
<string name="EncryptedChatStartedIncoming">Du bist dem geheimen Chat beigetreten.</string>
<string name="ClearHistory">Verlauf löschen</string>
<string name="DeleteChat">Löschen und beenden</string>
<string name="DeleteChatUser">Lösche Chat</string>
<string name="DeleteChatUser">Chat löschen</string>
<string name="HiddenName">Gelöschtes Konto</string>
<string name="SelectChat">Chat auswählen</string>
<string name="PhotoTip">Tippen und Halten</string>
@ -106,6 +106,7 @@
<string name="SaveToDownloads">In Downloads speichern</string>
<string name="ApplyLocalizationFile">Sprachdatei benutzen</string>
<string name="UnsupportedAttachment">Nicht unterstützte Datei</string>
<string name="SetTimer">Wähle einen Selbstzerstörungs-Timer</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>
@ -143,7 +144,6 @@
<string name="ReplyToUser">%1$s antworten</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view-->
<string name="NewMessageTitle">Neue Nachricht</string>
<string name="SelectContact">Kontakt auswählen</string>
<string name="NoContacts">Noch keine Kontakte</string>
<string name="InviteText">Hey, lass uns zu Telegram wechseln: http://telegram.org/dl2</string>
@ -158,6 +158,7 @@
<string name="WithinAWeek">diese Woche gesehen</string>
<string name="WithinAMonth">diesen Monat gesehen</string>
<string name="ALongTimeAgo">vor langer Zeit gesehen</string>
<string name="NewMessageTitle">Neue Nachricht</string>
<!--group create view-->
<string name="SendMessageTo">Sende Nachricht an…</string>
<string name="EnterGroupNamePlaceholder">Gruppenname</string>
@ -271,6 +272,12 @@
<string name="NoMediaAutoDownload">kein automatischer Download</string>
<string name="SaveToGallerySettings">In der Galerie speichern</string>
<string name="EditName">Name bearbeiten</string>
<string name="NotificationsPriority">Priorität</string>
<string name="NotificationsPriorityDefault">Standard</string>
<string name="NotificationsPriorityLow">Niedrig</string>
<string name="NotificationsPriorityHigh">Hoch</string>
<string name="NotificationsPriorityMax">Max</string>
<string name="RepeatNotifications">Wiederholen Benachrichtigungen</string>
<!--media view-->
<string name="NoMedia">Noch keine geteilten Medien vorhanden</string>
<!--map view-->

View File

@ -106,6 +106,7 @@
<string name="SaveToDownloads">Guardar en descargas</string>
<string name="ApplyLocalizationFile">Aplicar traducción</string>
<string name="UnsupportedAttachment">Adjunto no soportado</string>
<string name="SetTimer">Establecer autodestrucción</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>
@ -143,7 +144,6 @@
<string name="ReplyToUser">Responder a %1$s</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view-->
<string name="NewMessageTitle">Nuevo mensaje</string>
<string name="SelectContact">Elegir contacto</string>
<string name="NoContacts">Aún sin contactos</string>
<string name="InviteText">Oye, cambiémonos a Telegram: http://telegram.org/dl2</string>
@ -158,6 +158,7 @@
<string name="WithinAWeek">últ. vez hace unos días</string>
<string name="WithinAMonth">últ. vez hace unas semanas</string>
<string name="ALongTimeAgo">últ. vez hace mucho tiempo</string>
<string name="NewMessageTitle">Nuevo mensaje</string>
<!--group create view-->
<string name="SendMessageTo">Enviar mensaje a...</string>
<string name="EnterGroupNamePlaceholder">Nombre del grupo</string>
@ -271,6 +272,12 @@
<string name="NoMediaAutoDownload">Ningún contenido multimedia</string>
<string name="SaveToGallerySettings">Guardar en galería</string>
<string name="EditName">Editar nombre</string>
<string name="NotificationsPriority">Prioridad</string>
<string name="NotificationsPriorityDefault">Por defecto</string>
<string name="NotificationsPriorityLow">Baja</string>
<string name="NotificationsPriorityHigh">Alta</string>
<string name="NotificationsPriorityMax">Máxima</string>
<string name="RepeatNotifications">Repetir notificaciones</string>
<!--media view-->
<string name="NoMedia">Aún no hay fotos ni vídeos</string>
<!--map view-->

View File

@ -106,6 +106,7 @@
<string name="SaveToDownloads">Salva in download</string>
<string name="ApplyLocalizationFile">Applica file di localizzazione</string>
<string name="UnsupportedAttachment">Allegato non supportato</string>
<string name="SetTimer">Timer di autodistruzione</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>
@ -143,7 +144,6 @@
<string name="ReplyToUser">Rispondi a %1$s</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view-->
<string name="NewMessageTitle">Nuovo messaggio</string>
<string name="SelectContact">Seleziona contatto</string>
<string name="NoContacts">Ancora nessun contatto</string>
<string name="InviteText">Ehi, è il momento di passare a Telegram: http://telegram.org/dl2</string>
@ -158,6 +158,7 @@
<string name="WithinAWeek">ultimo accesso entro una settimana</string>
<string name="WithinAMonth">ultimo accesso entro un mese</string>
<string name="ALongTimeAgo">ultimo accesso molto tempo fa</string>
<string name="NewMessageTitle">Nuovo messaggio</string>
<!--group create view-->
<string name="SendMessageTo">Invia messaggio a...</string>
<string name="EnterGroupNamePlaceholder">Immetti il nome del gruppo</string>
@ -271,6 +272,12 @@
<string name="NoMediaAutoDownload">Nessun media</string>
<string name="SaveToGallerySettings">Salva nella galleria</string>
<string name="EditName">Modifica nome</string>
<string name="NotificationsPriority">Priorità</string>
<string name="NotificationsPriorityDefault">Default</string>
<string name="NotificationsPriorityLow">Bassa</string>
<string name="NotificationsPriorityHigh">Alta</string>
<string name="NotificationsPriorityMax">Massima</string>
<string name="RepeatNotifications">Ripeti Notifiche</string>
<!--media view-->
<string name="NoMedia">Nessun media condiviso</string>
<!--map view-->

View File

@ -106,6 +106,7 @@
<string name="SaveToDownloads">다운로드 폴더에 저장</string>
<string name="ApplyLocalizationFile">언어 파일 적용</string>
<string name="UnsupportedAttachment">지원하지 않는 형식입니다</string>
<string name="SetTimer">자동삭제 타이머 설정</string>
<!--notification-->
<string name="MessageLifetimeChanged">%1$s님이 자동삭제를 %2$s 후로 설정했습니다</string>
<string name="MessageLifetimeChangedOutgoing">자동삭제를 %1$s 후로 설정했습니다</string>
@ -143,7 +144,6 @@
<string name="ReplyToUser">%1$s님에게 답장하기</string>
<string name="NotificationMessagesPeopleDisplayOrder">%2$s %1$s</string>
<!--contacts view-->
<string name="NewMessageTitle">새 메시지</string>
<string name="SelectContact">대화상대 선택</string>
<string name="NoContacts">대화상대가 없습니다</string>
<string name="InviteText">텔레그램으로 초대합니다! http://telegram.org/dl2</string>
@ -158,6 +158,7 @@
<string name="WithinAWeek">일주일 이내 마지막으로 접속</string>
<string name="WithinAMonth">한 달 이내 마지막으로 접속</string>
<string name="ALongTimeAgo">마지막으로 접속한 지 오래됨</string>
<string name="NewMessageTitle">새 메시지</string>
<!--group create view-->
<string name="SendMessageTo">메시지 보내기...</string>
<string name="EnterGroupNamePlaceholder">그룹 이름 입력</string>
@ -271,6 +272,12 @@
<string name="NoMediaAutoDownload">다운로드 안함</string>
<string name="SaveToGallerySettings">앨범에 자동 저장</string>
<string name="EditName">이름 편집</string>
<string name="NotificationsPriority">우선순위</string>
<string name="NotificationsPriorityDefault">기본</string>
<string name="NotificationsPriorityLow">낮음</string>
<string name="NotificationsPriorityHigh">높음</string>
<string name="NotificationsPriorityMax">최우선</string>
<string name="RepeatNotifications">Repeat Notifications</string>
<!--media view-->
<string name="NoMedia">공유한 미디어가 없습니다</string>
<!--map view-->

View File

@ -106,6 +106,7 @@
<string name="SaveToDownloads">Opslaan in Downloads</string>
<string name="ApplyLocalizationFile">Vertaling toepassen</string>
<string name="UnsupportedAttachment">Bestandstype niet ondersteund</string>
<string name="SetTimer">Zelfvernietigingstimer instellen</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>
@ -143,7 +144,6 @@
<string name="ReplyToUser">Antwoord op %1$s</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view-->
<string name="NewMessageTitle">Nieuw bericht</string>
<string name="SelectContact">Kies een contact</string>
<string name="NoContacts">Nog geen contacten</string>
<string name="InviteText">Hey! Zullen we overstappen op Telegram? http://telegram.org/dl2</string>
@ -158,6 +158,7 @@
<string name="WithinAWeek">afgelopen week gezien</string>
<string name="WithinAMonth">afgelopen maand gezien</string>
<string name="ALongTimeAgo">lang geleden gezien</string>
<string name="NewMessageTitle">Nieuw bericht</string>
<!--group create view-->
<string name="SendMessageTo">Bericht verzenden naar…</string>
<string name="EnterGroupNamePlaceholder">Groepsnaam...</string>
@ -271,6 +272,12 @@
<string name="NoMediaAutoDownload">Geen media</string>
<string name="SaveToGallerySettings">Opslaan in galerij</string>
<string name="EditName">Naam bewerken</string>
<string name="NotificationsPriority">Prioriteit</string>
<string name="NotificationsPriorityDefault">Standaard</string>
<string name="NotificationsPriorityLow">Laag</string>
<string name="NotificationsPriorityHigh">Hoog</string>
<string name="NotificationsPriorityMax">Max</string>
<string name="RepeatNotifications">Meldingen herhalen</string>
<!--media view-->
<string name="NoMedia">Nog geen media gedeeld</string>
<!--map view-->
@ -392,11 +399,11 @@
<string name="AreYouSureLogout">Weet je zeker dat je wilt uitloggen?\n\nTelegram kun je naadloos op al je apparaten tegelijkertijd gebruiken.\n\nLet op! Als je uitlogt worden al je geheime chats verwijderd.</string>
<string name="AreYouSureSessions">Alle apparaten behalve het huidige apparaat uitloggen?</string>
<string name="AreYouSureDeleteAndExit">Echt alles verwijderen en de groep verlaten?</string>
<string name="AreYouSureDeleteThisChat">Weet je zeker dat je dit gesprek wilt verwijderen?</string>
<string name="AreYouSureDeleteThisChat">Gesprek echt verwijderen?</string>
<string name="AreYouSureShareMyContactInfo">Weet je zeker dat je je contactinformatie wilt delen?</string>
<string name="AreYouSureBlockContact">Weet je zeker dat je deze persoon wilt blokkeren?</string>
<string name="AreYouSureUnblockContact">Weet je zeker dat je deze persoon wilt deblokkeren?</string>
<string name="AreYouSureDeleteContact">Weet je zeker dat je deze contactpersoon wilt verwijderen?</string>
<string name="AreYouSureDeleteContact">Contactpersoon echt verwijderen?</string>
<string name="AreYouSureSecretChat">Weet je zeker dat je een geheime chat wilt starten?</string>
<string name="AreYouSureRegistration">Weet je zeker dat je de registratie wilt annuleren?</string>
<string name="AreYouSureClearHistory">Geschiedenis echt wissen? </string>

View File

@ -106,6 +106,7 @@
<string name="SaveToDownloads">Salvar em downloads</string>
<string name="ApplyLocalizationFile">Aplicar arquivo de localização</string>
<string name="UnsupportedAttachment">Anexo não suportado</string>
<string name="SetTimer">Tempo de autodestruição</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>
@ -143,7 +144,6 @@
<string name="ReplyToUser">Responder para %1$s</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view-->
<string name="NewMessageTitle">Nova Mensagem</string>
<string name="SelectContact">Selecionar Contato</string>
<string name="NoContacts">Ainda não há contatos</string>
<string name="InviteText">Ei, vamos mudar para o Telegram: http://telegram.org/dl2</string>
@ -158,6 +158,7 @@
<string name="WithinAWeek">visto na última semana</string>
<string name="WithinAMonth">visto no último mês</string>
<string name="ALongTimeAgo">visto há muito tempo atrás</string>
<string name="NewMessageTitle">Nova Mensagem</string>
<!--group create view-->
<string name="SendMessageTo">Enviar mensagem para...</string>
<string name="EnterGroupNamePlaceholder">Digite o nome do grupo</string>
@ -271,6 +272,12 @@
<string name="NoMediaAutoDownload">Sem mídia</string>
<string name="SaveToGallerySettings">Salvar na galeria</string>
<string name="EditName">Editar nome</string>
<string name="NotificationsPriority">Priority</string>
<string name="NotificationsPriorityDefault">Default</string>
<string name="NotificationsPriorityLow">Low</string>
<string name="NotificationsPriorityHigh">High</string>
<string name="NotificationsPriorityMax">Max</string>
<string name="RepeatNotifications">Repeat Notifications</string>
<!--media view-->
<string name="NoMedia">Ainda não há mídia compartilhada</string>
<!--map view-->

View File

@ -106,6 +106,7 @@
<string name="SaveToDownloads">Salvar em downloads</string>
<string name="ApplyLocalizationFile">Aplicar arquivo de localização</string>
<string name="UnsupportedAttachment">Anexo não suportado</string>
<string name="SetTimer">Tempo de autodestruição</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>
@ -143,7 +144,6 @@
<string name="ReplyToUser">Responder para %1$s</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view-->
<string name="NewMessageTitle">Nova Mensagem</string>
<string name="SelectContact">Selecionar Contato</string>
<string name="NoContacts">Ainda não há contatos</string>
<string name="InviteText">Ei, vamos mudar para o Telegram: http://telegram.org/dl2</string>
@ -158,6 +158,7 @@
<string name="WithinAWeek">visto na última semana</string>
<string name="WithinAMonth">visto no último mês</string>
<string name="ALongTimeAgo">visto há muito tempo atrás</string>
<string name="NewMessageTitle">Nova Mensagem</string>
<!--group create view-->
<string name="SendMessageTo">Enviar mensagem para...</string>
<string name="EnterGroupNamePlaceholder">Digite o nome do grupo</string>
@ -271,6 +272,12 @@
<string name="NoMediaAutoDownload">Sem mídia</string>
<string name="SaveToGallerySettings">Salvar na galeria</string>
<string name="EditName">Editar nome</string>
<string name="NotificationsPriority">Priority</string>
<string name="NotificationsPriorityDefault">Default</string>
<string name="NotificationsPriorityLow">Low</string>
<string name="NotificationsPriorityHigh">High</string>
<string name="NotificationsPriorityMax">Max</string>
<string name="RepeatNotifications">Repeat Notifications</string>
<!--media view-->
<string name="NoMedia">Ainda não há mídia compartilhada</string>
<!--map view-->

View File

@ -106,7 +106,7 @@
<string name="SaveToDownloads">Save to downloads</string>
<string name="ApplyLocalizationFile">Apply localization file</string>
<string name="UnsupportedAttachment">Unsupported attachment</string>
<string name="SetTimer">Set timer</string>
<string name="SetTimer">Set self-destruct timer</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>
@ -147,7 +147,7 @@
<string name="SelectContact">Select Contact</string>
<string name="NoContacts">No contacts yet</string>
<string name="InviteText">Hey, let\'s switch to Telegram: http://telegram.org/dl2</string>
<string name="TodayAt">at</string>
<string name="TodayAt">today at</string>
<string name="YesterdayAt">yesterday at</string>
<string name="Online">online</string>
<string name="LastSeen">last seen</string>
@ -277,6 +277,7 @@
<string name="NotificationsPriorityLow">Low</string>
<string name="NotificationsPriorityHigh">High</string>
<string name="NotificationsPriorityMax">Max</string>
<string name="RepeatNotifications">Repeat Notifications</string>
<!--media view-->
<string name="NoMedia">No shared media yet</string>
<!--map view-->