2.6.1.1-475
*Add hashtags easily – recently used hashtags are instantly prompted after you input # *Added sounds for outgoing and incoming messages in the currently opened conversation *Long tap to clear search history for hashtags/gifs/images *Custom backgrounds now shown in Menu drawer +First emoticon will show all official Telegram stickers +MOD to hide custom background in Menu drawer +Option to set empty header title in main screen +Passcode screen themed +Bug fixes
@ -1,4 +1,4 @@
|
||||
### Telegram+ for Android
|
||||
### Plus Messenger for Android
|
||||
|
||||
This is an UNOFFICIAL app that uses [Telegram's API](https://core.telegram.org/api)
|
||||
|
||||
@ -13,9 +13,9 @@ Apply themes shared by other users.
|
||||
|
||||
**PRIVACY:** Mobile number can be hidden from Menu Drawer and Settings menu
|
||||
|
||||
**SOCIAL:** Get in touch with other Telegram+ users through [our Google+ community](https://plus.google.com/communities/106927015963860485525)
|
||||
**SOCIAL:** Get in touch with other Plus Messenger users through [our Google+ community](https://plus.google.com/communities/106927015963860485525)
|
||||
|
||||
This repo contains the source code for [Telegram+ App for Android](https://play.google.com/store/apps/details?id=org.telegram.plus).
|
||||
This repo contains the source code for [Plus Messenger App for Android](https://play.google.com/store/apps/details?id=org.telegram.plus).
|
||||
|
||||
### USAGE
|
||||
**Beware of using the dev branch and uploading it to any markets, in many cases it not will work as expected**.
|
||||
@ -25,5 +25,5 @@ Import the root folder into your IDE (tested on Android Studio), then run projec
|
||||
|
||||
### LOCALIZATION
|
||||
|
||||
Join our translation project if you want to collaborate: https://www.transifex.com/projects/p/telegramplus/
|
||||
Join our translation project if you want to collaborate: https://www.transifex.com/projects/p/plusmessenger/
|
||||
|
||||
|
@ -22,7 +22,7 @@ dependencies {
|
||||
|
||||
android {
|
||||
compileSdkVersion 22
|
||||
buildToolsVersion '22.0.0'
|
||||
buildToolsVersion '22.0.1'
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
@ -47,6 +47,7 @@ android {
|
||||
debuggable true
|
||||
jniDebuggable true
|
||||
signingConfig signingConfigs.debug
|
||||
applicationIdSuffix ".beta"
|
||||
}
|
||||
|
||||
release {
|
||||
@ -88,7 +89,7 @@ android {
|
||||
applicationId "org.telegram.plus"
|
||||
minSdkVersion 8
|
||||
targetSdkVersion 22
|
||||
versionCode 469
|
||||
versionName "2.6.0.2"
|
||||
versionCode 475
|
||||
versionName "2.6.1.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="org.telegram.messenger"
|
||||
android:installLocation="auto">
|
||||
|
||||
@ -9,25 +10,30 @@
|
||||
<uses-feature android:name="android.hardware.LOCATION" android:required="false" />
|
||||
|
||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
||||
<uses-permission android:name="org.telegram.plus.permission.MAPS_RECEIVE"/>
|
||||
<uses-permission android:name="org.telegram.plus.permission.C2D_MESSAGE" />
|
||||
<uses-permission android:name="org.telegram.plus.beta.permission.MAPS_RECEIVE"/>
|
||||
<uses-permission android:name="org.telegram.plus.beta.permission.C2D_MESSAGE" />
|
||||
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<!--
|
||||
<uses-permission android:name="org.telegram.plus.beta.android.provider.ACCESS" />-->
|
||||
|
||||
<permission android:name="org.telegram.plus.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
|
||||
<permission android:name="org.telegram.plus.permission.C2D_MESSAGE" android:protectionLevel="signature" />
|
||||
<permission android:name="org.telegram.plus.beta.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
|
||||
<permission android:name="org.telegram.plus.beta.permission.C2D_MESSAGE" android:protectionLevel="signature" />
|
||||
<!--
|
||||
<permission android:name="org.telegram.plus.beta.android.provider.ACCESS" android:protectionLevel="signature"/>-->
|
||||
|
||||
<application
|
||||
android:allowBackup="false"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/AppName"
|
||||
android:label="Plus beta"
|
||||
tools:replace="label"
|
||||
android:theme="@style/Theme.TMessages.Start"
|
||||
android:name=".ApplicationLoader"
|
||||
android:hardwareAccelerated="@bool/useHardwareAcceleration"
|
||||
android:largeHeap="true">
|
||||
|
||||
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCZi83oDrfsCQ3_Aokfmlv53gTBYPIGJ2Q" /><!--AIzaSyCq2oezhsHUM0e_FPU-DpP93c0WxpEK4Fc-->
|
||||
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyDFiyV4uu3lh66i_Jyn0mmhrJMNLyo2-0s" /><!--org.telegram.plus/AIzaSyCZi83oDrfsCQ3_Aokfmlv53gTBYPIGJ2Q-->
|
||||
|
||||
<activity android:name="net.hockeyapp.android.UpdateActivity" />
|
||||
|
||||
@ -37,7 +43,7 @@
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
||||
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
|
||||
<category android:name="org.telegram.plus" />
|
||||
<category android:name="org.telegram.plus.beta" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
|
@ -14,6 +14,8 @@
|
||||
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<!--
|
||||
<uses-permission android:name="org.telegram.plus.android.provider.ACCESS" />-->
|
||||
|
||||
<permission android:name="org.telegram.plus.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
|
||||
<permission android:name="org.telegram.plus.permission.C2D_MESSAGE" android:protectionLevel="signature" />
|
||||
@ -21,7 +23,7 @@
|
||||
<application
|
||||
android:allowBackup="false"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/AppName"
|
||||
android:label="@string/ShortAppName"
|
||||
android:theme="@style/Theme.TMessages.Start"
|
||||
android:name=".ApplicationLoader"
|
||||
android:hardwareAccelerated="@bool/useHardwareAcceleration"
|
||||
|
@ -39,13 +39,15 @@
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<!--
|
||||
<uses-permission android:name="org.telegram.plus.android.provider.ACCESS" />-->
|
||||
|
||||
<application
|
||||
android:name=".ApplicationLoader"
|
||||
android:allowBackup="false"
|
||||
android:hardwareAccelerated="@bool/useHardwareAcceleration"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/AppName"
|
||||
android:label="@string/ShortAppName"
|
||||
android:largeHeap="true"
|
||||
android:theme="@style/Theme.TMessages.Start">
|
||||
|
||||
|
@ -78,9 +78,11 @@ public class AndroidUtilities {
|
||||
public static Point displaySize = new Point();
|
||||
public static Integer photoSize = null;
|
||||
public static DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
public static int leftBaseline;
|
||||
private static Boolean isTablet = null;
|
||||
|
||||
public static final String THEME_PREFS = "theme";
|
||||
public static final int THEME_PREFS_MODE = Activity.MODE_WORLD_READABLE;
|
||||
|
||||
public static final int defColor = 0xff009688;//0xff58BCD5;//0xff43C3DB;//0xff2f8cc9;58BCD5//0xff55abd2
|
||||
public static int themeColor = getIntColor("themeColor");
|
||||
@ -89,6 +91,7 @@ public class AndroidUtilities {
|
||||
|
||||
static {
|
||||
density = ApplicationLoader.applicationContext.getResources().getDisplayMetrics().density;
|
||||
leftBaseline = isTablet() ? 80 : 72;
|
||||
checkDisplaySize();
|
||||
}
|
||||
|
||||
@ -602,17 +605,17 @@ public class AndroidUtilities {
|
||||
}*/
|
||||
//PLUS
|
||||
public static int getIntColor(String key){
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, THEME_PREFS_MODE);
|
||||
return themePrefs.getInt(key, defColor);
|
||||
}
|
||||
|
||||
public static int getIntDef(String key, int def){
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, THEME_PREFS_MODE);
|
||||
return themePrefs.getInt(key, def);
|
||||
}
|
||||
|
||||
public static int getIntAlphaColor(String key, int def, float factor){
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, THEME_PREFS_MODE);
|
||||
int color = themePrefs.getInt(key, def);
|
||||
int alpha = Math.round(Color.alpha(color) * factor);
|
||||
int red = Color.red(color);
|
||||
@ -622,7 +625,7 @@ public class AndroidUtilities {
|
||||
}
|
||||
|
||||
public static int getIntDarkerColor(String key, int factor){
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, THEME_PREFS_MODE);
|
||||
int color = themePrefs.getInt(key, defColor);
|
||||
return setDarkColor(color, factor);
|
||||
}
|
||||
@ -655,7 +658,7 @@ public class AndroidUtilities {
|
||||
}
|
||||
|
||||
public static void setIntColor(String key, int value){
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor e = themePrefs.edit();
|
||||
e.putInt(key, value);
|
||||
e.commit();
|
||||
|
@ -108,7 +108,7 @@ public class MessageObject {
|
||||
fromUser = MessagesController.getInstance().getUser(message.from_id);
|
||||
}
|
||||
if (message.action instanceof TLRPC.TL_messageActionChatCreate) {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = LocaleController.getString("ActionYouCreateGroup", R.string.ActionYouCreateGroup);
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -119,7 +119,7 @@ public class MessageObject {
|
||||
}
|
||||
} else if (message.action instanceof TLRPC.TL_messageActionChatDeleteUser) {
|
||||
if (message.action.user_id == message.from_id) {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = LocaleController.getString("ActionYouLeftUser", R.string.ActionYouLeftUser);
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -137,7 +137,7 @@ public class MessageObject {
|
||||
whoUser = MessagesController.getInstance().getUser(message.action.user_id);
|
||||
}
|
||||
if (whoUser != null && fromUser != null) {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = replaceWithLink(LocaleController.getString("ActionYouKickUser", R.string.ActionYouKickUser), "un2", whoUser);
|
||||
} else if (message.action.user_id == UserConfig.getClientUserId()) {
|
||||
messageText = replaceWithLink(LocaleController.getString("ActionKickUserYou", R.string.ActionKickUserYou), "un1", fromUser);
|
||||
@ -158,7 +158,7 @@ public class MessageObject {
|
||||
whoUser = MessagesController.getInstance().getUser(message.action.user_id);
|
||||
}
|
||||
if (whoUser != null && fromUser != null) {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = replaceWithLink(LocaleController.getString("ActionYouAddUser", R.string.ActionYouAddUser), "un2", whoUser);
|
||||
} else if (message.action.user_id == UserConfig.getClientUserId()) {
|
||||
messageText = replaceWithLink(LocaleController.getString("ActionAddUserYou", R.string.ActionAddUserYou), "un1", fromUser);
|
||||
@ -170,7 +170,7 @@ public class MessageObject {
|
||||
messageText = LocaleController.getString("ActionAddUser", R.string.ActionAddUser).replace("un2", "").replace("un1", "");
|
||||
}
|
||||
} else if (message.action instanceof TLRPC.TL_messageActionChatEditPhoto) {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = LocaleController.getString("ActionYouChangedPhoto", R.string.ActionYouChangedPhoto);
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -180,7 +180,7 @@ public class MessageObject {
|
||||
}
|
||||
}
|
||||
} else if (message.action instanceof TLRPC.TL_messageActionChatEditTitle) {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = LocaleController.getString("ActionYouChangedTitle", R.string.ActionYouChangedTitle).replace("un2", message.action.title);
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -190,7 +190,7 @@ public class MessageObject {
|
||||
}
|
||||
}
|
||||
} else if (message.action instanceof TLRPC.TL_messageActionChatDeletePhoto) {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = LocaleController.getString("ActionYouRemovedPhoto", R.string.ActionYouRemovedPhoto);
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -201,7 +201,7 @@ public class MessageObject {
|
||||
}
|
||||
} else if (message.action instanceof TLRPC.TL_messageActionTTLChange) {
|
||||
if (message.action.ttl != 0) {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = LocaleController.formatString("MessageLifetimeChangedOutgoing", R.string.MessageLifetimeChangedOutgoing, AndroidUtilities.formatTTLString(message.action.ttl));
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -211,7 +211,7 @@ public class MessageObject {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = LocaleController.getString("MessageLifetimeYouRemoved", R.string.MessageLifetimeYouRemoved);
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -251,7 +251,7 @@ public class MessageObject {
|
||||
}
|
||||
} else if (message.action instanceof TLRPC.TL_messageEncryptedAction) {
|
||||
if (message.action.encryptedAction instanceof TLRPC.TL_decryptedMessageActionScreenshotMessages) {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = LocaleController.formatString("ActionTakeScreenshootYou", R.string.ActionTakeScreenshootYou);
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -263,7 +263,7 @@ public class MessageObject {
|
||||
} else if (message.action.encryptedAction instanceof TLRPC.TL_decryptedMessageActionSetMessageTTL) {
|
||||
TLRPC.TL_decryptedMessageActionSetMessageTTL action = (TLRPC.TL_decryptedMessageActionSetMessageTTL) message.action.encryptedAction;
|
||||
if (action.ttl_seconds != 0) {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = LocaleController.formatString("MessageLifetimeChangedOutgoing", R.string.MessageLifetimeChangedOutgoing, AndroidUtilities.formatTTLString(action.ttl_seconds));
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -273,7 +273,7 @@ public class MessageObject {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isFromMe()) {
|
||||
if (isOut()) {
|
||||
messageText = LocaleController.getString("MessageLifetimeYouRemoved", R.string.MessageLifetimeYouRemoved);
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -568,7 +568,7 @@ public class MessageObject {
|
||||
}
|
||||
|
||||
try {
|
||||
Pattern pattern = Pattern.compile("(^|\\s)@[a-zA-Z\\d_]{5,32}|(^|\\s)#[\\w@\\.]+");
|
||||
Pattern pattern = Pattern.compile("(^|\\s)@[a-zA-Z\\d_]{5,32}|(^|\\s)#[\\w\\.]+");
|
||||
Matcher matcher = pattern.matcher(messageText);
|
||||
while (matcher.find()) {
|
||||
int start = matcher.start();
|
||||
@ -586,13 +586,13 @@ public class MessageObject {
|
||||
|
||||
int maxWidth;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (messageOwner.to_id.chat_id != 0) {
|
||||
if (messageOwner.to_id.chat_id != 0 && !isOut()) {
|
||||
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
|
||||
} else {
|
||||
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(80);
|
||||
}
|
||||
} else {
|
||||
if (messageOwner.to_id.chat_id != 0) {
|
||||
if (messageOwner.to_id.chat_id != 0 && !isOut()) {
|
||||
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
|
||||
} else {
|
||||
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(80);
|
||||
@ -742,10 +742,6 @@ public class MessageObject {
|
||||
return (messageOwner.flags & TLRPC.MESSAGE_FLAG_OUT) != 0;
|
||||
}
|
||||
|
||||
public boolean isFromMe() {
|
||||
return messageOwner.from_id == UserConfig.getClientUserId();
|
||||
}
|
||||
|
||||
public boolean isUnread() {
|
||||
return (messageOwner.flags & TLRPC.MESSAGE_FLAG_UNREAD) != 0;
|
||||
}
|
||||
@ -791,7 +787,7 @@ public class MessageObject {
|
||||
} else {
|
||||
if (messageOwner.to_id.chat_id != 0) {
|
||||
return -messageOwner.to_id.chat_id;
|
||||
} else if (isFromMe()) {
|
||||
} else if (isOut()) {
|
||||
return messageOwner.to_id.user_id;
|
||||
} else {
|
||||
return messageOwner.from_id;
|
||||
|
@ -1293,7 +1293,11 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
if (label.length() != 0) {
|
||||
label += ", ";
|
||||
}
|
||||
label += ContactsController.formatName(user.first_name, user.last_name);
|
||||
if (user.first_name != null && user.first_name.length() > 0) {
|
||||
label += user.first_name;
|
||||
} else if (user.last_name != null && user.last_name.length() > 0) {
|
||||
label += user.last_name;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
if (count == 2) {
|
||||
@ -2597,7 +2601,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
|
||||
public void getDifference() {
|
||||
registerForPush(UserConfig.pushString);
|
||||
if (MessagesStorage.lastDateValue == 0) {
|
||||
if (MessagesStorage.lastPtsValue == 0) {
|
||||
loadCurrentState();
|
||||
return;
|
||||
}
|
||||
@ -2713,7 +2717,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
}
|
||||
}
|
||||
|
||||
if (!obj.isFromMe() && obj.isUnread()) {
|
||||
if (!obj.isOut() && obj.isUnread()) {
|
||||
pushMessages.add(obj);
|
||||
}
|
||||
|
||||
@ -2946,7 +2950,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
AndroidUtilities.runOnUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!obj.isFromMe() && obj.isUnread()) {
|
||||
if (!obj.isOut()) {
|
||||
NotificationsController.getInstance().processNewMessages(objArr, true);
|
||||
}
|
||||
}
|
||||
@ -3192,7 +3196,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
messages.put(uid, arr);
|
||||
}
|
||||
arr.add(obj);
|
||||
if (!obj.isFromMe() && obj.isUnread()) {
|
||||
if (!obj.isOut() && obj.isUnread()) {
|
||||
pushMessages.add(obj);
|
||||
}
|
||||
} else if (update instanceof TLRPC.TL_updateReadMessages) {
|
||||
|
@ -122,6 +122,7 @@ public class MessagesStorage {
|
||||
database.executeFast("CREATE TABLE messages_seq(mid INTEGER PRIMARY KEY, seq_in INTEGER, seq_out INTEGER);").stepThis().dispose();
|
||||
database.executeFast("CREATE TABLE web_recent_v3(id TEXT, type INTEGER, image_url TEXT, thumb_url TEXT, local_url TEXT, width INTEGER, height INTEGER, size INTEGER, date INTEGER, PRIMARY KEY (id, type));").stepThis().dispose();
|
||||
database.executeFast("CREATE TABLE stickers(id INTEGER PRIMARY KEY, data BLOB, date INTEGER);").stepThis().dispose();
|
||||
database.executeFast("CREATE TABLE hashtag_recent_v2(id TEXT PRIMARY KEY, date INTEGER);").stepThis().dispose();
|
||||
|
||||
database.executeFast("CREATE TABLE user_contacts_v6(uid INTEGER PRIMARY KEY, fname TEXT, sname TEXT)").stepThis().dispose();
|
||||
database.executeFast("CREATE TABLE user_phones_v6(uid INTEGER, phone TEXT, sphone TEXT, deleted INTEGER, PRIMARY KEY (uid, phone))").stepThis().dispose();
|
||||
@ -162,7 +163,7 @@ public class MessagesStorage {
|
||||
database.executeFast("CREATE TABLE keyvalue(id TEXT PRIMARY KEY, value TEXT)").stepThis().dispose();
|
||||
|
||||
//version
|
||||
database.executeFast("PRAGMA user_version = 14").stepThis().dispose();
|
||||
database.executeFast("PRAGMA user_version = 15").stepThis().dispose();
|
||||
} else {
|
||||
try {
|
||||
SQLiteCursor cursor = database.queryFinalized("SELECT seq, pts, date, qts, lsv, sg, pbytes FROM params WHERE id = 1");
|
||||
@ -193,7 +194,7 @@ public class MessagesStorage {
|
||||
}
|
||||
}
|
||||
int version = database.executeInt("PRAGMA user_version");
|
||||
if (version < 14) {
|
||||
if (version < 15) {
|
||||
updateDbToLastVersion(version);
|
||||
}
|
||||
}
|
||||
@ -373,6 +374,11 @@ public class MessagesStorage {
|
||||
database.executeFast("PRAGMA user_version = 14").stepThis().dispose();
|
||||
version = 14;
|
||||
}
|
||||
if (version == 14 && version < 15) {
|
||||
database.executeFast("CREATE TABLE IF NOT EXISTS hashtag_recent_v2(id TEXT PRIMARY KEY, date INTEGER);").stepThis().dispose();
|
||||
database.executeFast("PRAGMA user_version = 15").stepThis().dispose();
|
||||
version = 15;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
@ -627,7 +633,7 @@ public class MessagesStorage {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
SQLiteCursor cursor = database.queryFinalized("SELECT id, image_url, thumb_url, local_url, width, height, size, date FROM web_recent_v3 wallpapers WHERE type = " + type);
|
||||
SQLiteCursor cursor = database.queryFinalized("SELECT id, image_url, thumb_url, local_url, width, height, size, date FROM web_recent_v3 WHERE type = " + type);
|
||||
final ArrayList<MediaController.SearchImage> arrayList = new ArrayList<>();
|
||||
while (cursor.next()) {
|
||||
MediaController.SearchImage searchImage = new MediaController.SearchImage();
|
||||
@ -684,6 +690,19 @@ public class MessagesStorage {
|
||||
});
|
||||
}
|
||||
|
||||
public void clearWebRecent(final int type) {
|
||||
storageQueue.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
database.executeFast("DELETE FROM web_recent_v3 WHERE type = " + type).stepThis().dispose();
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void putWebRecent(final ArrayList<MediaController.SearchImage> arrayList) {
|
||||
storageQueue.postRunnable(new Runnable() {
|
||||
@Override
|
||||
|
@ -19,6 +19,8 @@ import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.media.AudioManager;
|
||||
import android.media.MediaPlayer;
|
||||
import android.media.SoundPool;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.SystemClock;
|
||||
@ -66,6 +68,13 @@ public class NotificationsController {
|
||||
private int personal_count = 0;
|
||||
private boolean notifyCheck = false;
|
||||
private int lastOnlineFromOtherDevice = 0;
|
||||
private boolean inChatSoundEnabled = true;
|
||||
|
||||
private SoundPool soundPool;
|
||||
private int inChatOutgoingSound;
|
||||
private long lastSoundPlay;
|
||||
private MediaPlayer mediaPlayer;
|
||||
private String lastMediaPlayerUri;
|
||||
|
||||
private static volatile NotificationsController Instance = null;
|
||||
public static NotificationsController getInstance() {
|
||||
@ -83,6 +92,16 @@ public class NotificationsController {
|
||||
|
||||
public NotificationsController() {
|
||||
notificationManager = NotificationManagerCompat.from(ApplicationLoader.applicationContext);
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Context.MODE_PRIVATE);
|
||||
inChatSoundEnabled = preferences.getBoolean("EnableInChatSound", true);
|
||||
|
||||
try {
|
||||
soundPool = new SoundPool(1, AudioManager.STREAM_NOTIFICATION, 0);
|
||||
inChatOutgoingSound = soundPool.load(ApplicationLoader.applicationContext, R.raw.sound_out, 1);
|
||||
mediaPlayer = new MediaPlayer();
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void cleanup() {
|
||||
@ -101,6 +120,10 @@ public class NotificationsController {
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
public void setInChatSoundEnabled(boolean value) {
|
||||
inChatSoundEnabled = value;
|
||||
}
|
||||
|
||||
public void setOpennedDialogId(long dialog_id) {
|
||||
openned_dialog_id = dialog_id;
|
||||
}
|
||||
@ -825,6 +848,63 @@ public class NotificationsController {
|
||||
}
|
||||
}
|
||||
|
||||
private void playInChatSound() {
|
||||
if (!inChatSoundEnabled) {
|
||||
return;
|
||||
}
|
||||
if (lastSoundPlay > System.currentTimeMillis() - 1800) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
String choosenSoundPath = null;
|
||||
String defaultPath = Settings.System.DEFAULT_NOTIFICATION_URI.getPath();
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Context.MODE_PRIVATE);
|
||||
choosenSoundPath = preferences.getString("sound_path_" + openned_dialog_id, null);
|
||||
boolean isChat = (int)(openned_dialog_id) < 0;
|
||||
if (isChat) {
|
||||
if (choosenSoundPath != null && choosenSoundPath.equals(defaultPath)) {
|
||||
choosenSoundPath = null;
|
||||
} else if (choosenSoundPath == null) {
|
||||
choosenSoundPath = preferences.getString("GroupSoundPath", defaultPath);
|
||||
}
|
||||
} else {
|
||||
if (choosenSoundPath != null && choosenSoundPath.equals(defaultPath)) {
|
||||
choosenSoundPath = null;
|
||||
} else if (choosenSoundPath == null) {
|
||||
choosenSoundPath = preferences.getString("GlobalSoundPath", defaultPath);
|
||||
}
|
||||
}
|
||||
|
||||
if (choosenSoundPath != null && !choosenSoundPath.equals("NoSound")) {
|
||||
if (lastMediaPlayerUri == null || !choosenSoundPath.equals(lastMediaPlayerUri)) {
|
||||
lastMediaPlayerUri = choosenSoundPath;
|
||||
mediaPlayer.reset();
|
||||
mediaPlayer.setAudioStreamType(AudioManager.STREAM_NOTIFICATION);
|
||||
if (choosenSoundPath.equals(defaultPath)) {
|
||||
mediaPlayer.setDataSource(ApplicationLoader.applicationContext, Settings.System.DEFAULT_NOTIFICATION_URI);
|
||||
} else {
|
||||
mediaPlayer.setDataSource(ApplicationLoader.applicationContext, Uri.parse(choosenSoundPath));
|
||||
}
|
||||
mediaPlayer.prepare();
|
||||
}
|
||||
mediaPlayer.start();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void playOutChatSound() {
|
||||
if (!inChatSoundEnabled) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
soundPool.play(inChatOutgoingSound, 1, 1, 1, 0, 1);
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void processNewMessages(ArrayList<MessageObject> messageObjects, boolean isLast) {
|
||||
if (messageObjects.isEmpty()) {
|
||||
return;
|
||||
@ -843,6 +923,7 @@ public class NotificationsController {
|
||||
long dialog_id = messageObject.getDialogId();
|
||||
long original_dialog_id = dialog_id;
|
||||
if (dialog_id == openned_dialog_id && ApplicationLoader.isScreenOn) {
|
||||
playInChatSound();
|
||||
continue;
|
||||
}
|
||||
if ((messageObject.messageOwner.flags & TLRPC.MESSAGE_FLAG_MENTION) != 0) {
|
||||
|
@ -1515,7 +1515,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
});
|
||||
}
|
||||
}
|
||||
}, (req instanceof TLRPC.TL_messages_forwardMessages ? null : new RPCRequest.RPCQuickAckDelegate() {
|
||||
}, new RPCRequest.RPCQuickAckDelegate() {
|
||||
@Override
|
||||
public void quickAck() {
|
||||
final int msg_id = newMsgObj.id;
|
||||
@ -1527,7 +1527,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
}
|
||||
});
|
||||
}
|
||||
}), true, RPCRequest.RPCRequestClassGeneric | RPCRequest.RPCRequestClassCanCompress, ConnectionsManager.DEFAULT_DATACENTER_ID);
|
||||
}, true, RPCRequest.RPCRequestClassGeneric | RPCRequest.RPCRequestClassCanCompress, ConnectionsManager.DEFAULT_DATACENTER_ID);
|
||||
}
|
||||
|
||||
private void processSentMessage(TLRPC.Message newMsg, TLRPC.Message sentMessage, String originalPath) {
|
||||
@ -1811,6 +1811,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
}
|
||||
if (bmOptions.outWidth != 0 && bmOptions.outHeight != 0 && bmOptions.outWidth <= 800 && bmOptions.outHeight <= 800) {
|
||||
TLRPC.TL_documentAttributeSticker attributeSticker = new TLRPC.TL_documentAttributeSticker();
|
||||
attributeSticker.alt = "";
|
||||
document.attributes.add(attributeSticker);
|
||||
TLRPC.TL_documentAttributeImageSize attributeImageSize = new TLRPC.TL_documentAttributeImageSize();
|
||||
attributeImageSize.w = bmOptions.outWidth;
|
||||
|
@ -237,7 +237,10 @@ public class MP4Builder {
|
||||
}
|
||||
|
||||
public long getTimescale(Mp4Movie mp4Movie) {
|
||||
long timescale = mp4Movie.getTracks().iterator().next().getTimeScale();
|
||||
long timescale = 0;
|
||||
if (!mp4Movie.getTracks().isEmpty()) {
|
||||
timescale = mp4Movie.getTracks().iterator().next().getTimeScale();
|
||||
}
|
||||
for (Track track : mp4Movie.getTracks()) {
|
||||
timescale = gcd(track.getTimeScale(), timescale);
|
||||
}
|
||||
|
@ -40,7 +40,8 @@ public class FileLog {
|
||||
}
|
||||
|
||||
public FileLog() {
|
||||
if (!BuildVars.DEBUG_VERSION) {
|
||||
//if (!BuildVars.DEBUG_VERSION) {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
return;
|
||||
}
|
||||
dateFormat = FastDateFormat.getInstance("dd_MM_yyyy_HH_mm_ss", Locale.US);
|
||||
@ -74,7 +75,8 @@ public class FileLog {
|
||||
}
|
||||
|
||||
public static void e(final String tag, final String message, final Throwable exception) {
|
||||
if (!BuildVars.DEBUG_VERSION) {
|
||||
//if (!BuildVars.DEBUG_VERSION) {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
return;
|
||||
}
|
||||
Log.e(tag, message, exception);
|
||||
@ -95,7 +97,8 @@ public class FileLog {
|
||||
}
|
||||
|
||||
public static void e(final String tag, final String message) {
|
||||
if (!BuildVars.DEBUG_VERSION) {
|
||||
//if (!BuildVars.DEBUG_VERSION) {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
return;
|
||||
}
|
||||
Log.e(tag, message);
|
||||
@ -115,7 +118,8 @@ public class FileLog {
|
||||
}
|
||||
|
||||
public static void e(final String tag, final Throwable e) {
|
||||
if (!BuildVars.DEBUG_VERSION) {
|
||||
//if (!BuildVars.DEBUG_VERSION) {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
return;
|
||||
}
|
||||
e.printStackTrace();
|
||||
@ -141,7 +145,8 @@ public class FileLog {
|
||||
}
|
||||
|
||||
public static void d(final String tag, final String message) {
|
||||
if (!BuildVars.DEBUG_VERSION) {
|
||||
//if (!BuildVars.DEBUG_VERSION) {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
return;
|
||||
}
|
||||
Log.d(tag, message);
|
||||
@ -161,7 +166,8 @@ public class FileLog {
|
||||
}
|
||||
|
||||
public static void w(final String tag, final String message) {
|
||||
if (!BuildVars.DEBUG_VERSION) {
|
||||
//if (!BuildVars.DEBUG_VERSION) {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
return;
|
||||
}
|
||||
Log.w(tag, message);
|
||||
|
@ -108,7 +108,7 @@ public class FileUploadOperation {
|
||||
if (estimatedSize != 0 && finalSize != 0) {
|
||||
estimatedSize = 0;
|
||||
totalFileSize = finalSize;
|
||||
totalPartsCount = (int) Math.ceil((float) totalFileSize / (float) uploadChunkSize);
|
||||
totalPartsCount = (int) (totalFileSize + uploadChunkSize - 1) / uploadChunkSize;
|
||||
if (started) {
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("uploadinfo", Activity.MODE_PRIVATE);
|
||||
storeFileUploadInfo(preferences);
|
||||
@ -162,7 +162,7 @@ public class FileUploadOperation {
|
||||
}
|
||||
}
|
||||
|
||||
uploadChunkSize = (int) Math.max(32, Math.ceil(totalFileSize / (1024.0f * 3000)));
|
||||
uploadChunkSize = (int) Math.max(32, (totalFileSize + 1024 * 3000 - 1) / (1024 * 3000));
|
||||
if (1024 % uploadChunkSize != 0) {
|
||||
int chunkSize = 64;
|
||||
while (uploadChunkSize > chunkSize) {
|
||||
@ -172,7 +172,7 @@ public class FileUploadOperation {
|
||||
}
|
||||
|
||||
uploadChunkSize *= 1024;
|
||||
totalPartsCount = (int) Math.ceil((float) totalFileSize / (float) uploadChunkSize);
|
||||
totalPartsCount = (int) (totalFileSize + uploadChunkSize - 1) / uploadChunkSize;
|
||||
readBuffer = new byte[uploadChunkSize];
|
||||
|
||||
fileKey = Utilities.MD5(uploadingFilePath + (isEncrypted ? "enc" : ""));
|
||||
@ -355,7 +355,7 @@ public class FileUploadOperation {
|
||||
if (error == null) {
|
||||
if (response instanceof TLRPC.TL_boolTrue) {
|
||||
currentPartNum++;
|
||||
delegate.didChangedUploadProgress(FileUploadOperation.this, (float) currentUploaded / (float) totalFileSize);
|
||||
delegate.didChangedUploadProgress(FileUploadOperation.this, currentUploaded / (float) totalFileSize);
|
||||
if (isLastPart) {
|
||||
state = 3;
|
||||
if (key == null) {
|
||||
|
@ -464,8 +464,11 @@ public class TLClassStore {
|
||||
}
|
||||
} else {
|
||||
FileLog.e("tmessages", String.format("unknown class %x", constructor));
|
||||
return null;
|
||||
//throw new RuntimeException(String.format("unknown class %x", constructor));
|
||||
if (BuildVars.DEBUG_VERSION) {
|
||||
throw new RuntimeException(String.format("unknown class %x", constructor));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -763,7 +763,8 @@ public class Utilities {
|
||||
}
|
||||
|
||||
public static void checkForUpdates(Activity context) {
|
||||
if (BuildVars.DEBUG_VERSION) {
|
||||
//if (BuildVars.DEBUG_VERSION) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
UpdateManager.register(context, BuildVars.HOCKEY_APP_HASH);
|
||||
}
|
||||
}
|
||||
|
@ -430,10 +430,10 @@ public class ActionBar extends FrameLayout {
|
||||
}
|
||||
|
||||
public void openSearchField(String text) {
|
||||
if (isSearchFieldVisible || menu == null) {
|
||||
if (menu == null || text == null) {
|
||||
return;
|
||||
}
|
||||
menu.openSearchField(text);
|
||||
menu.openSearchField(!isSearchFieldVisible, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -505,8 +505,6 @@ public class ActionBar extends FrameLayout {
|
||||
backButtonImageView.setBackgroundResource(itemsBackgroundResourceId);
|
||||
}
|
||||
//
|
||||
//SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
//setBackgroundColor(themePrefs.getInt("themeColor", 0x000000));
|
||||
setBackgroundColor(AndroidUtilities.getIntColor("themeColor"));
|
||||
//
|
||||
}
|
||||
|
@ -153,13 +153,15 @@ public class ActionBarMenu extends LinearLayout {
|
||||
}
|
||||
}
|
||||
|
||||
public void openSearchField(String text) {
|
||||
public void openSearchField(boolean toggle, String text) {
|
||||
for (int a = 0; a < getChildCount(); a++) {
|
||||
View view = getChildAt(a);
|
||||
if (view instanceof ActionBarMenuItem) {
|
||||
ActionBarMenuItem item = (ActionBarMenuItem)view;
|
||||
if (item.isSearchField()) {
|
||||
parentActionBar.onSearchFieldVisibilityChanged(item.toggleSearch());
|
||||
if (toggle) {
|
||||
parentActionBar.onSearchFieldVisibilityChanged(item.toggleSearch());
|
||||
}
|
||||
item.getSearchField().setText(text);
|
||||
item.getSearchField().setSelection(text.length());
|
||||
break;
|
||||
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* 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.Adapters;
|
||||
|
||||
import org.telegram.android.AndroidUtilities;
|
||||
import org.telegram.messenger.ConnectionsManager;
|
||||
import org.telegram.messenger.RPCRequest;
|
||||
import org.telegram.messenger.TLObject;
|
||||
import org.telegram.messenger.TLRPC;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class BaseContactsSearchAdapter extends BaseFragmentAdapter {
|
||||
|
||||
protected ArrayList<TLRPC.User> globalSearch = new ArrayList<>();
|
||||
private long reqId = 0;
|
||||
private int lastReqId;
|
||||
protected String lastFoundUsername = null;
|
||||
|
||||
public void queryServerSearch(final String query) {
|
||||
if (reqId != 0) {
|
||||
ConnectionsManager.getInstance().cancelRpc(reqId, true);
|
||||
reqId = 0;
|
||||
}
|
||||
if (query == null || query.length() < 5) {
|
||||
globalSearch.clear();
|
||||
lastReqId = 0;
|
||||
notifyDataSetChanged();
|
||||
return;
|
||||
}
|
||||
TLRPC.TL_contacts_search req = new TLRPC.TL_contacts_search();
|
||||
req.q = query;
|
||||
req.limit = 50;
|
||||
final int currentReqId = ++lastReqId;
|
||||
reqId = ConnectionsManager.getInstance().performRpc(req, new RPCRequest.RPCRequestDelegate() {
|
||||
@Override
|
||||
public void run(final TLObject response, final TLRPC.TL_error error) {
|
||||
AndroidUtilities.runOnUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (currentReqId == lastReqId) {
|
||||
if (error == null) {
|
||||
TLRPC.TL_contacts_found res = (TLRPC.TL_contacts_found) response;
|
||||
globalSearch = res.users;
|
||||
lastFoundUsername = query;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
reqId = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
}, true, RPCRequest.RPCRequestClassGeneric | RPCRequest.RPCRequestClassFailOnServerErrors);
|
||||
}
|
||||
}
|
@ -1,306 +0,0 @@
|
||||
/*
|
||||
* This is the source code of Telegram for Android v. 1.3.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.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Html;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import org.telegram.android.AndroidUtilities;
|
||||
import org.telegram.android.LocaleController;
|
||||
import org.telegram.messenger.R;
|
||||
import org.telegram.messenger.TLRPC;
|
||||
import org.telegram.android.ContactsController;
|
||||
import org.telegram.messenger.FileLog;
|
||||
import org.telegram.android.MessagesController;
|
||||
import org.telegram.messenger.UserConfig;
|
||||
import org.telegram.messenger.Utilities;
|
||||
import org.telegram.ui.Cells.GreySectionCell;
|
||||
import org.telegram.ui.Cells.ProfileSearchCell;
|
||||
import org.telegram.ui.Cells.UserCell;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
public class ContactsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
private Context mContext;
|
||||
private HashMap<Integer, TLRPC.User> ignoreUsers;
|
||||
private ArrayList<TLRPC.User> searchResult = new ArrayList<>();
|
||||
private ArrayList<CharSequence> searchResultNames = new ArrayList<>();
|
||||
private HashMap<Integer, ?> checkedMap;
|
||||
private Timer searchTimer;
|
||||
private boolean allowUsernameSearch;
|
||||
private boolean useUserCell;
|
||||
|
||||
public ContactsSearchAdapter(Context context, HashMap<Integer, TLRPC.User> arg1, boolean usernameSearch) {
|
||||
mContext = context;
|
||||
ignoreUsers = arg1;
|
||||
allowUsernameSearch = usernameSearch;
|
||||
}
|
||||
|
||||
public void setCheckedMap(HashMap<Integer, ?> map) {
|
||||
checkedMap = map;
|
||||
}
|
||||
|
||||
public void setUseUserCell(boolean value) {
|
||||
useUserCell = value;
|
||||
}
|
||||
|
||||
public void searchDialogs(final String query) {
|
||||
try {
|
||||
if (searchTimer != null) {
|
||||
searchTimer.cancel();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
if (query == null) {
|
||||
searchResult.clear();
|
||||
searchResultNames.clear();
|
||||
if (allowUsernameSearch) {
|
||||
queryServerSearch(null);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
} else {
|
||||
searchTimer = new Timer();
|
||||
searchTimer.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
searchTimer.cancel();
|
||||
searchTimer = null;
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
processSearch(query);
|
||||
}
|
||||
}, 200, 300);
|
||||
}
|
||||
}
|
||||
|
||||
private void processSearch(final String query) {
|
||||
AndroidUtilities.runOnUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (allowUsernameSearch) {
|
||||
queryServerSearch(query);
|
||||
}
|
||||
final ArrayList<TLRPC.TL_contact> contactsCopy = new ArrayList<>();
|
||||
contactsCopy.addAll(ContactsController.getInstance().contacts);
|
||||
Utilities.searchQueue.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String search1 = query.trim().toLowerCase();
|
||||
if (search1.length() == 0) {
|
||||
updateSearchResults(new ArrayList<TLRPC.User>(), new ArrayList<CharSequence>());
|
||||
return;
|
||||
}
|
||||
String search2 = LocaleController.getInstance().getTranslitString(search1);
|
||||
if (search1.equals(search2) || search2.length() == 0) {
|
||||
search2 = null;
|
||||
}
|
||||
String search[] = new String[1 + (search2 != null ? 1 : 0)];
|
||||
search[0] = search1;
|
||||
if (search2 != null) {
|
||||
search[1] = search2;
|
||||
}
|
||||
|
||||
ArrayList<TLRPC.User> resultArray = new ArrayList<>();
|
||||
ArrayList<CharSequence> resultArrayNames = new ArrayList<>();
|
||||
|
||||
for (TLRPC.TL_contact contact : contactsCopy) {
|
||||
TLRPC.User user = MessagesController.getInstance().getUser(contact.user_id);
|
||||
if (user.id == UserConfig.getClientUserId()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String name = ContactsController.formatName(user.first_name, user.last_name).toLowerCase();
|
||||
String tName = LocaleController.getInstance().getTranslitString(name);
|
||||
if (name.equals(tName)) {
|
||||
tName = null;
|
||||
}
|
||||
|
||||
int found = 0;
|
||||
for (String q : search) {
|
||||
if (name.startsWith(q) || name.contains(" " + q) || tName != null && (tName.startsWith(q) || tName.contains(" " + q))) {
|
||||
found = 1;
|
||||
} else if (user.username != null && user.username.startsWith(q)) {
|
||||
found = 2;
|
||||
}
|
||||
|
||||
if (found != 0) {
|
||||
if (found == 1) {
|
||||
resultArrayNames.add(Utilities.generateSearchName(user.first_name, user.last_name, q));
|
||||
} else {
|
||||
resultArrayNames.add(Utilities.generateSearchName("@" + user.username, null, "@" + q));
|
||||
}
|
||||
resultArray.add(user);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updateSearchResults(resultArray, resultArrayNames);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void updateSearchResults(final ArrayList<TLRPC.User> users, final ArrayList<CharSequence> names) {
|
||||
AndroidUtilities.runOnUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
searchResult = users;
|
||||
searchResultNames = names;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areAllItemsEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled(int i) {
|
||||
return i != searchResult.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
int count = searchResult.size();
|
||||
int globalCount = globalSearch.size();
|
||||
if (globalCount != 0) {
|
||||
count += globalCount + 1;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public boolean isGlobalSearch(int i) {
|
||||
int localCount = searchResult.size();
|
||||
int globalCount = globalSearch.size();
|
||||
if (i >= 0 && i < localCount) {
|
||||
return false;
|
||||
} else if (i > localCount && i <= globalCount + localCount) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TLRPC.User getItem(int i) {
|
||||
int localCount = searchResult.size();
|
||||
int globalCount = globalSearch.size();
|
||||
if (i >= 0 && i < localCount) {
|
||||
return searchResult.get(i);
|
||||
} else if (i > localCount && i <= globalCount + localCount) {
|
||||
return globalSearch.get(i - localCount - 1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasStableIds() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||
if (i == searchResult.size()) {
|
||||
if (view == null) {
|
||||
view = new GreySectionCell(mContext);
|
||||
((GreySectionCell) view).setText(LocaleController.getString("GlobalSearch", R.string.GlobalSearch));
|
||||
}
|
||||
} else {
|
||||
if (view == null) {
|
||||
if (useUserCell) {
|
||||
view = new UserCell(mContext, 1);
|
||||
if (checkedMap != null) {
|
||||
((UserCell) view).setChecked(false, false);
|
||||
}
|
||||
} else {
|
||||
view = new ProfileSearchCell(mContext);
|
||||
}
|
||||
}
|
||||
String hexDarkColor = String.format("#%06X", (0xFFFFFF & AndroidUtilities.getIntDarkerColor("themeColor", 0x15)));
|
||||
TLRPC.User user = getItem(i);
|
||||
if (user != null) {
|
||||
CharSequence username = null;
|
||||
CharSequence name = null;
|
||||
if (i < searchResult.size()) {
|
||||
name = searchResultNames.get(i);
|
||||
if (name != null && user != null && user.username != null && user.username.length() > 0) {
|
||||
if (name.toString().startsWith("@" + user.username)) {
|
||||
username = name;
|
||||
name = null;
|
||||
}
|
||||
}
|
||||
} else if (i > searchResult.size() && user.username != null) {
|
||||
String foundUserName = lastFoundUsername;
|
||||
if (foundUserName.startsWith("@")) {
|
||||
foundUserName = foundUserName.substring(1);
|
||||
}
|
||||
try {
|
||||
username = Html.fromHtml(String.format("<font color="+ hexDarkColor +">@%s</font>%s", user.username.substring(0, foundUserName.length()), user.username.substring(foundUserName.length())));
|
||||
//username = Html.fromHtml(String.format("<font color=\"#4d83b3\">@%s</font>%s", user.username.substring(0, foundUserName.length()), user.username.substring(foundUserName.length())));
|
||||
} catch (Exception e) {
|
||||
username = user.username;
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (useUserCell) {
|
||||
((UserCell) view).setData(user, name, username, 0);
|
||||
if (checkedMap != null) {
|
||||
((UserCell) view).setChecked(checkedMap.containsKey(user.id), false);
|
||||
}
|
||||
} else {
|
||||
((ProfileSearchCell) view).setData(user, null, null, name, username);
|
||||
((ProfileSearchCell) view).useSeparator = (i != getCount() - 1 && i != searchResult.size() - 1);
|
||||
if (ignoreUsers != null) {
|
||||
if (ignoreUsers.containsKey(user.id)) {
|
||||
((ProfileSearchCell) view).drawAlpha = 0.5f;
|
||||
} else {
|
||||
((ProfileSearchCell) view).drawAlpha = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int i) {
|
||||
if (i == searchResult.size()) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getViewTypeCount() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return searchResult.isEmpty() && globalSearch.isEmpty();
|
||||
}
|
||||
}
|
@ -131,7 +131,7 @@ public class DialogsAdapter extends BaseFragmentAdapter {
|
||||
}
|
||||
|
||||
private void updateTheme(ViewGroup viewGroup){
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
viewGroup.setBackgroundColor(themePrefs.getInt("chatsRowColor", 0xffffffff));
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,7 @@ import org.telegram.messenger.UserConfig;
|
||||
import org.telegram.messenger.Utilities;
|
||||
import org.telegram.ui.Cells.DialogCell;
|
||||
import org.telegram.ui.Cells.GreySectionCell;
|
||||
import org.telegram.ui.Cells.HashtagSearchCell;
|
||||
import org.telegram.ui.Cells.LoadingCell;
|
||||
import org.telegram.ui.Cells.ProfileSearchCell;
|
||||
|
||||
@ -44,13 +45,14 @@ import java.util.Locale;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
public class DialogsSearchAdapter extends BaseSearchAdapter {
|
||||
|
||||
private Context mContext;
|
||||
private Timer searchTimer;
|
||||
private ArrayList<TLObject> searchResult = new ArrayList<>();
|
||||
private ArrayList<CharSequence> searchResultNames = new ArrayList<>();
|
||||
private ArrayList<MessageObject> searchResultMessages = new ArrayList<>();
|
||||
private ArrayList<String> searchResultHashtags = new ArrayList<>();
|
||||
private String lastSearchText;
|
||||
private long reqId = 0;
|
||||
private int lastReqId;
|
||||
@ -87,6 +89,10 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
searchMessagesInternal(lastMessagesSearchString);
|
||||
}
|
||||
|
||||
public String getLastSearchString() {
|
||||
return lastMessagesSearchString;
|
||||
}
|
||||
|
||||
private void searchMessagesInternal(final String query) {
|
||||
if (needMessagesSearch == 0) {
|
||||
return;
|
||||
@ -188,8 +194,8 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
dialogSearchResult.date = cursor.intValue(1);
|
||||
dialogsResult.put(id, dialogSearchResult);
|
||||
|
||||
int lower_id = (int)id;
|
||||
int high_id = (int)(id >> 32);
|
||||
int lower_id = (int) id;
|
||||
int high_id = (int) (id >> 32);
|
||||
if (lower_id != 0) {
|
||||
if (high_id == 1) {
|
||||
if (!serverOnly && !chatsToLoad.contains(lower_id)) {
|
||||
@ -389,7 +395,7 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
cursor = MessagesStorage.getInstance().getDatabase().queryFinalized("SELECT u.data, u.status, u.name, u.uid FROM users as u INNER JOIN contacts as c ON u.uid = c.uid");
|
||||
while (cursor.next()) {
|
||||
int uid = cursor.intValue(3);
|
||||
if (dialogsResult.containsKey((long)uid)) {
|
||||
if (dialogsResult.containsKey((long) uid)) {
|
||||
continue;
|
||||
}
|
||||
String name = cursor.stringValue(2);
|
||||
@ -477,6 +483,25 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
return i > searchResult.size() && i <= globalSearch.size() + searchResult.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearRecentHashtags() {
|
||||
super.clearRecentHashtags();
|
||||
searchResultHashtags.clear();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setHashtags(ArrayList<HashtagObject> arrayList, HashMap<String, HashtagObject> hashMap) {
|
||||
super.setHashtags(arrayList, hashMap);
|
||||
for (HashtagObject hashtagObject : arrayList) {
|
||||
searchResultHashtags.add(hashtagObject.hashtag);
|
||||
}
|
||||
if (delegate != null) {
|
||||
delegate.searchStateChanged(false);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void searchDialogs(final String query, final boolean serverOnly) {
|
||||
if (query != null && lastSearchText != null && query.equals(lastSearchText)) {
|
||||
return;
|
||||
@ -489,14 +514,38 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
if (query == null || query.length() == 0) {
|
||||
hashtagsLoadedFromDb = false;
|
||||
searchResult.clear();
|
||||
searchResultNames.clear();
|
||||
searchResultHashtags.clear();
|
||||
if (needMessagesSearch != 2) {
|
||||
queryServerSearch(null);
|
||||
}
|
||||
searchMessagesInternal(null);
|
||||
notifyDataSetChanged();
|
||||
} else {
|
||||
if (query.startsWith("#") && query.length() == 1) {
|
||||
messagesSearchEndReached = true;
|
||||
if (!hashtagsLoadedFromDb) {
|
||||
loadRecentHashtags();
|
||||
if (delegate != null) {
|
||||
delegate.searchStateChanged(true);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
return;
|
||||
}
|
||||
searchResultHashtags.clear();
|
||||
for (HashtagObject hashtagObject : hashtags) {
|
||||
searchResultHashtags.add(hashtagObject.hashtag);
|
||||
}
|
||||
if (delegate != null) {
|
||||
delegate.searchStateChanged(false);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
return;
|
||||
} else {
|
||||
searchResultHashtags.clear();
|
||||
}
|
||||
final int searchId = ++lastSearchId;
|
||||
searchTimer = new Timer();
|
||||
searchTimer.schedule(new TimerTask() {
|
||||
@ -530,11 +579,27 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
|
||||
@Override
|
||||
public boolean isEnabled(int i) {
|
||||
return i != searchResult.size() && i != searchResult.size() + (globalSearch.isEmpty() ? 0 : globalSearch.size() + 1);
|
||||
if (!searchResultHashtags.isEmpty()) {
|
||||
return i != 0;
|
||||
}
|
||||
int localCount = searchResult.size();
|
||||
int globalCount = globalSearch.isEmpty() ? 0 : globalSearch.size() + 1;
|
||||
int messagesCount = searchResultMessages.isEmpty() ? 0 : searchResultMessages.size() + 1;
|
||||
if (i >= 0 && i < localCount || i > localCount && i < globalCount + localCount) {
|
||||
return true;
|
||||
} else if (i > globalCount + localCount && i < globalCount + localCount + messagesCount) {
|
||||
return true;
|
||||
} else if (messagesCount != 0 && i == globalCount + localCount + messagesCount) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
if (!searchResultHashtags.isEmpty()) {
|
||||
return searchResultHashtags.size() + 1;
|
||||
}
|
||||
int count = searchResult.size();
|
||||
int globalCount = globalSearch.size();
|
||||
int messagesCount = searchResultMessages.size();
|
||||
@ -549,6 +614,9 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
if (!searchResultHashtags.isEmpty()) {
|
||||
return searchResultHashtags.get(i - 1);
|
||||
}
|
||||
int localCount = searchResult.size();
|
||||
int globalCount = globalSearch.isEmpty() ? 0 : globalSearch.size() + 1;
|
||||
int messagesCount = searchResultMessages.isEmpty() ? 0 : searchResultMessages.size() + 1;
|
||||
@ -580,7 +648,9 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
if (view == null) {
|
||||
view = new GreySectionCell(mContext);
|
||||
}
|
||||
if (!globalSearch.isEmpty() && i == searchResult.size()) {
|
||||
if (!searchResultHashtags.isEmpty()) {
|
||||
((GreySectionCell) view).setText(LocaleController.getString("Hashtags", R.string.Hashtags).toUpperCase());
|
||||
} else if (!globalSearch.isEmpty() && i == searchResult.size()) {
|
||||
((GreySectionCell) view).setText(LocaleController.getString("GlobalSearch", R.string.GlobalSearch));
|
||||
} else {
|
||||
((GreySectionCell) view).setText(LocaleController.getString("SearchMessages", R.string.SearchMessages));
|
||||
@ -647,6 +717,12 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
if (view == null) {
|
||||
view = new LoadingCell(mContext);
|
||||
}
|
||||
} else if (type == 4) {
|
||||
if (view == null) {
|
||||
view = new HashtagSearchCell(mContext);
|
||||
}
|
||||
((HashtagSearchCell) view).setText(searchResultHashtags.get(i - 1));
|
||||
((HashtagSearchCell) view).setNeedDivider(i != searchResultHashtags.size());
|
||||
}
|
||||
|
||||
return view;
|
||||
@ -669,11 +745,11 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
||||
|
||||
@Override
|
||||
public int getViewTypeCount() {
|
||||
return 4;
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return searchResult.isEmpty() && globalSearch.isEmpty() && searchResultMessages.isEmpty();
|
||||
return searchResult.isEmpty() && globalSearch.isEmpty() && searchResultMessages.isEmpty() && searchResultHashtags.isEmpty();
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,9 @@ package org.telegram.ui.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
@ -97,21 +100,21 @@ public class DrawerLayoutAdapter extends BaseAdapter {
|
||||
}
|
||||
DrawerActionCell actionCell = (DrawerActionCell) view;
|
||||
if (i == 2) {
|
||||
actionCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), R.drawable.menu_newgroup_white);
|
||||
actionCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), R.drawable.menu_newgroup);
|
||||
} else if (i == 3) {
|
||||
actionCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), R.drawable.menu_secret_white);
|
||||
actionCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), R.drawable.menu_secret);
|
||||
} else if (i == 4) {
|
||||
actionCell.setTextAndIcon(LocaleController.getString("NewBroadcastList", R.string.NewBroadcastList), R.drawable.menu_broadcast_white);
|
||||
actionCell.setTextAndIcon(LocaleController.getString("NewBroadcastList", R.string.NewBroadcastList), R.drawable.menu_broadcast);
|
||||
} else if (i == 6) {
|
||||
actionCell.setTextAndIcon(LocaleController.getString("Contacts", R.string.Contacts), R.drawable.menu_contacts_white);
|
||||
actionCell.setTextAndIcon(LocaleController.getString("Contacts", R.string.Contacts), R.drawable.menu_contacts);
|
||||
}/* else if (i == 7) {
|
||||
actionCell.setTextAndIcon(LocaleController.getString("InviteFriends", R.string.InviteFriends), R.drawable.menu_invite);
|
||||
}*/ else if (i == themingRow) {
|
||||
actionCell.setTextAndIcon(LocaleController.getString("Theming", R.string.Theming), R.drawable.menu_theming_white);
|
||||
actionCell.setTextAndIcon(LocaleController.getString("Theming", R.string.Theming), R.drawable.menu_theming);
|
||||
} else if (i == 8) {
|
||||
actionCell.setTextAndIcon(LocaleController.getString("Settings", R.string.Settings), R.drawable.menu_settings_white);
|
||||
actionCell.setTextAndIcon(LocaleController.getString("Settings", R.string.Settings), R.drawable.menu_settings);
|
||||
} else if (i == communityRow) {
|
||||
actionCell.setTextAndIcon(LocaleController.getString("Community", R.string.Community), R.drawable.menu_forum_white);
|
||||
actionCell.setTextAndIcon(LocaleController.getString("Community", R.string.Community), R.drawable.menu_forum);
|
||||
} /*else if (i == 10) {
|
||||
actionCell.setTextAndIcon(LocaleController.getString("TelegramFaq", R.string.TelegramFaq), R.drawable.menu_help);
|
||||
}*/
|
||||
|
@ -30,6 +30,7 @@ import org.telegram.messenger.Utilities;
|
||||
import org.telegram.ui.Cells.StickerCell;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
@ -244,6 +245,17 @@ public class StickersAdapter extends RecyclerView.Adapter implements Notificatio
|
||||
});
|
||||
}
|
||||
|
||||
public ArrayList<TLRPC.Document> getAllStickers(ArrayList<TLRPC.Document> array){
|
||||
for (ArrayList<TLRPC.Document> map : allStickers.values()){
|
||||
for (TLRPC.Document st : map){
|
||||
if (!array.contains(st)){
|
||||
array.add(st);
|
||||
}
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
public void loadStikersForEmoji(CharSequence emoji) {
|
||||
boolean search = emoji != null && emoji.length() != 0 && emoji.length() <= 2;
|
||||
if (search) {
|
||||
@ -257,6 +269,13 @@ public class StickersAdapter extends RecyclerView.Adapter implements Notificatio
|
||||
}
|
||||
} else {
|
||||
stickers = newStickers;
|
||||
try {
|
||||
String firstEmo = new String(new byte[] {(byte) 0xF0, (byte) 0x9F, (byte) 0x98, (byte) 0x84}, "UTF-8");
|
||||
if(newStickers != null && lastSticker.equals(firstEmo))stickers = getAllStickers(newStickers);
|
||||
//if(newStickers != null)stickers = getAllStikers(newStickers);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
checkStickerFilesExistAndDownload();
|
||||
delegate.needChangePanelVisibility(stickers != null && !stickers.isEmpty() && stickersToLoad.isEmpty());
|
||||
notifyDataSetChanged();
|
||||
|
@ -10,6 +10,7 @@ package org.telegram.ui.Cells;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PorterDuff;
|
||||
@ -452,11 +453,15 @@ public class ChatBaseCell extends BaseCell {
|
||||
if (messageObject.type == 13) {
|
||||
int width;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (AndroidUtilities.isSmallTablet() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
width = AndroidUtilities.displaySize.x;
|
||||
} else {
|
||||
int leftWidth = AndroidUtilities.displaySize.x / 100 * 35;
|
||||
if (leftWidth < AndroidUtilities.dp(320)) {
|
||||
leftWidth = AndroidUtilities.dp(320);
|
||||
}
|
||||
width = AndroidUtilities.displaySize.x - leftWidth;
|
||||
}
|
||||
} else {
|
||||
width = AndroidUtilities.displaySize.x;
|
||||
}
|
||||
|
@ -928,6 +928,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
|
||||
protected void onAfterBackgroundDraw(Canvas canvas) {
|
||||
boolean imageDrawn = false;
|
||||
if (gifDrawable != null) {
|
||||
drawTime = !gifDrawable.isPlaying();
|
||||
canvas.save();
|
||||
gifDrawable.setBounds(photoImage.getImageX(), photoImage.getImageY(), photoImage.getImageX() + photoWidth, photoImage.getImageY() + photoHeight);
|
||||
gifDrawable.draw(canvas);
|
||||
|
@ -71,7 +71,7 @@ public class ChatMessageCell extends ChatBaseCell {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pressedLink.onClick(this);
|
||||
pressedLink.onClick(this);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
|
@ -63,7 +63,7 @@ public class DialogCell extends BaseCell {
|
||||
private static Drawable lockWhiteDrawable;
|
||||
private static Drawable groupWhiteDrawable;
|
||||
private static Drawable broadcastWhiteDrawable;
|
||||
private static Drawable muteWhiteDrawable;
|
||||
//private static Drawable muteWhiteDrawable;
|
||||
|
||||
private static Paint linePaint;
|
||||
|
||||
@ -188,8 +188,8 @@ public class DialogCell extends BaseCell {
|
||||
groupDrawable = groupWhiteDrawable;
|
||||
broadcastWhiteDrawable = getResources().getDrawable(R.drawable.list_broadcast_white);
|
||||
broadcastDrawable = broadcastWhiteDrawable;
|
||||
muteWhiteDrawable = getResources().getDrawable(R.drawable.mute_white);
|
||||
muteDrawable = muteWhiteDrawable;
|
||||
//muteWhiteDrawable = getResources().getDrawable(R.drawable.mute_white);
|
||||
//muteDrawable = muteWhiteDrawable;
|
||||
updateTheme();
|
||||
}
|
||||
}
|
||||
@ -272,10 +272,10 @@ public class DialogCell extends BaseCell {
|
||||
drawNameLock = true;
|
||||
nameLockTop = AndroidUtilities.dp(16.5f);
|
||||
if (!LocaleController.isRTL) {
|
||||
nameLockLeft = AndroidUtilities.dp(72);
|
||||
nameLeft = AndroidUtilities.dp(76) + lockDrawable.getIntrinsicWidth();
|
||||
nameLockLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline + 4) + lockDrawable.getIntrinsicWidth();
|
||||
} else {
|
||||
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(72) - lockDrawable.getIntrinsicWidth();
|
||||
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline) - lockDrawable.getIntrinsicWidth();
|
||||
nameLeft = AndroidUtilities.dp(14);
|
||||
}
|
||||
} else {
|
||||
@ -289,15 +289,15 @@ public class DialogCell extends BaseCell {
|
||||
}
|
||||
|
||||
if (!LocaleController.isRTL) {
|
||||
nameLockLeft = AndroidUtilities.dp(72);
|
||||
nameLeft = AndroidUtilities.dp(76) + (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
||||
nameLockLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline + 4) + (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
||||
} else {
|
||||
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(72) - (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
||||
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline) - (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
||||
nameLeft = AndroidUtilities.dp(14);
|
||||
}
|
||||
} else {
|
||||
if (!LocaleController.isRTL) {
|
||||
nameLeft = AndroidUtilities.dp(72);
|
||||
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||
} else {
|
||||
nameLeft = AndroidUtilities.dp(14);
|
||||
}
|
||||
@ -364,7 +364,7 @@ public class DialogCell extends BaseCell {
|
||||
} else {
|
||||
if (chat != null && chat.id > 0) {
|
||||
String name = "";
|
||||
if (message.isFromMe()) {
|
||||
if (message.isOut()) {
|
||||
name = LocaleController.getString("FromYou", R.string.FromYou);
|
||||
} else {
|
||||
if (fromUser != null) {
|
||||
@ -410,7 +410,7 @@ public class DialogCell extends BaseCell {
|
||||
drawCount = false;
|
||||
}
|
||||
|
||||
if (message.isFromMe() && message.isOut()) {
|
||||
if (message.isOut()) {
|
||||
if (message.isSending()) {
|
||||
drawCheck1 = false;
|
||||
drawCheck2 = false;
|
||||
@ -479,7 +479,7 @@ public class DialogCell extends BaseCell {
|
||||
if (!LocaleController.isRTL) {
|
||||
nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(14) - timeWidth;
|
||||
} else {
|
||||
nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(72) - timeWidth;
|
||||
nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(AndroidUtilities.leftBaseline) - timeWidth;
|
||||
nameLeft += timeWidth;
|
||||
}
|
||||
if (drawNameLock) {
|
||||
@ -537,14 +537,14 @@ public class DialogCell extends BaseCell {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
|
||||
int messageWidth = getMeasuredWidth() - AndroidUtilities.dp(88);
|
||||
int messageWidth = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline + 16);
|
||||
int avatarLeft;
|
||||
if (!LocaleController.isRTL) {
|
||||
messageLeft = AndroidUtilities.dp(72);
|
||||
avatarLeft = AndroidUtilities.dp(9);
|
||||
messageLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||
avatarLeft = AndroidUtilities.dp(AndroidUtilities.isTablet() ? 13 : 9);
|
||||
} else {
|
||||
messageLeft = AndroidUtilities.dp(16);
|
||||
avatarLeft = getMeasuredWidth() - AndroidUtilities.dp(61);
|
||||
avatarLeft = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.isTablet() ? 65 : 61);
|
||||
}
|
||||
avatarImage.setImageCoords(avatarLeft, avatarTop, AndroidUtilities.dp(52), AndroidUtilities.dp(52));
|
||||
if (drawError) {
|
||||
@ -774,7 +774,7 @@ public class DialogCell extends BaseCell {
|
||||
}
|
||||
|
||||
private void updateTheme(){
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
int tColor = AndroidUtilities.getIntColor("themeColor");
|
||||
int dColor = AndroidUtilities.getIntDarkerColor("themeColor",0x15);
|
||||
|
||||
@ -814,7 +814,8 @@ public class DialogCell extends BaseCell {
|
||||
broadcastWhiteDrawable.setColorFilter(nColor, PorterDuff.Mode.MULTIPLY);
|
||||
|
||||
int mColor = themePrefs.getInt("chatsMuteColor", 0xffa8a8a8);
|
||||
muteWhiteDrawable.setColorFilter(mColor, PorterDuff.Mode.MULTIPLY);
|
||||
//muteWhiteDrawable.setColorFilter(mColor, PorterDuff.Mode.MULTIPLY);
|
||||
muteDrawable.setColorFilter(mColor, PorterDuff.Mode.SRC_IN);
|
||||
|
||||
linePaint.setColor(themePrefs.getInt("chatsDividerColor", 0xffdcdcdc));
|
||||
|
||||
@ -894,9 +895,9 @@ public class DialogCell extends BaseCell {
|
||||
|
||||
if (useSeparator) {
|
||||
if (LocaleController.isRTL) {
|
||||
canvas.drawLine(0, getMeasuredHeight() - 1, getMeasuredWidth() - AndroidUtilities.dp(72), getMeasuredHeight() - 1, linePaint);
|
||||
canvas.drawLine(0, getMeasuredHeight() - 1, getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline), getMeasuredHeight() - 1, linePaint);
|
||||
} else {
|
||||
canvas.drawLine(AndroidUtilities.dp(72), getMeasuredHeight() - 1, getMeasuredWidth(), getMeasuredHeight() - 1, linePaint);
|
||||
canvas.drawLine(AndroidUtilities.dp(AndroidUtilities.leftBaseline), getMeasuredHeight() - 1, getMeasuredWidth(), getMeasuredHeight() - 1, linePaint);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,20 +60,8 @@ public class DrawerActionCell extends FrameLayout {
|
||||
private void updateTheme(){
|
||||
textView.setTextColor(AndroidUtilities.getIntDef("drawerOptionColor", 0xff444444));
|
||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("drawerOptionSize", 15));
|
||||
Drawable[] drawables = textView.getCompoundDrawables();
|
||||
int color = AndroidUtilities.getIntDef("drawerIconColor", 0xff737373);
|
||||
Drawable icon = getResources().getDrawable(R.drawable.menu_newgroup_white);
|
||||
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
icon = getResources().getDrawable(R.drawable.menu_secret_white);
|
||||
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
icon = getResources().getDrawable(R.drawable.menu_broadcast_white);
|
||||
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
icon = getResources().getDrawable(R.drawable.menu_contacts_white);
|
||||
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
icon = getResources().getDrawable(R.drawable.menu_theming_white);
|
||||
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
icon = getResources().getDrawable(R.drawable.menu_settings_white);
|
||||
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
icon = getResources().getDrawable(R.drawable.menu_forum_white);
|
||||
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
if(drawables[0] != null)drawables[0].setColorFilter(color, PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
}
|
||||
|
@ -11,11 +11,18 @@ package org.telegram.ui.Cells;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.telegram.PhoneFormat.PhoneFormat;
|
||||
@ -23,6 +30,8 @@ import org.telegram.android.AndroidUtilities;
|
||||
import org.telegram.android.ContactsController;
|
||||
import org.telegram.android.MessageObject;
|
||||
import org.telegram.android.MessagesController;
|
||||
import org.telegram.messenger.ApplicationLoader;
|
||||
import org.telegram.messenger.R;
|
||||
import org.telegram.messenger.TLRPC;
|
||||
import org.telegram.messenger.UserConfig;
|
||||
import org.telegram.ui.Components.AvatarDrawable;
|
||||
@ -34,15 +43,30 @@ public class DrawerProfileCell extends FrameLayout implements PhotoViewer.PhotoV
|
||||
private BackupImageView avatarImageView;
|
||||
private TextView nameTextView;
|
||||
private TextView phoneTextView;
|
||||
private ImageView shadowView;
|
||||
private Rect srcRect = new Rect();
|
||||
private Rect destRect = new Rect();
|
||||
private Paint paint = new Paint();
|
||||
|
||||
public DrawerProfileCell(Context context) {
|
||||
super(context);
|
||||
setBackgroundColor(0xff4c84b5);
|
||||
|
||||
shadowView = new ImageView(context);
|
||||
shadowView.setVisibility(INVISIBLE);
|
||||
shadowView.setScaleType(ImageView.ScaleType.FIT_XY);
|
||||
shadowView.setImageResource(R.drawable.bottom_shadow);
|
||||
addView(shadowView);
|
||||
LayoutParams layoutParams = (FrameLayout.LayoutParams) shadowView.getLayoutParams();
|
||||
layoutParams.width = LayoutParams.MATCH_PARENT;
|
||||
layoutParams.height = AndroidUtilities.dp(70);
|
||||
layoutParams.gravity = Gravity.LEFT | Gravity.BOTTOM;
|
||||
shadowView.setLayoutParams(layoutParams);
|
||||
|
||||
avatarImageView = new BackupImageView(context);
|
||||
avatarImageView.imageReceiver.setRoundRadius(AndroidUtilities.dp(32));
|
||||
addView(avatarImageView);
|
||||
LayoutParams layoutParams = (LayoutParams) avatarImageView.getLayoutParams();
|
||||
layoutParams = (LayoutParams) avatarImageView.getLayoutParams();
|
||||
layoutParams.width = AndroidUtilities.dp(64);
|
||||
layoutParams.height = AndroidUtilities.dp(64);
|
||||
layoutParams.gravity = Gravity.LEFT | Gravity.BOTTOM;
|
||||
@ -110,6 +134,36 @@ public class DrawerProfileCell extends FrameLayout implements PhotoViewer.PhotoV
|
||||
updateTheme();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
Drawable backgroundDrawable = ApplicationLoader.getCachedWallpaper();
|
||||
if (ApplicationLoader.isCustomTheme() && backgroundDrawable != null && !AndroidUtilities.getBoolPref("drawerHeaderBGCheck")) {
|
||||
phoneTextView.setTextColor(0xffffffff);
|
||||
shadowView.setVisibility(VISIBLE);
|
||||
if (backgroundDrawable instanceof ColorDrawable) {
|
||||
backgroundDrawable.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
|
||||
backgroundDrawable.draw(canvas);
|
||||
} else if (backgroundDrawable instanceof BitmapDrawable) {
|
||||
Bitmap bitmap = ((BitmapDrawable) backgroundDrawable).getBitmap();
|
||||
float scaleX = (float) getMeasuredWidth() / (float) bitmap.getWidth();
|
||||
float scaleY = (float) getMeasuredHeight() / (float) bitmap.getHeight();
|
||||
float scale = scaleX < scaleY ? scaleY : scaleX;
|
||||
int width = (int) (getMeasuredWidth() / scale);
|
||||
int height = (int) (getMeasuredHeight() / scale);
|
||||
int x = (bitmap.getWidth() - width) / 2;
|
||||
int y = (bitmap.getHeight() - height) / 2;
|
||||
srcRect.set(x, y, x + width, y + height);
|
||||
destRect.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
|
||||
canvas.drawBitmap(bitmap, srcRect, destRect, paint);
|
||||
}
|
||||
} else {
|
||||
shadowView.setVisibility(INVISIBLE);
|
||||
phoneTextView.setTextColor(0xffc2e5ff);
|
||||
super.onDraw(canvas);
|
||||
}
|
||||
updateTheme();
|
||||
}
|
||||
|
||||
public void setUser(TLRPC.User user) {
|
||||
if (user == null) {
|
||||
return;
|
||||
@ -192,7 +246,7 @@ public class DrawerProfileCell extends FrameLayout implements PhotoViewer.PhotoV
|
||||
phoneTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("drawerPhoneSize", 13));
|
||||
TLRPC.User user = MessagesController.getInstance().getUser(UserConfig.getClientUserId());
|
||||
TLRPC.FileLocation photo = null;
|
||||
if (user.photo != null) {
|
||||
if (user != null && user.photo != null && user.photo.photo_small != null ) {
|
||||
photo = user.photo.photo_small;
|
||||
}
|
||||
AvatarDrawable avatarDrawable = new AvatarDrawable(user);
|
||||
|
@ -149,10 +149,10 @@ public class ProfileSearchCell extends BaseCell {
|
||||
if (encryptedChat != null) {
|
||||
drawNameLock = true;
|
||||
if (!LocaleController.isRTL) {
|
||||
nameLockLeft = AndroidUtilities.dp(72);
|
||||
nameLeft = AndroidUtilities.dp(76) + lockDrawable.getIntrinsicWidth();
|
||||
nameLockLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline + 4) + lockDrawable.getIntrinsicWidth();
|
||||
} else {
|
||||
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(74) - lockDrawable.getIntrinsicWidth();
|
||||
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline + 2) - lockDrawable.getIntrinsicWidth();
|
||||
nameLeft = AndroidUtilities.dp(11);
|
||||
}
|
||||
nameLockTop = AndroidUtilities.dp(16.5f);
|
||||
@ -167,15 +167,15 @@ public class ProfileSearchCell extends BaseCell {
|
||||
nameLockTop = AndroidUtilities.dp(30);
|
||||
}
|
||||
if (!LocaleController.isRTL) {
|
||||
nameLockLeft = AndroidUtilities.dp(72);
|
||||
nameLeft = AndroidUtilities.dp(76) + (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
||||
nameLockLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline + 4) + (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
||||
} else {
|
||||
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(74) - (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
||||
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline + 2) - (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
||||
nameLeft = AndroidUtilities.dp(11);
|
||||
}
|
||||
} else {
|
||||
if (!LocaleController.isRTL) {
|
||||
nameLeft = AndroidUtilities.dp(72);
|
||||
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||
} else {
|
||||
nameLeft = AndroidUtilities.dp(11);
|
||||
}
|
||||
@ -211,7 +211,7 @@ public class ProfileSearchCell extends BaseCell {
|
||||
if (!LocaleController.isRTL) {
|
||||
onlineWidth = nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(14);
|
||||
} else {
|
||||
onlineWidth = nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(72);
|
||||
onlineWidth = nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||
}
|
||||
if (drawNameLock) {
|
||||
nameWidth -= AndroidUtilities.dp(6) + lockDrawable.getIntrinsicWidth();
|
||||
@ -226,7 +226,7 @@ public class ProfileSearchCell extends BaseCell {
|
||||
|
||||
if (chat == null) {
|
||||
if (!LocaleController.isRTL) {
|
||||
onlineLeft = AndroidUtilities.dp(72);
|
||||
onlineLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||
} else {
|
||||
onlineLeft = AndroidUtilities.dp(11);
|
||||
}
|
||||
@ -254,9 +254,9 @@ public class ProfileSearchCell extends BaseCell {
|
||||
|
||||
int avatarLeft;
|
||||
if (!LocaleController.isRTL) {
|
||||
avatarLeft = AndroidUtilities.dp(9);
|
||||
avatarLeft = AndroidUtilities.dp(AndroidUtilities.isTablet() ? 13 : 9);
|
||||
} else {
|
||||
avatarLeft = getMeasuredWidth() - AndroidUtilities.dp(61);
|
||||
avatarLeft = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.isTablet() ? 65 : 61);
|
||||
}
|
||||
|
||||
avatarImage.setImageCoords(avatarLeft, AndroidUtilities.dp(10), AndroidUtilities.dp(52), AndroidUtilities.dp(52));
|
||||
@ -384,9 +384,9 @@ public class ProfileSearchCell extends BaseCell {
|
||||
|
||||
if (useSeparator) {
|
||||
if (LocaleController.isRTL) {
|
||||
canvas.drawLine(0, getMeasuredHeight() - 1, getMeasuredWidth() - AndroidUtilities.dp(72), getMeasuredHeight() - 1, linePaint);
|
||||
canvas.drawLine(0, getMeasuredHeight() - 1, getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline), getMeasuredHeight() - 1, linePaint);
|
||||
} else {
|
||||
canvas.drawLine(AndroidUtilities.dp(72), getMeasuredHeight() - 1, getMeasuredWidth(), getMeasuredHeight() - 1, linePaint);
|
||||
canvas.drawLine(AndroidUtilities.dp(AndroidUtilities.leftBaseline), getMeasuredHeight() - 1, getMeasuredWidth(), getMeasuredHeight() - 1, linePaint);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,13 @@ import org.telegram.messenger.SerializedData;
|
||||
import org.telegram.messenger.TLClassStore;
|
||||
import org.telegram.messenger.TLObject;
|
||||
import org.telegram.messenger.TLRPC;
|
||||
import org.telegram.android.ContactsController;
|
||||
import org.telegram.messenger.FileLog;
|
||||
import org.telegram.android.MessageObject;
|
||||
import org.telegram.messenger.ConnectionsManager;
|
||||
import org.telegram.android.MessagesController;
|
||||
import org.telegram.android.NotificationCenter;
|
||||
import org.telegram.messenger.R;
|
||||
import org.telegram.messenger.UserConfig;
|
||||
import org.telegram.messenger.Utilities;
|
||||
import org.telegram.ui.ActionBar.ActionBar;
|
||||
@ -96,9 +103,14 @@ import org.telegram.ui.Cells.ChatBaseCell;
|
||||
import org.telegram.ui.Cells.ChatContactCell;
|
||||
import org.telegram.ui.Cells.ChatMediaCell;
|
||||
import org.telegram.ui.Cells.ChatMessageCell;
|
||||
import org.telegram.ui.ActionBar.ActionBar;
|
||||
import org.telegram.ui.ActionBar.ActionBarMenu;
|
||||
import org.telegram.ui.ActionBar.ActionBarMenuItem;
|
||||
import org.telegram.ui.Components.AvatarDrawable;
|
||||
import org.telegram.ui.Components.BackupImageView;
|
||||
import org.telegram.ui.ActionBar.BaseFragment;
|
||||
import org.telegram.ui.Components.ChatActivityEnterView;
|
||||
import org.telegram.android.ImageReceiver;
|
||||
import org.telegram.ui.Components.FrameLayoutFixed;
|
||||
import org.telegram.ui.Components.LayoutListView;
|
||||
import org.telegram.ui.Components.RecyclerListView;
|
||||
@ -193,6 +205,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
private int loadsCount = 0;
|
||||
|
||||
private int startLoadFromMessageId = 0;
|
||||
private boolean needSelectFromMessageId;
|
||||
private int returnToMessageId = 0;
|
||||
|
||||
private int minDate = 0;
|
||||
private boolean first = true;
|
||||
@ -430,6 +444,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
loading = true;
|
||||
|
||||
if (startLoadFromMessageId != 0) {
|
||||
needSelectFromMessageId = true;
|
||||
MessagesController.getInstance().loadMessages(dialog_id, AndroidUtilities.isTablet() ? 30 : 20, startLoadFromMessageId, true, 0, classGuid, 3, 0, 0, false);
|
||||
} else {
|
||||
MessagesController.getInstance().loadMessages(dialog_id, AndroidUtilities.isTablet() ? 30 : 20, 0, true, 0, classGuid, 2, 0, 0, true);
|
||||
@ -1419,7 +1434,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
layoutParams2.gravity = Gravity.CENTER;
|
||||
progressBar.setLayoutParams(layoutParams2);
|
||||
|
||||
if (currentChat != null && !isBroadcast) {
|
||||
if (currentEncryptedChat == null && !isBroadcast) {
|
||||
mentionListView = new ListView(getParentActivity());
|
||||
mentionListView.setBackgroundResource(R.drawable.compose_panel);
|
||||
mentionListView.setVisibility(View.GONE);
|
||||
@ -1443,8 +1458,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
public void needChangePanelVisibility(boolean show) {
|
||||
if (show) {
|
||||
RelativeLayout.LayoutParams layoutParams3 = (RelativeLayout.LayoutParams) mentionListView.getLayoutParams();
|
||||
layoutParams3.height = AndroidUtilities.dp(2 + 36 * Math.min(3, mentionsAdapter.getCount()));
|
||||
layoutParams3.topMargin = -AndroidUtilities.dp(36 * Math.min(3, mentionsAdapter.getCount()));
|
||||
int height = 36 * Math.min(3, mentionsAdapter.getCount()) + (mentionsAdapter.getCount() > 3 ? 18 : 0);
|
||||
layoutParams3.height = AndroidUtilities.dp(2 + height);
|
||||
layoutParams3.topMargin = -AndroidUtilities.dp(height);
|
||||
mentionListView.setLayoutParams(layoutParams3);
|
||||
|
||||
if (mentionListAnimation != null) {
|
||||
@ -1512,16 +1528,44 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
}));
|
||||
mentionsAdapter.setChatInfo(info);
|
||||
mentionsAdapter.setNeedUsernames(currentChat != null);
|
||||
|
||||
mentionListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
TLRPC.User user = mentionsAdapter.getItem(position);
|
||||
if (user != null) {
|
||||
int start = mentionsAdapter.getUsernameStartPosition();
|
||||
int len = mentionsAdapter.getUsernameLength();
|
||||
Object object = mentionsAdapter.getItem(position);
|
||||
int start = mentionsAdapter.getResultStartPosition();
|
||||
int len = mentionsAdapter.getResultLength();
|
||||
if (object instanceof TLRPC.User) {
|
||||
TLRPC.User user = (TLRPC.User) object;
|
||||
if (user != null) {
|
||||
chatActivityEnterView.replaceWithText(start, len, "@" + user.username + " ");
|
||||
}
|
||||
} else if (object instanceof String) {
|
||||
chatActivityEnterView.replaceWithText(start, len, object + " ");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mentionListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
|
||||
@Override
|
||||
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
Object object = mentionsAdapter.getItem(position);
|
||||
if (object instanceof String) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
||||
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
|
||||
builder.setMessage(LocaleController.getString("ClearSearch", R.string.ClearSearch));
|
||||
builder.setPositiveButton(LocaleController.getString("ClearButton", R.string.ClearButton).toUpperCase(), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
mentionsAdapter.clearRecentHashtags();
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
|
||||
showAlertDialog(builder);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1541,9 +1585,15 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
chatActivityEnterView.setLayoutParams(layoutParams3);
|
||||
chatActivityEnterView.setDelegate(new ChatActivityEnterView.ChatActivityEnterViewDelegate() {
|
||||
@Override
|
||||
public void onMessageSend() {
|
||||
public void onMessageSend(String message) {
|
||||
moveScrollToLastMessage();
|
||||
showReplyForMessageObjectOrForward(false, null, null, true);
|
||||
if (mentionsAdapter != null) {
|
||||
mentionsAdapter.addHashtagsFromMessage(message);
|
||||
}
|
||||
if (message != null) {
|
||||
NotificationsController.getInstance().playOutChatSound();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1552,7 +1602,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
stickersAdapter.loadStikersForEmoji(text);
|
||||
}
|
||||
if (mentionsAdapter != null) {
|
||||
mentionsAdapter.searchUsername(text.toString(), chatActivityEnterView.getCursorPosition(), messages);
|
||||
mentionsAdapter.searchUsernameOrHashtag(text.toString(), chatActivityEnterView.getCursorPosition(), messages);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1699,6 +1749,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
layoutParams3 = (RelativeLayout.LayoutParams) stickersPanel.getLayoutParams();
|
||||
layoutParams3.width = RelativeLayout.LayoutParams.WRAP_CONTENT;
|
||||
layoutParams3.height = AndroidUtilities.dp(81.5f);
|
||||
//layoutParams3.height = AndroidUtilities.dp(100);
|
||||
layoutParams3.bottomMargin = AndroidUtilities.dp(38);
|
||||
layoutParams3.addRule(RelativeLayout.ALIGN_BOTTOM, id_chat_compose_panel);
|
||||
stickersPanel.setLayoutParams(layoutParams3);
|
||||
@ -1715,6 +1766,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
layoutParams2 = (FrameLayout.LayoutParams) stickersListView.getLayoutParams();
|
||||
layoutParams2.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||
layoutParams2.height = AndroidUtilities.dp(78);
|
||||
//layoutParams2.height = AndroidUtilities.dp(97);
|
||||
stickersListView.setLayoutParams(layoutParams2);
|
||||
if (currentEncryptedChat == null || currentEncryptedChat != null && AndroidUtilities.getPeerLayerVersion(currentEncryptedChat.layer) >= 23) {
|
||||
if (stickersAdapter != null) {
|
||||
@ -1902,8 +1954,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
pagedownButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (returnToMessageId > 0) {
|
||||
scrollToMessageId(returnToMessageId, 0, true);
|
||||
} else {
|
||||
scrollToLastMessage();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (loading && messages.isEmpty()) {
|
||||
@ -2129,11 +2185,80 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
forward_end_reached = true;
|
||||
loading = true;
|
||||
startLoadFromMessageId = 0;
|
||||
needSelectFromMessageId = false;
|
||||
chatAdapter.notifyDataSetChanged();
|
||||
MessagesController.getInstance().loadMessages(dialog_id, 30, 0, true, 0, classGuid, 0, 0, 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
private void scrollToMessageId(int id, int fromMessageId, boolean select) {
|
||||
returnToMessageId = fromMessageId;
|
||||
needSelectFromMessageId = select;
|
||||
|
||||
MessageObject object = messagesDict.get(id);
|
||||
boolean query = false;
|
||||
if (object != null) {
|
||||
int index = messages.indexOf(object);
|
||||
if (index != -1) {
|
||||
if (needSelectFromMessageId) {
|
||||
highlightMessageId = id;
|
||||
} else {
|
||||
highlightMessageId = Integer.MAX_VALUE;
|
||||
}
|
||||
final int yOffset = Math.max(0, (chatListView.getHeight() - object.getApproximateHeight()) / 2);
|
||||
if (messages.get(messages.size() - 1) == object) {
|
||||
chatListView.setSelectionFromTop(0, AndroidUtilities.dp(-11) + yOffset);
|
||||
} else {
|
||||
chatListView.setSelectionFromTop(messages.size() - messages.indexOf(object), AndroidUtilities.dp(-11) + yOffset);
|
||||
}
|
||||
updateVisibleRows();
|
||||
showPagedownButton(true, true);
|
||||
} else {
|
||||
query = true;
|
||||
}
|
||||
} else {
|
||||
query = true;
|
||||
}
|
||||
|
||||
if (query) {
|
||||
messagesDict.clear();
|
||||
messagesByDays.clear();
|
||||
messages.clear();
|
||||
if (currentEncryptedChat == null) {
|
||||
maxMessageId = Integer.MAX_VALUE;
|
||||
minMessageId = Integer.MIN_VALUE;
|
||||
} else {
|
||||
maxMessageId = Integer.MIN_VALUE;
|
||||
minMessageId = Integer.MAX_VALUE;
|
||||
}
|
||||
maxDate = Integer.MIN_VALUE;
|
||||
endReached = false;
|
||||
loading = false;
|
||||
cacheEndReaced = false;
|
||||
firstLoading = true;
|
||||
loadsCount = 0;
|
||||
minDate = 0;
|
||||
first = true;
|
||||
unread_to_load = 0;
|
||||
first_unread_id = 0;
|
||||
last_message_id = 0;
|
||||
first_message_id = 0;
|
||||
forward_end_reached = true;
|
||||
loadingForward = false;
|
||||
unreadMessageObject = null;
|
||||
scrollToMessage = null;
|
||||
highlightMessageId = Integer.MAX_VALUE;
|
||||
scrollToMessageMiddleScreen = false;
|
||||
loading = true;
|
||||
startLoadFromMessageId = id;
|
||||
MessagesController.getInstance().loadMessages(dialog_id, AndroidUtilities.isTablet() ? 30 : 20, startLoadFromMessageId, true, 0, classGuid, 3, 0, 0, false);
|
||||
chatAdapter.notifyDataSetChanged();
|
||||
progressView.setVisibility(View.VISIBLE);
|
||||
chatListView.setEmptyView(null);
|
||||
emptyViewContainer.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private void showPagedownButton(boolean show, boolean animated) {
|
||||
if (pagedownButton == null) {
|
||||
return;
|
||||
@ -2149,6 +2274,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
}
|
||||
} else {
|
||||
returnToMessageId = 0;
|
||||
if (pagedownButton.getVisibility() == View.VISIBLE) {
|
||||
if (animated) {
|
||||
ObjectAnimatorProxy.ofFloatProxy(pagedownButton, "alpha", 0.0f).setDuration(200).addListener(new AnimatorListenerAdapterProxy() {
|
||||
@ -2446,8 +2572,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
Drawable lock = getParentActivity().getResources().getDrawable(R.drawable.ic_lock_header);
|
||||
lock.setColorFilter(AndroidUtilities.getIntDef("chatHeaderIconsColor", 0xffffffff), PorterDuff.Mode.MULTIPLY);
|
||||
lock = currentEncryptedChat != null ? lock : null;
|
||||
Drawable mute = getParentActivity().getResources().getDrawable(R.drawable.mute_white);
|
||||
mute.setColorFilter(AndroidUtilities.getIntDef("chatHeaderIconsColor", 0xffffffff), PorterDuff.Mode.MULTIPLY);
|
||||
Drawable mute = getParentActivity().getResources().getDrawable(R.drawable.mute_blue);
|
||||
mute.setColorFilter(AndroidUtilities.getIntDef("chatHeaderIconsColor", 0xffffffff), PorterDuff.Mode.SRC_IN);
|
||||
mute = MessagesController.getInstance().isDialogMuted(dialog_id) ? mute : null;
|
||||
nameTextView.setCompoundDrawablesWithIntrinsicBounds(lock, null, mute, null);
|
||||
if (rightIcon != 0) {
|
||||
@ -2892,7 +3018,11 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
scrollToMessageMiddleScreen = false;
|
||||
newRowsCount++;
|
||||
} else if (load_type == 3 && obj.getId() == startLoadFromMessageId) {
|
||||
if (needSelectFromMessageId) {
|
||||
highlightMessageId = obj.getId();
|
||||
} else {
|
||||
highlightMessageId = Integer.MAX_VALUE;
|
||||
}
|
||||
scrollToMessage = obj;
|
||||
if (isCache) {
|
||||
startLoadFromMessageId = 0;
|
||||
@ -3623,7 +3753,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
paused = false;
|
||||
if (readWhenResume && !messages.isEmpty()) {
|
||||
for (MessageObject messageObject : messages) {
|
||||
if (!messageObject.isUnread() && !messageObject.isFromMe()) {
|
||||
if (!messageObject.isUnread() && !messageObject.isOut()) {
|
||||
break;
|
||||
}
|
||||
if (!messageObject.isOut()) {
|
||||
@ -3689,8 +3819,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
onlineTextView.setTextColor(AndroidUtilities.getIntDef("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor",-0x40)));
|
||||
onlineTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("chatStatusSize", 14));
|
||||
int iColor = AndroidUtilities.getIntDef("chatHeaderIconsColor", 0xffffffff);
|
||||
Drawable mute = getParentActivity().getResources().getDrawable(R.drawable.mute_white);
|
||||
mute.setColorFilter(iColor, PorterDuff.Mode.MULTIPLY);
|
||||
Drawable mute = getParentActivity().getResources().getDrawable(R.drawable.mute_blue);
|
||||
mute.setColorFilter(iColor, PorterDuff.Mode.SRC_IN);
|
||||
Drawable dots = getParentActivity().getResources().getDrawable(R.drawable.ic_ab_other);
|
||||
dots.setColorFilter(iColor, PorterDuff.Mode.MULTIPLY);
|
||||
Drawable back = getParentActivity().getResources().getDrawable(R.drawable.ic_ab_back);
|
||||
@ -4217,37 +4347,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
}
|
||||
|
||||
// the function "forwardSelectedMessages" was replaced with "openProfileWithUsername"
|
||||
// FADTODO
|
||||
|
||||
private void forwardSelectedMessages(long did, boolean fromMyName) {
|
||||
if (forwaringMessage != null) {
|
||||
if (QuoteForward) {
|
||||
if (forwaringMessage.messageOwner.id > 0) {
|
||||
SendMessagesHelper.getInstance().sendMessage(forwaringMessage, did);
|
||||
}
|
||||
} else {
|
||||
SendMessagesHelper.getInstance().processForwardFromMyName(forwaringMessage, did);
|
||||
}
|
||||
forwaringMessage = null;
|
||||
} else {
|
||||
ArrayList<Integer> ids = new ArrayList<>(selectedMessagesIds.keySet());
|
||||
Collections.sort(ids);
|
||||
for (Integer id : ids) {
|
||||
if (QuoteForward) {
|
||||
if (id > 0) {
|
||||
SendMessagesHelper.getInstance().sendMessage(selectedMessagesIds.get(id), did);
|
||||
}
|
||||
} else {
|
||||
SendMessagesHelper.getInstance().processForwardFromMyName(selectedMessagesIds.get(id), did);
|
||||
}
|
||||
}
|
||||
selectedMessagesCanCopyIds.clear();
|
||||
selectedMessagesIds.clear();
|
||||
actionBar.hideActionMode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didSelectDialog(MessagesActivity activity, long did, boolean param) {
|
||||
if (dialog_id != 0 && (forwaringMessage != null || !selectedMessagesIds.isEmpty())) {
|
||||
@ -4313,6 +4412,36 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
}
|
||||
|
||||
// the function "forwardSelectedMessages" was replaced with "openProfileWithUsername"
|
||||
// FADTODO
|
||||
private void forwardSelectedMessages(long did, boolean fromMyName) {
|
||||
if (forwaringMessage != null) {
|
||||
if (QuoteForward) {
|
||||
if (forwaringMessage.messageOwner.id > 0) {
|
||||
SendMessagesHelper.getInstance().sendMessage(forwaringMessage, did);
|
||||
}
|
||||
} else {
|
||||
SendMessagesHelper.getInstance().processForwardFromMyName(forwaringMessage, did);
|
||||
}
|
||||
forwaringMessage = null;
|
||||
} else {
|
||||
ArrayList<Integer> ids = new ArrayList<>(selectedMessagesIds.keySet());
|
||||
Collections.sort(ids);
|
||||
for (Integer id : ids) {
|
||||
if (QuoteForward) {
|
||||
if (id > 0) {
|
||||
SendMessagesHelper.getInstance().sendMessage(selectedMessagesIds.get(id), did);
|
||||
}
|
||||
} else {
|
||||
SendMessagesHelper.getInstance().processForwardFromMyName(selectedMessagesIds.get(id), did);
|
||||
}
|
||||
}
|
||||
selectedMessagesCanCopyIds.clear();
|
||||
selectedMessagesIds.clear();
|
||||
actionBar.hideActionMode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBackPressed() {
|
||||
if (actionBar.isActionModeShowed()) {
|
||||
@ -4613,63 +4742,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
|
||||
@Override
|
||||
public void didPressReplyMessage(ChatBaseCell cell, int id) {
|
||||
MessageObject object = messagesDict.get(id);
|
||||
boolean query = false;
|
||||
if (object != null) {
|
||||
int index = messages.indexOf(object);
|
||||
if (index != -1) {
|
||||
highlightMessageId = id;
|
||||
final int yOffset = Math.max(0, (chatListView.getHeight() - object.getApproximateHeight()) / 2);
|
||||
if (messages.get(messages.size() - 1) == object) {
|
||||
chatListView.setSelectionFromTop(0, AndroidUtilities.dp(-11) + yOffset);
|
||||
} else {
|
||||
chatListView.setSelectionFromTop(messages.size() - messages.indexOf(object), AndroidUtilities.dp(-11) + yOffset);
|
||||
}
|
||||
updateVisibleRows();
|
||||
showPagedownButton(true, true);
|
||||
} else {
|
||||
query = true;
|
||||
}
|
||||
} else {
|
||||
query = true;
|
||||
}
|
||||
|
||||
if (query) {
|
||||
messagesDict.clear();
|
||||
messagesByDays.clear();
|
||||
messages.clear();
|
||||
if (currentEncryptedChat == null) {
|
||||
maxMessageId = Integer.MAX_VALUE;
|
||||
minMessageId = Integer.MIN_VALUE;
|
||||
} else {
|
||||
maxMessageId = Integer.MIN_VALUE;
|
||||
minMessageId = Integer.MAX_VALUE;
|
||||
}
|
||||
maxDate = Integer.MIN_VALUE;
|
||||
endReached = false;
|
||||
loading = false;
|
||||
cacheEndReaced = false;
|
||||
firstLoading = true;
|
||||
loadsCount = 0;
|
||||
minDate = 0;
|
||||
first = true;
|
||||
unread_to_load = 0;
|
||||
first_unread_id = 0;
|
||||
last_message_id = 0;
|
||||
first_message_id = 0;
|
||||
forward_end_reached = true;
|
||||
loadingForward = false;
|
||||
unreadMessageObject = null;
|
||||
scrollToMessage = null;
|
||||
highlightMessageId = Integer.MAX_VALUE;
|
||||
scrollToMessageMiddleScreen = false;
|
||||
loading = true;
|
||||
startLoadFromMessageId = id;
|
||||
MessagesController.getInstance().loadMessages(dialog_id, AndroidUtilities.isTablet() ? 30 : 20, startLoadFromMessageId, true, 0, classGuid, 3, 0, 0, false);
|
||||
chatAdapter.notifyDataSetChanged();
|
||||
progressView.setVisibility(View.VISIBLE);
|
||||
chatListView.setEmptyView(null);
|
||||
}
|
||||
scrollToMessageId(id, cell.getMessageObject().getId(), true);
|
||||
}
|
||||
});
|
||||
if (view instanceof ChatMediaCell) {
|
||||
|
@ -66,7 +66,7 @@ import java.lang.reflect.Field;
|
||||
public class ChatActivityEnterView extends FrameLayoutFixed implements NotificationCenter.NotificationCenterDelegate, SizeNotifierRelativeLayout.SizeNotifierRelativeLayoutDelegate {
|
||||
|
||||
public interface ChatActivityEnterViewDelegate {
|
||||
void onMessageSend();
|
||||
void onMessageSend(String message);
|
||||
void needSendTyping();
|
||||
void onTextChanged(CharSequence text);
|
||||
void onAttachButtonHidden();
|
||||
@ -74,7 +74,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
void onWindowSizeChanged(int size);
|
||||
}
|
||||
|
||||
private EditText messsageEditText;
|
||||
private EditText messageEditText;
|
||||
private ImageView sendButton;
|
||||
private PopupWindow emojiPopup;
|
||||
private ImageView emojiButton;
|
||||
@ -178,28 +178,28 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}
|
||||
});
|
||||
|
||||
messsageEditText = new EditText(context);
|
||||
messsageEditText.setHint(LocaleController.getString("TypeMessage", R.string.TypeMessage));
|
||||
messsageEditText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||
messsageEditText.setInputType(messsageEditText.getInputType() | EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE);
|
||||
messsageEditText.setSingleLine(false);
|
||||
messsageEditText.setMaxLines(4);
|
||||
messsageEditText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
|
||||
messsageEditText.setGravity(Gravity.BOTTOM);
|
||||
messsageEditText.setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(12));
|
||||
messsageEditText.setBackgroundDrawable(null);
|
||||
AndroidUtilities.clearCursorDrawable(messsageEditText);
|
||||
messsageEditText.setTextColor(0xff000000);
|
||||
messsageEditText.setHintTextColor(0xffb2b2b2);
|
||||
frameLayout.addView(messsageEditText);
|
||||
layoutParams1 = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
|
||||
messageEditText = new EditText(context);
|
||||
messageEditText.setHint(LocaleController.getString("TypeMessage", R.string.TypeMessage));
|
||||
messageEditText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||
messageEditText.setInputType(messageEditText.getInputType() | EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE);
|
||||
messageEditText.setSingleLine(false);
|
||||
messageEditText.setMaxLines(4);
|
||||
messageEditText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
|
||||
messageEditText.setGravity(Gravity.BOTTOM);
|
||||
messageEditText.setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(12));
|
||||
messageEditText.setBackgroundDrawable(null);
|
||||
AndroidUtilities.clearCursorDrawable(messageEditText);
|
||||
messageEditText.setTextColor(0xff000000);
|
||||
messageEditText.setHintTextColor(0xffb2b2b2);
|
||||
frameLayout.addView(messageEditText);
|
||||
layoutParams1 = (FrameLayout.LayoutParams) messageEditText.getLayoutParams();
|
||||
layoutParams1.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||
layoutParams1.height = FrameLayout.LayoutParams.WRAP_CONTENT;
|
||||
layoutParams1.gravity = Gravity.BOTTOM;
|
||||
layoutParams1.leftMargin = AndroidUtilities.dp(52);
|
||||
layoutParams1.rightMargin = AndroidUtilities.dp(isChat ? 50 : 2);
|
||||
messsageEditText.setLayoutParams(layoutParams1);
|
||||
messsageEditText.setOnKeyListener(new View.OnKeyListener() {
|
||||
messageEditText.setLayoutParams(layoutParams1);
|
||||
messageEditText.setOnKeyListener(new View.OnKeyListener() {
|
||||
@Override
|
||||
public boolean onKey(View view, int i, KeyEvent keyEvent) {
|
||||
if (i == 4 && !keyboardVisible && emojiPopup != null && emojiPopup.isShowing()) {
|
||||
@ -214,7 +214,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
return false;
|
||||
}
|
||||
});
|
||||
messsageEditText.setOnClickListener(new View.OnClickListener() {
|
||||
messageEditText.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (emojiPopup != null && emojiPopup.isShowing()) {
|
||||
@ -222,7 +222,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}
|
||||
}
|
||||
});
|
||||
messsageEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
messageEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
@Override
|
||||
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
|
||||
if (i == EditorInfo.IME_ACTION_SEND) {
|
||||
@ -237,7 +237,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
return false;
|
||||
}
|
||||
});
|
||||
messsageEditText.addTextChangedListener(new TextWatcher() {
|
||||
messageEditText.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
|
||||
@ -278,7 +278,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
int j = arrayOfImageSpan.length;
|
||||
while (true) {
|
||||
if (i >= j) {
|
||||
Emoji.replaceEmoji(editable, messsageEditText.getPaint().getFontMetricsInt(), AndroidUtilities.dp(20));
|
||||
Emoji.replaceEmoji(editable, messageEditText.getPaint().getFontMetricsInt(), AndroidUtilities.dp(20));
|
||||
return;
|
||||
}
|
||||
editable.removeSpan(arrayOfImageSpan[i]);
|
||||
@ -400,7 +400,6 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||
Drawable mic = parentActivity.getResources().getDrawable(R.drawable.mic);
|
||||
|
||||
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
mic.setColorFilter(0xffda564d, PorterDuff.Mode.SRC_IN);
|
||||
audioSendButton.setImageDrawable(mic);
|
||||
@ -506,9 +505,9 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
Drawable send = parentActivity.getResources().getDrawable(R.drawable.ic_send);
|
||||
send.setColorFilter(AndroidUtilities.getIntDef("chatSendIconColor", AndroidUtilities.getIntColor("chatEditTextIconsColor")), PorterDuff.Mode.SRC_IN);
|
||||
sendButton.setImageDrawable(send);
|
||||
messsageEditText.setTextColor(AndroidUtilities.getIntDef("chatEditTextColor",0xff000000));
|
||||
messsageEditText.setHintTextColor(AndroidUtilities.getIntAlphaColor("chatEditTextColor", 0xff000000, 0.35f));
|
||||
messsageEditText.setTextSize(AndroidUtilities.getIntDef("chatEditTextSize",18));
|
||||
messageEditText.setTextColor(AndroidUtilities.getIntDef("chatEditTextColor",0xff000000));
|
||||
messageEditText.setHintTextColor(AndroidUtilities.getIntAlphaColor("chatEditTextColor", 0xff000000, 0.35f));
|
||||
messageEditText.setTextSize(AndroidUtilities.getIntDef("chatEditTextSize",18));
|
||||
int color = AndroidUtilities.getIntDef("chatEditTextBGColor", 0xffffffff);
|
||||
setBackgroundColor(color);
|
||||
textFieldContainer.setBackgroundColor(color);
|
||||
@ -553,6 +552,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
if (allowShowTopView) {
|
||||
topView.setVisibility(VISIBLE);
|
||||
if (animated) {
|
||||
if (keyboardVisible || emojiPopup != null && emojiPopup.isShowing()) {
|
||||
AnimatorSetProxy animatorSetProxy = new AnimatorSetProxy();
|
||||
animatorSetProxy.playTogether(
|
||||
ObjectAnimatorProxy.ofFloat(ChatActivityEnterView.this, "topViewAnimation", 0.0f, 1.0f)
|
||||
@ -570,6 +570,14 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
});
|
||||
animatorSetProxy.setDuration(200);
|
||||
animatorSetProxy.start();
|
||||
} else {
|
||||
LayoutParams layoutParams2 = (LayoutParams) textFieldContainer.getLayoutParams();
|
||||
layoutParams2.topMargin = AndroidUtilities.dp(2) + topView.getLayoutParams().height;
|
||||
textFieldContainer.setLayoutParams(layoutParams2);
|
||||
if (!forceShowSendButton) {
|
||||
openKeyboard();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LayoutParams layoutParams2 = (LayoutParams) textFieldContainer.getLayoutParams();
|
||||
layoutParams2.topMargin = AndroidUtilities.dp(2) + topView.getLayoutParams().height;
|
||||
@ -692,15 +700,16 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (processSendingText(messsageEditText.getText().toString())) {
|
||||
messsageEditText.setText("");
|
||||
String message = messageEditText.getText().toString();
|
||||
if (processSendingText(message)) {
|
||||
messageEditText.setText("");
|
||||
lastTypingTimeSend = 0;
|
||||
if (delegate != null) {
|
||||
delegate.onMessageSend();
|
||||
delegate.onMessageSend(message);
|
||||
}
|
||||
} else if (forceShowSendButton) {
|
||||
if (delegate != null) {
|
||||
delegate.onMessageSend();
|
||||
delegate.onMessageSend(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -733,7 +742,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}
|
||||
|
||||
private void checkSendButton(final boolean animated) {
|
||||
String message = getTrimmedString(messsageEditText.getText().toString());
|
||||
String message = getTrimmedString(messageEditText.getText().toString());
|
||||
if (message.length() > 0 || forceShowSendButton) {
|
||||
if (audioSendButton.getVisibility() == View.VISIBLE) {
|
||||
if (animated) {
|
||||
@ -767,10 +776,10 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
});
|
||||
runningAnimation2.start();
|
||||
|
||||
if (messsageEditText != null) {
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
|
||||
if (messageEditText != null) {
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messageEditText.getLayoutParams();
|
||||
layoutParams.rightMargin = AndroidUtilities.dp(0);
|
||||
messsageEditText.setLayoutParams(layoutParams);
|
||||
messageEditText.setLayoutParams(layoutParams);
|
||||
}
|
||||
|
||||
delegate.onAttachButtonHidden();
|
||||
@ -817,9 +826,9 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
attachButton.setVisibility(View.GONE);
|
||||
attachButton.clearAnimation();
|
||||
delegate.onAttachButtonHidden();
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messageEditText.getLayoutParams();
|
||||
layoutParams.rightMargin = AndroidUtilities.dp(0);
|
||||
messsageEditText.setLayoutParams(layoutParams);
|
||||
messageEditText.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -848,10 +857,10 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
runningAnimation2.setDuration(100);
|
||||
runningAnimation2.start();
|
||||
|
||||
if (messsageEditText != null) {
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
|
||||
if (messageEditText != null) {
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messageEditText.getLayoutParams();
|
||||
layoutParams.rightMargin = AndroidUtilities.dp(50);
|
||||
messsageEditText.setLayoutParams(layoutParams);
|
||||
messageEditText.setLayoutParams(layoutParams);
|
||||
}
|
||||
|
||||
delegate.onAttachButtonShow();
|
||||
@ -897,9 +906,9 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
if (attachButton != null) {
|
||||
delegate.onAttachButtonShow();
|
||||
attachButton.setVisibility(View.VISIBLE);
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messageEditText.getLayoutParams();
|
||||
layoutParams.rightMargin = AndroidUtilities.dp(50);
|
||||
messsageEditText.setLayoutParams(layoutParams);
|
||||
messageEditText.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -990,19 +999,19 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
emojiView = new EmojiView(parentActivity);
|
||||
emojiView.setListener(new EmojiView.Listener() {
|
||||
public void onBackspace() {
|
||||
messsageEditText.dispatchKeyEvent(new KeyEvent(0, 67));
|
||||
messageEditText.dispatchKeyEvent(new KeyEvent(0, 67));
|
||||
}
|
||||
|
||||
public void onEmojiSelected(String symbol) {
|
||||
int i = messsageEditText.getSelectionEnd();
|
||||
int i = messageEditText.getSelectionEnd();
|
||||
if (i < 0) {
|
||||
i = 0;
|
||||
}
|
||||
try {
|
||||
CharSequence localCharSequence = Emoji.replaceEmoji(symbol, messsageEditText.getPaint().getFontMetricsInt(), AndroidUtilities.dp(20));
|
||||
messsageEditText.setText(messsageEditText.getText().insert(i, localCharSequence));
|
||||
CharSequence localCharSequence = Emoji.replaceEmoji(symbol, messageEditText.getPaint().getFontMetricsInt(), AndroidUtilities.dp(20));
|
||||
messageEditText.setText(messageEditText.getText().insert(i, localCharSequence));
|
||||
int j = i + localCharSequence.length();
|
||||
messsageEditText.setSelection(j, j);
|
||||
messageEditText.setSelection(j, j);
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
@ -1025,19 +1034,19 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}
|
||||
}
|
||||
int currentHeight;
|
||||
WindowManager wm = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
||||
int rotation = wm.getDefaultDisplay().getRotation();
|
||||
|
||||
if (keyboardHeight <= 0) {
|
||||
keyboardHeight = ApplicationLoader.applicationContext.getSharedPreferences("emoji", 0).getInt("kbd_height", AndroidUtilities.dp(200));
|
||||
}
|
||||
if (keyboardHeightLand <= 0) {
|
||||
keyboardHeightLand = ApplicationLoader.applicationContext.getSharedPreferences("emoji", 0).getInt("kbd_height_land3", AndroidUtilities.dp(200));
|
||||
}
|
||||
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
|
||||
if (AndroidUtilities.displaySize.x > AndroidUtilities.displaySize.y) {
|
||||
currentHeight = keyboardHeightLand;
|
||||
} else {
|
||||
currentHeight = keyboardHeight;
|
||||
}
|
||||
FileLog.e("tmessages", "show emoji with height = " + currentHeight);
|
||||
emojiPopup.setHeight(View.MeasureSpec.makeMeasureSpec(currentHeight, View.MeasureSpec.EXACTLY));
|
||||
if (sizeNotifierRelativeLayout != null) {
|
||||
emojiPopup.setWidth(View.MeasureSpec.makeMeasureSpec(AndroidUtilities.displaySize.x, View.MeasureSpec.EXACTLY));
|
||||
@ -1077,7 +1086,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
try {
|
||||
emojiPopup.showAsDropDown(this, 0, -currentHeight - getHeight());
|
||||
emojiPopup.update(this, 0, -currentHeight - getHeight(), -1, -1);
|
||||
AndroidUtilities.hideKeyboard(messsageEditText);
|
||||
AndroidUtilities.hideKeyboard(messageEditText);
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
return;
|
||||
@ -1122,7 +1131,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}
|
||||
|
||||
public void openKeyboard() {
|
||||
AndroidUtilities.showKeyboard(messsageEditText);
|
||||
AndroidUtilities.showKeyboard(messageEditText);
|
||||
}
|
||||
|
||||
public void setDelegate(ChatActivityEnterViewDelegate delegate) {
|
||||
@ -1130,48 +1139,48 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}
|
||||
|
||||
public void setFieldText(String text) {
|
||||
if (messsageEditText == null) {
|
||||
if (messageEditText == null) {
|
||||
return;
|
||||
}
|
||||
ignoreTextChange = true;
|
||||
messsageEditText.setText(text);
|
||||
messsageEditText.setSelection(messsageEditText.getText().length());
|
||||
messageEditText.setText(text);
|
||||
messageEditText.setSelection(messageEditText.getText().length());
|
||||
ignoreTextChange = false;
|
||||
if (delegate != null) {
|
||||
delegate.onTextChanged(messsageEditText.getText());
|
||||
delegate.onTextChanged(messageEditText.getText());
|
||||
}
|
||||
}
|
||||
|
||||
public int getCursorPosition() {
|
||||
if (messsageEditText == null) {
|
||||
if (messageEditText == null) {
|
||||
return 0;
|
||||
}
|
||||
return messsageEditText.getSelectionStart();
|
||||
return messageEditText.getSelectionStart();
|
||||
}
|
||||
|
||||
public void replaceWithText(int start, int len, String text) {
|
||||
try {
|
||||
StringBuilder builder = new StringBuilder(messsageEditText.getText());
|
||||
StringBuilder builder = new StringBuilder(messageEditText.getText());
|
||||
builder.replace(start, start + len, text);
|
||||
messsageEditText.setText(builder);
|
||||
messsageEditText.setSelection(messsageEditText.length());
|
||||
messageEditText.setText(builder);
|
||||
messageEditText.setSelection(start + text.length());
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void setFieldFocused(boolean focus) {
|
||||
if (messsageEditText == null) {
|
||||
if (messageEditText == null) {
|
||||
return;
|
||||
}
|
||||
if (focus) {
|
||||
if (!messsageEditText.isFocused()) {
|
||||
messsageEditText.postDelayed(new Runnable() {
|
||||
if (!messageEditText.isFocused()) {
|
||||
messageEditText.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (messsageEditText != null) {
|
||||
if (messageEditText != null) {
|
||||
try {
|
||||
messsageEditText.requestFocus();
|
||||
messageEditText.requestFocus();
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
@ -1180,19 +1189,19 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}, 600);
|
||||
}
|
||||
} else {
|
||||
if (messsageEditText.isFocused() && !keyboardVisible) {
|
||||
messsageEditText.clearFocus();
|
||||
if (messageEditText.isFocused() && !keyboardVisible) {
|
||||
messageEditText.clearFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasText() {
|
||||
return messsageEditText != null && messsageEditText.length() > 0;
|
||||
return messageEditText != null && messageEditText.length() > 0;
|
||||
}
|
||||
|
||||
public String getFieldText() {
|
||||
if (messsageEditText != null && messsageEditText.length() > 0) {
|
||||
return messsageEditText.getText().toString();
|
||||
if (messageEditText != null && messageEditText.length() > 0) {
|
||||
return messageEditText.getText().toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -1218,15 +1227,10 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSizeChanged(int height) {
|
||||
WindowManager wm = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
||||
if (wm == null || wm.getDefaultDisplay() == null) {
|
||||
return;
|
||||
}
|
||||
int rotation = wm.getDefaultDisplay().getRotation();
|
||||
//if (height > AndroidUtilities.dp(50) && keyboardVisible) {
|
||||
if (height > AndroidUtilities.dp(50)) {
|
||||
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
|
||||
public void onSizeChanged(int height, boolean isWidthGreater) {
|
||||
if (height > AndroidUtilities.dp(50) && keyboardVisible) {
|
||||
//if (height > AndroidUtilities.dp(50) ) {
|
||||
if (isWidthGreater) {
|
||||
keyboardHeightLand = height;
|
||||
ApplicationLoader.applicationContext.getSharedPreferences("emoji", 0).edit().putInt("kbd_height_land3", keyboardHeightLand).commit();
|
||||
} else {
|
||||
@ -1237,12 +1241,13 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
|
||||
if (emojiPopup != null && emojiPopup.isShowing()) {
|
||||
int newHeight = 0;
|
||||
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
|
||||
if (isWidthGreater) {
|
||||
newHeight = keyboardHeightLand;
|
||||
} else {
|
||||
newHeight = keyboardHeight;
|
||||
}
|
||||
final WindowManager.LayoutParams layoutParams = (WindowManager.LayoutParams) emojiPopup.getContentView().getLayoutParams();
|
||||
FileLog.e("tmessages", "update emoji height to = " + newHeight);
|
||||
if (layoutParams.width != AndroidUtilities.displaySize.x || layoutParams.height != newHeight) {
|
||||
/*if (Build.VERSION.SDK_INT >= 21) {
|
||||
if (!keyboardVisible) {
|
||||
@ -1253,18 +1258,16 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}*/
|
||||
layoutParams.width = AndroidUtilities.displaySize.x;
|
||||
layoutParams.height = newHeight;
|
||||
WindowManager wm = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
||||
if (wm != null) {
|
||||
wm.updateViewLayout(emojiPopup.getContentView(), layoutParams);
|
||||
if (!keyboardVisible) {
|
||||
sizeNotifierRelativeLayout.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (sizeNotifierRelativeLayout != null) {
|
||||
sizeNotifierRelativeLayout.setPadding(0, 0, 0, layoutParams.height);
|
||||
sizeNotifierRelativeLayout.requestLayout();
|
||||
onWindowSizeChanged(sizeNotifierRelativeLayout.getHeight() - sizeNotifierRelativeLayout.getPaddingBottom());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1294,8 +1297,8 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}
|
||||
}
|
||||
} else if (id == NotificationCenter.closeChats) {
|
||||
if (messsageEditText != null && messsageEditText.isFocused()) {
|
||||
AndroidUtilities.hideKeyboard(messsageEditText);
|
||||
if (messageEditText != null && messageEditText.isFocused()) {
|
||||
AndroidUtilities.hideKeyboard(messageEditText);
|
||||
}
|
||||
} else if (id == NotificationCenter.recordStartError || id == NotificationCenter.recordStopped) {
|
||||
if (recordingAudio) {
|
||||
@ -1309,7 +1312,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
||||
}
|
||||
} else if (id == NotificationCenter.audioDidSent) {
|
||||
if (delegate != null) {
|
||||
delegate.onMessageSend();
|
||||
delegate.onMessageSend(null);
|
||||
}
|
||||
} else if (id == NotificationCenter.hideEmojiKeyboard) {
|
||||
hideEmojiPopup();
|
||||
|
@ -53,6 +53,7 @@ public class HsvSelectorView extends LinearLayout {
|
||||
LayoutInflater inflater = (LayoutInflater) getContext()
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View hsvView = inflater.inflate(R.layout.color_hsvview, null);
|
||||
//line 55 android.view.InflateException: Binary XML file line #4: Error inflating class org.telegram.ui.Components.ColorSelectorView
|
||||
this.addView(hsvView, new LayoutParams(LayoutParams.FILL_PARENT,
|
||||
LayoutParams.FILL_PARENT));
|
||||
|
||||
|
@ -862,14 +862,16 @@ public class PasscodeView extends FrameLayout {
|
||||
int selectedBackground = preferences.getInt("selectedBackground", 1000001);
|
||||
boolean customTheme = false;
|
||||
if (selectedBackground == 1000001) {
|
||||
backgroundFrameLayout.setBackgroundColor(0xff517c9e);
|
||||
//backgroundFrameLayout.setBackgroundColor(0xff517c9e);
|
||||
backgroundFrameLayout.setBackgroundColor(AndroidUtilities.getIntDarkerColor("themeColor", 0x15));
|
||||
} else {
|
||||
backgroundDrawable = ApplicationLoader.getCachedWallpaper();
|
||||
if (backgroundDrawable != null) {
|
||||
backgroundFrameLayout.setBackgroundColor(0xbf000000);
|
||||
customTheme = true;
|
||||
} else {
|
||||
backgroundFrameLayout.setBackgroundColor(0xff517c9e);
|
||||
//backgroundFrameLayout.setBackgroundColor(0xff517c9e);
|
||||
backgroundFrameLayout.setBackgroundColor(AndroidUtilities.getIntDarkerColor("themeColor", 0x15));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,11 +15,12 @@ import android.widget.SeekBar;
|
||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.telegram.android.AndroidUtilities;
|
||||
import org.telegram.messenger.R;
|
||||
|
||||
public class SeekBarPreference extends Preference implements OnSeekBarChangeListener {
|
||||
|
||||
private static final String THEME_PREFS = "theme";
|
||||
//private static final String THEME_PREFS = "theme";
|
||||
|
||||
private final String TAG = getClass().getName();
|
||||
|
||||
@ -223,7 +224,7 @@ public class SeekBarPreference extends Preference implements OnSeekBarChangeList
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
notifyChanged();
|
||||
if(mUnitsRight.contains("r") || mUnitsRight.contains("Mb")){
|
||||
SharedPreferences sharedPref = mSeekBar.getContext().getSharedPreferences(THEME_PREFS, 0);
|
||||
SharedPreferences sharedPref = mSeekBar.getContext().getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor e = sharedPref.edit();
|
||||
e.putBoolean("need_reboot",true);
|
||||
e.commit();
|
||||
|
@ -28,7 +28,7 @@ public class SizeNotifierRelativeLayout extends RelativeLayout {
|
||||
private SizeNotifierRelativeLayoutDelegate delegate;
|
||||
|
||||
public interface SizeNotifierRelativeLayoutDelegate {
|
||||
void onSizeChanged(int keyboardHeight);
|
||||
void onSizeChanged(int keyboardHeight, boolean isWidthGreater);
|
||||
}
|
||||
|
||||
public SizeNotifierRelativeLayout(Context context) {
|
||||
@ -66,21 +66,24 @@ public class SizeNotifierRelativeLayout extends RelativeLayout {
|
||||
@SuppressLint("DrawAllocation")
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
if (changed && delegate != null) {
|
||||
super.onLayout(changed, l, t, r, b);
|
||||
|
||||
if (delegate != null) {
|
||||
View rootView = this.getRootView();
|
||||
int usableViewHeight = rootView.getHeight() - AndroidUtilities.statusBarHeight - AndroidUtilities.getViewInset(rootView);
|
||||
this.getWindowVisibleDisplayFrame(rect);
|
||||
keyboardHeight = usableViewHeight - (rect.bottom - rect.top);
|
||||
final boolean isWidthGreater = AndroidUtilities.displaySize.x > AndroidUtilities.displaySize.y;
|
||||
FileLog.e("tmessages", "isWidthGreater = " + isWidthGreater + " height = " + keyboardHeight);
|
||||
post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (delegate != null) {
|
||||
delegate.onSizeChanged(keyboardHeight);
|
||||
delegate.onSizeChanged(keyboardHeight, isWidthGreater);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
super.onLayout(changed, l, t, r, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -44,7 +44,7 @@ import org.telegram.android.NotificationCenter;
|
||||
import org.telegram.messenger.R;
|
||||
import org.telegram.ui.Adapters.BaseSectionsAdapter;
|
||||
import org.telegram.ui.Adapters.ContactsAdapter;
|
||||
import org.telegram.ui.Adapters.ContactsSearchAdapter;
|
||||
import org.telegram.ui.Adapters.SearchAdapter;
|
||||
import org.telegram.ui.Cells.UserCell;
|
||||
import org.telegram.ui.ActionBar.ActionBar;
|
||||
import org.telegram.ui.ActionBar.ActionBarMenu;
|
||||
@ -60,7 +60,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
|
||||
private BaseSectionsAdapter listViewAdapter;
|
||||
private TextView emptyTextView;
|
||||
private LetterSectionsListView listView;
|
||||
private ContactsSearchAdapter searchListViewAdapter;
|
||||
private SearchAdapter searchListViewAdapter;
|
||||
|
||||
private boolean searchWas;
|
||||
private boolean searching;
|
||||
@ -197,7 +197,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
|
||||
});
|
||||
item.getSearchField().setHint(LocaleController.getString("Search", R.string.Search));
|
||||
|
||||
searchListViewAdapter = new ContactsSearchAdapter(getParentActivity(), ignoreUsers, allowUsernameSearch);
|
||||
searchListViewAdapter = new SearchAdapter(getParentActivity(), ignoreUsers, allowUsernameSearch);
|
||||
listViewAdapter = new ContactsAdapter(getParentActivity(), onlyUsers, needPhonebook, ignoreUsers);
|
||||
|
||||
fragmentView = new FrameLayout(getParentActivity());
|
||||
|
@ -50,7 +50,7 @@ import org.telegram.android.MessagesController;
|
||||
import org.telegram.android.NotificationCenter;
|
||||
import org.telegram.messenger.R;
|
||||
import org.telegram.ui.Adapters.ContactsAdapter;
|
||||
import org.telegram.ui.Adapters.ContactsSearchAdapter;
|
||||
import org.telegram.ui.Adapters.SearchAdapter;
|
||||
import org.telegram.ui.ActionBar.ActionBar;
|
||||
import org.telegram.ui.ActionBar.ActionBarMenu;
|
||||
import org.telegram.ui.ActionBar.BaseFragment;
|
||||
@ -95,7 +95,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
|
||||
private TextView emptyTextView;
|
||||
private EditText userSelectEditText;
|
||||
private LetterSectionsListView listView;
|
||||
private ContactsSearchAdapter searchListViewAdapter;
|
||||
private SearchAdapter searchListViewAdapter;
|
||||
|
||||
private GroupCreateActivityDelegate delegate;
|
||||
|
||||
@ -186,7 +186,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
|
||||
ActionBarMenu menu = actionBar.createMenu();
|
||||
menu.addItemWithWidth(done_button, R.drawable.ic_done, AndroidUtilities.dp(56));
|
||||
|
||||
searchListViewAdapter = new ContactsSearchAdapter(getParentActivity(), null, false);
|
||||
searchListViewAdapter = new SearchAdapter(getParentActivity(), null, false);
|
||||
searchListViewAdapter.setCheckedMap(selectedContacts);
|
||||
searchListViewAdapter.setUseUserCell(true);
|
||||
listViewAdapter = new ContactsAdapter(getParentActivity(), true, false, null);
|
||||
|
@ -22,6 +22,7 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import android.provider.ContactsContract;
|
||||
import android.util.Log;
|
||||
import android.view.ActionMode;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
@ -241,7 +242,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
layersActionBarLayout.setBackgroundResource(R.drawable.boxshadow);
|
||||
launchLayout.addView(layersActionBarLayout);
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams)layersActionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = AndroidUtilities.dp(498);
|
||||
relativeLayoutParams.width = AndroidUtilities.dp(530);
|
||||
relativeLayoutParams.height = AndroidUtilities.dp(528);
|
||||
layersActionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
layersActionBarLayout.init(layerFragmentsStack);
|
||||
@ -869,17 +870,21 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
PhotoViewer.getInstance().closePhoto(false, true);
|
||||
}
|
||||
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
actionBarLayout.showLastFragment();
|
||||
rightActionBarLayout.showLastFragment();
|
||||
}
|
||||
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
actionBarLayout.showLastFragment();
|
||||
rightActionBarLayout.showLastFragment();
|
||||
} else {
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
}
|
||||
} else if (open_settings != 0) {
|
||||
actionBarLayout.presentFragment(new SettingsActivity(), false, true, true);
|
||||
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
actionBarLayout.showLastFragment();
|
||||
rightActionBarLayout.showLastFragment();
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
actionBarLayout.showLastFragment();
|
||||
rightActionBarLayout.showLastFragment();
|
||||
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
||||
} else {
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
}
|
||||
pushOpened = true;
|
||||
}
|
||||
|
@ -819,6 +819,12 @@ public class LoginActivity extends BaseFragment {
|
||||
|
||||
final Bundle params = new Bundle();
|
||||
params.putString("phone", "+" + codeField.getText() + phoneField.getText());
|
||||
try {
|
||||
params.putString("ephone", "+" + PhoneFormat.stripExceptNumbers(codeField.getText().toString()) + " " + PhoneFormat.stripExceptNumbers(phoneField.getText().toString()));
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
params.putString("ephone", "+" + phone);
|
||||
}
|
||||
params.putString("phoneFormated", phone);
|
||||
nextPressed = true;
|
||||
needShowProgress();
|
||||
@ -899,6 +905,7 @@ public class LoginActivity extends BaseFragment {
|
||||
|
||||
private String phoneHash;
|
||||
private String requestPhone;
|
||||
private String emailPhone;
|
||||
private EditText codeField;
|
||||
private TextView confirmTextView;
|
||||
private TextView timeText;
|
||||
@ -1008,8 +1015,8 @@ public class LoginActivity extends BaseFragment {
|
||||
|
||||
Intent mailer = new Intent(Intent.ACTION_SEND);
|
||||
mailer.setType("message/rfc822");
|
||||
mailer.putExtra(Intent.EXTRA_EMAIL, new String[]{"sms@telegram.org"});
|
||||
mailer.putExtra(Intent.EXTRA_SUBJECT, "Android registration/login issue " + version + " " + requestPhone);
|
||||
mailer.putExtra(Intent.EXTRA_EMAIL, new String[]{"sms@stel.com"});
|
||||
mailer.putExtra(Intent.EXTRA_SUBJECT, "Android registration/login issue " + version + " " + emailPhone);
|
||||
mailer.putExtra(Intent.EXTRA_TEXT, "Phone: " + requestPhone + "\nApp version: " + version + "\nOS version: SDK " + Build.VERSION.SDK_INT + "\nDevice Name: " + Build.MANUFACTURER + Build.MODEL + "\nLocale: " + Locale.getDefault() + "\nError: " + lastError);
|
||||
getContext().startActivity(Intent.createChooser(mailer, "Send email..."));
|
||||
} catch (Exception e) {
|
||||
@ -1068,6 +1075,7 @@ public class LoginActivity extends BaseFragment {
|
||||
currentParams = params;
|
||||
waitingForSms = true;
|
||||
String phone = params.getString("phone");
|
||||
emailPhone = params.getString("ephone");
|
||||
requestPhone = params.getString("phoneFormated");
|
||||
phoneHash = params.getString("phoneHash");
|
||||
time = params.getInt("calltime");
|
||||
|
@ -23,6 +23,7 @@ import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
@ -399,7 +400,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
|
||||
}
|
||||
long dialog_id = 0;
|
||||
int message_id = 0;
|
||||
BaseFragmentAdapter adapter = (BaseFragmentAdapter)messagesListView.getAdapter();
|
||||
BaseFragmentAdapter adapter = (BaseFragmentAdapter) messagesListView.getAdapter();
|
||||
if (adapter == dialogsAdapter) {
|
||||
TLRPC.TL_dialog dialog = dialogsAdapter.getItem(i);
|
||||
if (dialog == null) {
|
||||
@ -428,6 +429,9 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
|
||||
MessageObject messageObject = (MessageObject)obj;
|
||||
dialog_id = messageObject.getDialogId();
|
||||
message_id = messageObject.getId();
|
||||
dialogsSearchAdapter.addHashtagsFromMessage(dialogsSearchAdapter.getLastSearchString());
|
||||
} else if (obj instanceof String) {
|
||||
actionBar.openSearchField((String) obj);
|
||||
}
|
||||
}
|
||||
|
||||
@ -484,6 +488,26 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
|
||||
@Override
|
||||
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
if (onlySelect || searching && searchWas || getParentActivity() == null) {
|
||||
if (searchWas && searching) {
|
||||
BaseFragmentAdapter adapter = (BaseFragmentAdapter) messagesListView.getAdapter();
|
||||
if (adapter == dialogsSearchAdapter) {
|
||||
Object item = adapter.getItem(i);
|
||||
if (item instanceof String) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
||||
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
|
||||
builder.setMessage(LocaleController.getString("ClearSearch", R.string.ClearSearch));
|
||||
builder.setPositiveButton(LocaleController.getString("ClearButton", R.string.ClearButton).toUpperCase(), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
dialogsSearchAdapter.clearRecentHashtags();
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
|
||||
showAlertDialog(builder);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
TLRPC.TL_dialog dialog;
|
||||
@ -636,10 +660,10 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
|
||||
|
||||
private void updateActionBarTitle(){
|
||||
int value = AndroidUtilities.getIntDef("chatsHeaderTitle", 0);
|
||||
String title = LocaleController.getString("AppName", R.string.AppName) + " Messenger";
|
||||
String title = LocaleController.getString("AppName", R.string.AppName);
|
||||
TLRPC.User user = UserConfig.getCurrentUser();
|
||||
if( value == 1){
|
||||
title = LocaleController.getString("AppName", R.string.AppName);
|
||||
title = LocaleController.getString("ShortAppName", R.string.ShortAppName);
|
||||
} else if( value == 2){
|
||||
if (user != null && (user.first_name != null || user.last_name != null)) {
|
||||
title = ContactsController.formatName(user.first_name, user.last_name);
|
||||
@ -648,6 +672,8 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
|
||||
if (user != null && user.username != null && user.username.length() != 0) {
|
||||
title = "@" + user.username;
|
||||
}
|
||||
} else if(value == 4){
|
||||
title = "";
|
||||
}
|
||||
actionBar.setTitle(title);
|
||||
actionBar.setTitleColor(AndroidUtilities.getIntDef("chatsHeaderTitleColor", 0xffffffff));
|
||||
|
@ -77,6 +77,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
||||
private int inappSoundRow;
|
||||
private int inappVibrateRow;
|
||||
private int inappPreviewRow;
|
||||
private int inchatSoundRow;
|
||||
private int inappPriorityRow;
|
||||
private int eventsSectionRow2;
|
||||
private int eventsSectionRow;
|
||||
@ -125,6 +126,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
||||
inappSoundRow = rowCount++;
|
||||
inappVibrateRow = rowCount++;
|
||||
inappPreviewRow = rowCount++;
|
||||
inchatSoundRow = rowCount++;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
inappPriorityRow = rowCount++;
|
||||
} else {
|
||||
@ -295,6 +297,13 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
||||
enabled = preferences.getBoolean("EnableInAppPreview", true);
|
||||
editor.putBoolean("EnableInAppPreview", !enabled);
|
||||
editor.commit();
|
||||
} else if (i == inchatSoundRow) {
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
enabled = preferences.getBoolean("EnableInChatSound", true);
|
||||
editor.putBoolean("EnableInChatSound", !enabled);
|
||||
editor.commit();
|
||||
NotificationsController.getInstance().setInChatSoundEnabled(!enabled);
|
||||
} else if (i == inappPriorityRow) {
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
@ -696,6 +705,8 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
||||
checkCell.setTextAndCheck(LocaleController.getString("NotificationsService", R.string.NotificationsService), preferences.getBoolean("pushService", true), false);
|
||||
} else if (i == badgeNumberRow) {
|
||||
checkCell.setTextAndCheck(LocaleController.getString("BadgeNumber", R.string.BadgeNumber), preferences.getBoolean("badgeNumber", true), true);
|
||||
} else if (i == inchatSoundRow) {
|
||||
checkCell.setTextAndCheck(LocaleController.getString("InChatSound", R.string.InChatSound), preferences.getBoolean("EnableInChatSound", true), true);
|
||||
}
|
||||
} else if (type == 2) {
|
||||
if (view == null) {
|
||||
@ -814,7 +825,8 @@ 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 == inappPriorityRow) {
|
||||
i == notificationsServiceRow || i == badgeNumberRow || i == inappPriorityRow ||
|
||||
i == inchatSoundRow) {
|
||||
return 1;
|
||||
} else if (i == messageLedRow || i == groupLedRow) {
|
||||
return 3;
|
||||
|
@ -357,7 +357,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati
|
||||
WindowManager manager = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
||||
int rotation = manager.getDefaultDisplay().getRotation();
|
||||
columnsCount = 2;
|
||||
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
|
||||
if (!AndroidUtilities.isTablet() && (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90)) {
|
||||
columnsCount = 4;
|
||||
}
|
||||
listAdapter.notifyDataSetChanged();
|
||||
|
@ -9,7 +9,9 @@
|
||||
package org.telegram.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Build;
|
||||
import android.util.Base64;
|
||||
@ -282,6 +284,33 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
}
|
||||
});
|
||||
|
||||
if (selectedAlbum == null) {
|
||||
listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
|
||||
@Override
|
||||
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
if (searchResult.isEmpty() && lastSearchString == null) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
||||
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
|
||||
builder.setMessage(LocaleController.getString("ClearSearch", R.string.ClearSearch));
|
||||
builder.setPositiveButton(LocaleController.getString("ClearButton", R.string.ClearButton).toUpperCase(), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
recentImages.clear();
|
||||
if (listAdapter != null) {
|
||||
listAdapter.notifyDataSetChanged();
|
||||
}
|
||||
MessagesStorage.getInstance().clearWebRecent(type);
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
|
||||
showAlertDialog(builder);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
emptyView = new TextView(getParentActivity());
|
||||
emptyView.setTextColor(0xff808080);
|
||||
emptyView.setTextSize(20);
|
||||
|
@ -518,7 +518,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
imagesArrLocationsSizes.clear();
|
||||
avatarsArr.clear();
|
||||
for (TLRPC.Photo photo : photos) {
|
||||
if (photo instanceof TLRPC.TL_photoEmpty || photo.sizes == null) {
|
||||
if (photo == null || photo instanceof TLRPC.TL_photoEmpty || photo.sizes == null) {
|
||||
continue;
|
||||
}
|
||||
TLRPC.PhotoSize sizeFull = FileLoader.getClosestPhotoSizeWithSize(photo.sizes, 640);
|
||||
|
@ -194,7 +194,7 @@ public class PopupNotificationActivity extends Activity implements NotificationC
|
||||
chatActivityEnterView.setLayoutParams(layoutParams3);
|
||||
chatActivityEnterView.setDelegate(new ChatActivityEnterView.ChatActivityEnterViewDelegate() {
|
||||
@Override
|
||||
public void onMessageSend() {
|
||||
public void onMessageSend(String message) {
|
||||
if (currentMessageObject == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -733,9 +733,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
int avatarY = AndroidUtilities.dp(22) - (int)((AndroidUtilities.dp(22) - (AndroidUtilities.getCurrentActionBarHeight() - AndroidUtilities.dp(42)) / 2) * (1.0f - diff));
|
||||
int nameX = 97 + (int)(21 * diffm);
|
||||
int nameEndX = 16 + (int)(32 * diffm);
|
||||
float nameFontSize = 20 - 2 * diffm;
|
||||
int nameY = avatarY + AndroidUtilities.dp(29 - 10 * diffm);
|
||||
int statusY = avatarY + AndroidUtilities.dp(8 - 7 * diffm);
|
||||
float scale = 1.0f - 0.12f * diffm;
|
||||
|
||||
if (writeButton != null) {
|
||||
layoutParams = (FrameLayout.LayoutParams) writeButton.getLayoutParams();
|
||||
@ -757,7 +757,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
layoutParams.bottomMargin = avatarY;
|
||||
avatarImage.setLayoutParams(layoutParams);
|
||||
|
||||
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, nameFontSize);
|
||||
ViewProxy.setPivotX(nameTextView, 0);
|
||||
ViewProxy.setPivotY(nameTextView, 0);
|
||||
ViewProxy.setScaleX(nameTextView, scale);
|
||||
ViewProxy.setScaleY(nameTextView, scale);
|
||||
layoutParams = (FrameLayout.LayoutParams) nameTextView.getLayoutParams();
|
||||
layoutParams.leftMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameEndX : nameX);
|
||||
layoutParams.rightMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameX : nameEndX);
|
||||
|
@ -50,6 +50,7 @@ import org.telegram.android.ContactsController;
|
||||
import org.telegram.PhoneFormat.PhoneFormat;
|
||||
import org.telegram.android.MediaController;
|
||||
import org.telegram.messenger.ApplicationLoader;
|
||||
import org.telegram.messenger.BuildConfig;
|
||||
import org.telegram.messenger.BuildVars;
|
||||
import org.telegram.android.LocaleController;
|
||||
import org.telegram.messenger.FileLoader;
|
||||
@ -241,8 +242,9 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
supportSectionRow2 = rowCount++;
|
||||
askQuestionRow = rowCount++;
|
||||
telegramFaqRow = rowCount++;
|
||||
if (BuildVars.DEBUG_VERSION) {
|
||||
sendLogsRow = rowCount++;
|
||||
//if (BuildVars.DEBUG_VERSION) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
sendLogsRow = rowCount++;
|
||||
clearLogsRow = rowCount++;
|
||||
//switchBackendButtonRow = rowCount++;
|
||||
}
|
||||
@ -447,7 +449,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
MessagesController.getInstance().fontSize = numberPicker.getValue();
|
||||
editor.commit();
|
||||
//
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor edit = themePrefs.edit();
|
||||
edit.putInt("chatTextSize", numberPicker.getValue());
|
||||
edit.commit();
|
||||
@ -959,9 +961,9 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
int avatarY = AndroidUtilities.dp(22) - (int)((AndroidUtilities.dp(22) - (AndroidUtilities.getCurrentActionBarHeight() - AndroidUtilities.dp(42)) / 2) * (1.0f - diff));
|
||||
int nameX = 97 + (int)(21 * diffm);
|
||||
int nameEndX = 16 + (int)(32 * diffm);
|
||||
float nameFontSize = 20 - 2 * diffm;
|
||||
int nameY = avatarY + AndroidUtilities.dp(29 - 10 * diffm);
|
||||
int nameY = avatarY + AndroidUtilities.dp(29 - 13 * diffm);
|
||||
int statusY = avatarY + AndroidUtilities.dp(8 - 7 * diffm);
|
||||
float scale = 1.0f - 0.12f * diffm;
|
||||
|
||||
layoutParams = (FrameLayout.LayoutParams) writeButton.getLayoutParams();
|
||||
layoutParams.topMargin = (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + AndroidUtilities.getCurrentActionBarHeight() + actionBar.getExtraHeight() - AndroidUtilities.dp(29.5f);
|
||||
@ -981,7 +983,10 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
layoutParams.bottomMargin = avatarY;
|
||||
avatarImage.setLayoutParams(layoutParams);
|
||||
|
||||
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, nameFontSize);
|
||||
ViewProxy.setPivotX(nameTextView, 0);
|
||||
ViewProxy.setPivotY(nameTextView, 0);
|
||||
ViewProxy.setScaleX(nameTextView, scale);
|
||||
ViewProxy.setScaleY(nameTextView, scale);
|
||||
layoutParams = (FrameLayout.LayoutParams) nameTextView.getLayoutParams();
|
||||
layoutParams.leftMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameEndX : nameX);
|
||||
layoutParams.rightMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameX : nameEndX);
|
||||
|
@ -161,7 +161,7 @@ public class ThemingActivity extends BaseFragment {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
li.inflate(R.layout.colordialog, null, false);
|
||||
@ -279,7 +279,7 @@ public class ThemingActivity extends BaseFragment {
|
||||
@Override
|
||||
public void run() {
|
||||
reseting = false;
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor editor = themePrefs.edit();
|
||||
editor.clear();
|
||||
editor.commit();
|
||||
@ -408,7 +408,7 @@ public class ThemingActivity extends BaseFragment {
|
||||
}*/
|
||||
|
||||
private void commitInt(int i){
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putInt("themeColor", i);
|
||||
AndroidUtilities.themeColor = i;
|
||||
|
@ -186,7 +186,7 @@ public class ThemingChatActivity extends BaseFragment {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, final int i, long l) {
|
||||
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
final String key = view.getTag() != null ? view.getTag().toString() : "";
|
||||
|
||||
if (i == headerColorRow) {
|
||||
@ -207,7 +207,7 @@ public class ThemingChatActivity extends BaseFragment {
|
||||
},themePrefs.getInt("chatHeaderColor", AndroidUtilities.getIntColor("themeColor")), CENTER, 0, false);
|
||||
|
||||
colorDialog.show();
|
||||
} else if (i == memberColorCheckRow) {
|
||||
} else if (i == memberColorCheckRow) {
|
||||
boolean b = themePrefs.getBoolean( key, true);
|
||||
SharedPreferences.Editor editor = themePrefs.edit();
|
||||
editor.putBoolean( key, !b);
|
||||
@ -785,7 +785,7 @@ public class ThemingChatActivity extends BaseFragment {
|
||||
}
|
||||
|
||||
private void resetPref(String key){
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.remove(key);
|
||||
editor.commit();
|
||||
@ -806,7 +806,7 @@ public class ThemingChatActivity extends BaseFragment {
|
||||
}
|
||||
|
||||
private void commitInt(String key, int value){
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putInt(key, value);
|
||||
editor.commit();
|
||||
@ -893,7 +893,7 @@ public class ThemingChatActivity extends BaseFragment {
|
||||
@Override
|
||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||
int type = getItemViewType(i);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
if (type == 0) {
|
||||
if (view == null) {
|
||||
view = new ShadowSectionCell(mContext);
|
||||
|
@ -172,7 +172,7 @@ public class ThemingChatsActivity extends BaseFragment {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, final int i, long l) {
|
||||
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
final String key = view.getTag() != null ? view.getTag().toString() : "";
|
||||
|
||||
if (i == headerColorRow) {
|
||||
@ -257,8 +257,8 @@ public class ThemingChatsActivity extends BaseFragment {
|
||||
int user_id = UserConfig.getClientUserId();
|
||||
TLRPC.User user = MessagesController.getInstance().getUser(user_id);
|
||||
List<CharSequence> array = new ArrayList<>();
|
||||
array.add( LocaleController.getString("AppName", R.string.AppName) + " Messenger" );
|
||||
array.add( LocaleController.getString("AppName", R.string.AppName) );
|
||||
array.add( LocaleController.getString("AppName", R.string.AppName));
|
||||
array.add( LocaleController.getString("ShortAppName", R.string.ShortAppName) );
|
||||
String usr = "";
|
||||
if (user != null && (user.first_name != null || user.last_name != null)) {
|
||||
usr = ContactsController.formatName(user.first_name, user.last_name);
|
||||
@ -268,12 +268,13 @@ public class ThemingChatsActivity extends BaseFragment {
|
||||
usr = "@" + user.username;
|
||||
array.add(usr);
|
||||
}
|
||||
array.add("");
|
||||
String[] simpleArray = new String[ array.size() ];
|
||||
array.toArray( new String[ array.size() ]);
|
||||
builder.setItems(array.toArray(simpleArray), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
themePrefs.edit().putInt("chatsHeaderTitle", which).commit();
|
||||
if (listView != null) {
|
||||
listView.invalidateViews();
|
||||
@ -581,7 +582,7 @@ public class ThemingChatsActivity extends BaseFragment {
|
||||
}
|
||||
|
||||
private void resetPref(String key){
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
if(key != null)editor.remove(key);
|
||||
editor.commit();
|
||||
@ -591,7 +592,7 @@ public class ThemingChatsActivity extends BaseFragment {
|
||||
}
|
||||
|
||||
private void commitInt(String key, int value){
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putInt(key, value);
|
||||
editor.commit();
|
||||
@ -676,7 +677,7 @@ public class ThemingChatsActivity extends BaseFragment {
|
||||
@Override
|
||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||
int type = getItemViewType(i);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
if (type == 0) {
|
||||
if (view == null) {
|
||||
view = new ShadowSectionCell(mContext);
|
||||
@ -805,13 +806,15 @@ public class ThemingChatsActivity extends BaseFragment {
|
||||
text = "-";
|
||||
}
|
||||
if (value == 0) {
|
||||
textCell.setTextAndValue(LocaleController.getString("HeaderTitle", R.string.HeaderTitle), LocaleController.getString("AppName", R.string.AppName) + " Messenger", false);
|
||||
} else if (value == 1) {
|
||||
textCell.setTextAndValue(LocaleController.getString("HeaderTitle", R.string.HeaderTitle), LocaleController.getString("AppName", R.string.AppName), false);
|
||||
} else if (value == 1) {
|
||||
textCell.setTextAndValue(LocaleController.getString("HeaderTitle", R.string.HeaderTitle), LocaleController.getString("ShortAppName", R.string.ShortAppName), false);
|
||||
} else if (value == 2) {
|
||||
textCell.setTextAndValue(LocaleController.getString("HeaderTitle", R.string.HeaderTitle), ContactsController.formatName(user.first_name, user.last_name), false);
|
||||
} else if (value == 3) {
|
||||
textCell.setTextAndValue(LocaleController.getString("HeaderTitle", R.string.HeaderTitle), text, false);
|
||||
} else if (value == 4) {
|
||||
textCell.setTextAndValue(LocaleController.getString("HeaderTitle", R.string.HeaderTitle), "", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ public class ThemingContactsActivity extends BaseFragment {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, final int i, long l) {
|
||||
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
|
||||
if (i == headerColorRow) {
|
||||
if (getParentActivity() == null) {
|
||||
@ -321,7 +321,7 @@ public class ThemingContactsActivity extends BaseFragment {
|
||||
}
|
||||
|
||||
private void resetInt(String key){
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.remove(key);
|
||||
editor.commit();
|
||||
@ -331,7 +331,7 @@ public class ThemingContactsActivity extends BaseFragment {
|
||||
}
|
||||
|
||||
private void commitInt(String key, int value){
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putInt(key, value);
|
||||
editor.commit();
|
||||
@ -414,7 +414,7 @@ public class ThemingContactsActivity extends BaseFragment {
|
||||
@Override
|
||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||
int type = getItemViewType(i);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
||||
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
|
||||
if (type == 0) {
|
||||
if (view == null) {
|
||||
view = new ShadowSectionCell(mContext);
|
||||
|
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 261 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 921 B |
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 570 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 841 B After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 476 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.0 KiB |
@ -58,6 +58,7 @@
|
||||
<string name="UnmuteNotifications">إزالة كتم الصوت</string>
|
||||
<string name="WillUnmuteIn">خلال %1$s</string>
|
||||
<string name="MuteDisable">تعطيل</string>
|
||||
<string name="Hashtags">الأوسمة</string>
|
||||
<!--broadcasts-->
|
||||
<string name="NewBroadcastList">رسالة جماعية جديدة</string>
|
||||
<string name="EnterListName">أدخل اسم القائمة</string>
|
||||
@ -302,6 +303,7 @@
|
||||
<string name="VibrationDisabled">تعطيل</string>
|
||||
<string name="LedDisabled">تعطيل</string>
|
||||
<string name="RepeatDisabled">إيقاف</string>
|
||||
<string name="InChatSound">الأصوات داخل المحادثات</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">رمز المرور</string>
|
||||
<string name="ChangePasscode">غيًر رمز المرور</string>
|
||||
@ -366,6 +368,8 @@
|
||||
<string name="AreYouSureDeletePhoto">هل أنت متأكد من رغبتك في حذف هذه الصورة؟</string>
|
||||
<string name="AreYouSureDeleteVideo">هل أنت متأكد من رغبتك في حذف هذا المقطع المرئي؟</string>
|
||||
<string name="DiscardChanges">تجاهل التغييرات؟</string>
|
||||
<string name="ClearSearch">هل ترغب في مسح سجل البحث؟</string>
|
||||
<string name="ClearButton">مسح</string>
|
||||
<!--password view-->
|
||||
<string name="Password">Password</string>
|
||||
<string name="ChangePassword">Change password</string>
|
||||
@ -486,12 +490,12 @@
|
||||
<string name="InvalidLastName">اسم العائلة غير صحيح</string>
|
||||
<string name="Loading">جاري التحميل ...</string>
|
||||
<string name="NoPlayerInstalled">ليس لديك أي مشغل مقاطع مرئية، يرجى تنزيل أية مشغل</string>
|
||||
<string name="NoMailInstalled">يرجى إرسال رسالة بواسطة البريد الإلكتروني إلى sms@telegram.org لتخبرنا عن مشكلتك.</string>
|
||||
<string name="NoMailInstalled">يرجى إرسال رسالة بواسطة البريد الإلكتروني إلى sms@stel.com لتخبرنا عن مشكلتك.</string>
|
||||
<string name="NoHandleAppInstalled">لا يوجد لديك تطبيق يمكنه فتح \'%1$s\'، يرجى تنزيل تطبيق مناسب للإستمرار</string>
|
||||
<string name="InviteUser">هذا المستخدم ليس لديه تيليجرام بعد ، هل ترغب في دعوته الآن؟</string>
|
||||
<string name="AreYouSure">هل أنت متأكد؟</string>
|
||||
<string name="AddToTheGroup">هل ترغب في إضافة %1$s للمجموعة؟\n\nعدد الرسائل الحديثة المراد إعادة تحويلها:</string>
|
||||
<string name="ForwardMessagesTo">؟%1$s هل تريد إعادة توجيه الرسائل إلى</string>
|
||||
<string name="ForwardMessagesTo">هل تريد إعادة توجيه الرسائل إلى %1$s؟</string>
|
||||
<string name="SendMessagesTo">هل ترغب في إرسال رسالة إلى %1$s؟</string>
|
||||
<string name="AreYouSureLogout">نرجو الأخذ بالعلم أنه يمكنك استخدام تيليجرام على أجهزتك المتعددة بسهولة تامة وفي وقت واحد.\n\nوتذكر، تسجيل الخروج يحذف كافة محادثاتك السرية.</string>
|
||||
<string name="AreYouSureSessions">هل أنت متأكد من تسجيل الخروج من جميع الأجهزة الأخرى باستثناء هذا الجهاز؟</string>
|
||||
@ -506,7 +510,7 @@
|
||||
<string name="AreYouSureClearHistory">هل أنت متأكد من رغبتك في حذف سجل المحادثات؟</string>
|
||||
<string name="AreYouSureDeleteMessages">هل أنت متأكد من رغبتك في حذف %1$s؟</string>
|
||||
<string name="SendMessagesToGroup">هل ترغب في إرسال رسالة إلى %1$s؟</string>
|
||||
<string name="ForwardMessagesToGroup">؟%1$s هل تريد إعادة توجيه الرسائل إلى</string>
|
||||
<string name="ForwardMessagesToGroup">هل تريد إعادة توجيه الرسائل إلى %1$s؟</string>
|
||||
<string name="FeatureUnavailable">.Sorry, this feature is currently not available in your country</string>
|
||||
<!--Intro view-->
|
||||
<string name="Page1Title">تيليجرام</string>
|
||||
@ -732,7 +736,7 @@
|
||||
<string name="SaveThemeSum">حفظ الثيمات في مجلد Telegram/Themes</string>
|
||||
<string name="SaveThemeToastText">تم حفظ الثيم</string>
|
||||
<string name="SavedTo">%1$s saved to %2$s</string>
|
||||
<string name="SaveErrorMsg0">Theme not created yet. Apply any Telegram+ MOD first, please</string>
|
||||
<string name="SaveErrorMsg0">Theme not created yet. Apply any MOD first, please</string>
|
||||
<string name="restoreOkMsg">Preferences restored from sdcard</string>
|
||||
<string name="restoreErrorMsg">No preferences file found in %s</string>
|
||||
<string name="NoMediaMessage">لاتوجد بطاقة ذاكرة</string>
|
||||
|
@ -58,6 +58,7 @@
|
||||
<string name="UnmuteNotifications">Stumm aus</string>
|
||||
<string name="WillUnmuteIn">In %1$s</string>
|
||||
<string name="MuteDisable">Stumm aus</string>
|
||||
<string name="Hashtags">HASHTAGS</string>
|
||||
<!--broadcasts-->
|
||||
<string name="NewBroadcastList">Neue Broadcast Liste</string>
|
||||
<string name="EnterListName">Listenname</string>
|
||||
@ -302,6 +303,7 @@
|
||||
<string name="VibrationDisabled">Deaktiviert</string>
|
||||
<string name="LedDisabled">Deaktiviert</string>
|
||||
<string name="RepeatDisabled">Aus</string>
|
||||
<string name="InChatSound">In-Chat Töne</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Pincode</string>
|
||||
<string name="ChangePasscode">Pincode ändern</string>
|
||||
@ -366,6 +368,8 @@
|
||||
<string name="AreYouSureDeletePhoto">Möchtest du wirklich dieses Bild löschen?</string>
|
||||
<string name="AreYouSureDeleteVideo">Möchtest du wirklich dieses Video löschen?</string>
|
||||
<string name="DiscardChanges">Änderungen verwerfen?</string>
|
||||
<string name="ClearSearch">Suchverlauf löschen?</string>
|
||||
<string name="ClearButton">Löschen</string>
|
||||
<!--password view-->
|
||||
<string name="Password">Password</string>
|
||||
<string name="ChangePassword">Change password</string>
|
||||
@ -486,7 +490,7 @@
|
||||
<string name="InvalidLastName">Ungültiger Nachname</string>
|
||||
<string name="Loading">Lädt…</string>
|
||||
<string name="NoPlayerInstalled">Du hast keinen Videoplayer. Bitte installiere einen um fortzufahren.</string>
|
||||
<string name="NoMailInstalled">Bitte sende uns eine Email an sms@telegram.org mit einer Beschreibung des Problems.</string>
|
||||
<string name="NoMailInstalled">Bitte sende eine Email an sms@stel.com mit einer Beschreibung des Problems.</string>
|
||||
<string name="NoHandleAppInstalled">Du hast keine Applikationen, die den Dateityp \'%1$s\' öffnen könnten. Bitte installiere eine entsprechende Anwendung um fortzufahren.</string>
|
||||
<string name="InviteUser">Dieser Benutzer hat noch kein Telegram. Möchtest du ihn einladen?</string>
|
||||
<string name="AreYouSure">Bist du sicher?</string>
|
||||
@ -696,10 +700,10 @@
|
||||
<string name="TelegramForAndroid">Plus Messenger für Android</string>
|
||||
<string name="Theming">Theming</string>
|
||||
<string name="colorHexInvalid">Ungültiger Hex-Code!</string>
|
||||
<string name="themeColor">Farbe Theme</string>
|
||||
<string name="themeColor">Theme Farbe</string>
|
||||
<string name="ResetThemeSettings">Themeeinstellungen zurücksetzen</string>
|
||||
<string name="ResetThemeSettingsSum">Alle Themeeinstellungen rückgängig machen</string>
|
||||
<string name="ResetThemeToastText">Design Einstellungen auf Standardwerte zurücksetzen!!</string>
|
||||
<string name="ResetThemeToastText">Themeeinstellungen auf Standardwerte zurücksetzen!!</string>
|
||||
<string name="General">Allgemein</string>
|
||||
<string name="Screens">Ansichten</string>
|
||||
<string name="MainScreen">Hauptübersicht</string>
|
||||
@ -707,44 +711,44 @@
|
||||
<string name="ContactsScreen">Kontaktübersicht</string>
|
||||
<string name="Header">Kopfzeile</string>
|
||||
<string name="Rows">Zeilen</string>
|
||||
<string name="ChatList">Chat Liste</string>
|
||||
<string name="ChatsList">Chat Verlauf</string>
|
||||
<string name="ContactsList">Kontakt Liste</string>
|
||||
<string name="HeaderColor">Farbe Kopfzeile</string>
|
||||
<string name="NameColor">Farbe Kontaktnamen</string>
|
||||
<string name="NameSize">Größe Kontaktnamen</string>
|
||||
<string name="MessageColor">Farbe Nachrichten</string>
|
||||
<string name="MessageSize">Größe Nachrichten</string>
|
||||
<string name="TimeDateColor">Farbe Uhrzeit/Datum</string>
|
||||
<string name="TimeDateSize">Größe Uhrzeit/Datum</string>
|
||||
<string name="CountColor">Farbe Benachrichtigungszähler</string>
|
||||
<string name="CountSize">Größe Benachrichtigungszähler</string>
|
||||
<string name="RowColor">Farbe Zeilen</string>
|
||||
<string name="CountBGColor">Farbe Hintergrund Benachrichtigungszähler</string>
|
||||
<string name="StatusColor">Farbe Status</string>
|
||||
<string name="StatusSize">Größe Status</string>
|
||||
<string name="RBubbleColor">Farbe rechte Sprechblase</string>
|
||||
<string name="LBubbleColor">Farbe linke Sprechblase</string>
|
||||
<string name="DateColor">Farbe Datum</string>
|
||||
<string name="DateSize">Größe Datum</string>
|
||||
<string name="DateBubbleColor">Farbe Datum Sprechblase</string>
|
||||
<string name="RTextColor">Farbe Text rechte Sprechblase</string>
|
||||
<string name="LTextColor">Farbe Text linke Sprechblase</string>
|
||||
<string name="RTimeColor">Farbe Uhrzeit rechte Sprechblase</string>
|
||||
<string name="LTimeColor">Farbe Uhrzeit linke Sprechblase</string>
|
||||
<string name="TimeSize">Größe Uhrzeit</string>
|
||||
<string name="EditTextColor">Farbe Texteingabefeld</string>
|
||||
<string name="EditTextSize">Größe Text im Texteingabefeld</string>
|
||||
<string name="EditTextBGColor">Farbe Hintergrund Texteingabefeld</string>
|
||||
<string name="EmojiViewBGColor">Farbe Hintergrund Emoji</string>
|
||||
<string name="EmojiViewTabColor">Farbe Emoji Tab</string>
|
||||
<string name="OnlineColor">Farbe Online Status</string>
|
||||
<string name="ChatList">Chatliste</string>
|
||||
<string name="ChatsList">Chatverlauf</string>
|
||||
<string name="ContactsList">Kontaktliste</string>
|
||||
<string name="HeaderColor">Kopfzeilenfarbe</string>
|
||||
<string name="NameColor">Kontaktnamenfarbe</string>
|
||||
<string name="NameSize">Kontaktnamengröße</string>
|
||||
<string name="MessageColor">Nachrichtenfarbe</string>
|
||||
<string name="MessageSize">Nachrichtengröße</string>
|
||||
<string name="TimeDateColor">Uhrzeit/Datum Farbe</string>
|
||||
<string name="TimeDateSize">Uhrzeit/Datum Größe</string>
|
||||
<string name="CountColor">Benachrichtigungszähler Farbe</string>
|
||||
<string name="CountSize">Benachrichtigungszähler Größe</string>
|
||||
<string name="RowColor">Zeilenfarbe</string>
|
||||
<string name="CountBGColor">Benachrichtigungszähler Hintergrundfarbe</string>
|
||||
<string name="StatusColor">Statusfarbe</string>
|
||||
<string name="StatusSize">Statusgröße</string>
|
||||
<string name="RBubbleColor">rechte Sprechblasenfarbe</string>
|
||||
<string name="LBubbleColor">linke Sprechblasenfarbe</string>
|
||||
<string name="DateColor">Datumfarbe</string>
|
||||
<string name="DateSize">Datumgröße</string>
|
||||
<string name="DateBubbleColor">Datumfarbe Sprechblase</string>
|
||||
<string name="RTextColor">Textfarbe rechte Sprechblase</string>
|
||||
<string name="LTextColor">Textfarbe linke Sprechblase</string>
|
||||
<string name="RTimeColor">Uhrzeitfarbe rechte Sprechblase</string>
|
||||
<string name="LTimeColor">Uhrzeitfarbe linke Sprechblase</string>
|
||||
<string name="TimeSize">Uhrzeitgröße</string>
|
||||
<string name="EditTextColor">Textfarbe Texteingabefeld</string>
|
||||
<string name="EditTextSize">Textgröße Texteingabefeld</string>
|
||||
<string name="EditTextBGColor">Hintergrundfarbe Texteingabefeld</string>
|
||||
<string name="EmojiViewBGColor">Hintergrundfarbe Emoji</string>
|
||||
<string name="EmojiViewTabColor">Tabfarbe Emoji</string>
|
||||
<string name="OnlineColor">Statusfarbe Online </string>
|
||||
<string name="ChatMusic">Musik</string>
|
||||
<string name="SaveTheme">Speichere Theme</string>
|
||||
<string name="SaveThemeSum">Speichern Sie Ihr Theme im Telegram/Themes Ordner</string>
|
||||
<string name="SaveThemeToastText">Theme Gespeichert!!</string>
|
||||
<string name="SavedTo">%1$s auf %2$s gespeichert</string>
|
||||
<string name="SaveErrorMsg0">Theme wurde noch nicht erstellt. Verwenden Sie bitte zuerst eine der Telegram+ Modifikationen.</string>
|
||||
<string name="SaveErrorMsg0">Theme wurde noch nicht erstellt. Verwenden Sie bitte zuerst eine der Plus Messenger Modifikationen.</string>
|
||||
<string name="restoreOkMsg">Einstellungen von SD-Karte wiederhergestellt</string>
|
||||
<string name="restoreErrorMsg">Keine Voreinstellungsdatei in %s gefunden</string>
|
||||
<string name="NoMediaMessage">Keine SD-Karte gefunden.</string>
|
||||
@ -752,38 +756,38 @@
|
||||
<string name="Themes">Themen</string>
|
||||
<string name="ApplyTheme">Theme anwenden</string>
|
||||
<string name="ApplyThemeSum">Theme xml aus einem lokalen Ordner verwenden</string>
|
||||
<string name="MemberColor">Farbe Gruppenmitglieder</string>
|
||||
<string name="ChecksColor">Farbe Haken</string>
|
||||
<string name="MuteColor">Farbe Symbol Stumm</string>
|
||||
<string name="MemberColor">Gruppenmitglieder Farbe</string>
|
||||
<string name="ChecksColor">Häkchenfarbe</string>
|
||||
<string name="MuteColor">Symbolfarbe Stumm</string>
|
||||
<string name="SendLogs">Sende Protokolle</string>
|
||||
<string name="SendLogsEmpty">Es gibt keine Protokolle</string>
|
||||
<string name="SendIcon">Farbe Symbol Senden</string>
|
||||
<string name="SendIcon">Symbolfarbe für Senden</string>
|
||||
<string name="HideMobile">Handy Nummer im Menü verbergen</string>
|
||||
<string name="FloatingPencilColor">Farbe schwebender Stift</string>
|
||||
<string name="FloatingPencilColor">schwebender Stift Farbe</string>
|
||||
<string name="FloatingBGColor">Hintergrundfarbe schwebender Stift</string>
|
||||
<string name="Community">G+ Community</string>
|
||||
<string name="TypingColor">Farbe Texteingabefeld</string>
|
||||
<string name="EditTextIconsColor">Farbe Symbole Texteingabefeld</string>
|
||||
<string name="TypingColor">Textfarbe Eingabefeld</string>
|
||||
<string name="EditTextIconsColor">Symbolfarbe Texteingabefeld</string>
|
||||
<string name="NavigationDrawer">Hauptmenü </string>
|
||||
<string name="OptionsList">Einstellungen Hauptmenü</string>
|
||||
<string name="ListColor">Farbe Hintergrund Hauptmenü</string>
|
||||
<string name="OwnNameSize">Größe Benutzernamen</string>
|
||||
<string name="PhoneColor">Farbe Telefonnummer</string>
|
||||
<string name="PhoneSize">Größe Telefonnummer</string>
|
||||
<string name="AvatarColor">Farbe Profilbild</string>
|
||||
<string name="IconColor">Farbe Symbole Hauptmenü</string>
|
||||
<string name="OptionColor">Farbe Text Hauptmenü</string>
|
||||
<string name="OptionSize">Größe Text Hauptmenü</string>
|
||||
<string name="VersionColor">Farbe Text Aktuelle Version</string>
|
||||
<string name="VersionSize">Größe Text Aktuelle Version</string>
|
||||
<string name="HeaderTitleColor">Farbe Titel Kopfzeile</string>
|
||||
<string name="HeaderIconsColor">Farbe Symbole Kopfzeile</string>
|
||||
<string name="DividerColor">Farbe der Trennstriche</string>
|
||||
<string name="ListColor">Hintergrundfarbe Hauptmenü</string>
|
||||
<string name="OwnNameSize">Benutzernamen Größe</string>
|
||||
<string name="PhoneColor">Telefonnummer Farbe</string>
|
||||
<string name="PhoneSize">Telefonnummer Größe</string>
|
||||
<string name="AvatarColor">Profilbildfarbe</string>
|
||||
<string name="IconColor">Symbolfarbe Hauptmenü</string>
|
||||
<string name="OptionColor">Textfarbe Hauptmenü</string>
|
||||
<string name="OptionSize">Textgröße Hauptmenü</string>
|
||||
<string name="VersionColor">Textfarbe aktuelle Version</string>
|
||||
<string name="VersionSize">Textgröße aktuelle Version</string>
|
||||
<string name="HeaderTitleColor">Titelfarbe Kopfzeile</string>
|
||||
<string name="HeaderIconsColor">Symbolfarbe Kopfzeile</string>
|
||||
<string name="DividerColor">Trennstrich Farbe</string>
|
||||
<string name="AvatarRadius">Durchmesser des Profilbildes</string>
|
||||
<string name="SetMemberColor">Farbe Gruppenmitglieder</string>
|
||||
<string name="ForwardNameColor">Farbe Nachricht weitergeleitet</string>
|
||||
<string name="HeaderTitle">Titel Kopfzeile</string>
|
||||
<string name="ForwardNoQuote">Weiter ohne Zitat</string>
|
||||
<string name="SetMemberColor">Gruppenmitglieder Farbe</string>
|
||||
<string name="ForwardNameColor">Nachrichtenfarbe für weitergeleitet</string>
|
||||
<string name="HeaderTitle">Kopfzeiletitel</string>
|
||||
<string name="ForwardNoQuote">weiter ohne zitieren</string>
|
||||
<string name="DisableMessageClick">mit Klick Pop-up deaktivieren</string>
|
||||
<string name="ProfileScreen">Gruppe/Kontakt Profilübersicht</string>
|
||||
</resources>
|
@ -1,9 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--Translation by Borja Campina, Edited by Victor Espinoza and Francisco Vila-->
|
||||
|
||||
<resources>
|
||||
<string name="AppName">Plus</string>
|
||||
<string name="AppName">Plus Messenger</string>
|
||||
<string name="LanguageName">Español</string>
|
||||
<string name="LanguageNameInEnglish">Spanish</string>
|
||||
<string name="LanguageCode">es</string>
|
||||
@ -58,6 +56,7 @@
|
||||
<string name="UnmuteNotifications">No silenciar</string>
|
||||
<string name="WillUnmuteIn">En %1$s</string>
|
||||
<string name="MuteDisable">Desactivar</string>
|
||||
<string name="Hashtags">HASHTAGS</string>
|
||||
<!--broadcasts-->
|
||||
<string name="NewBroadcastList">Nueva difusión</string>
|
||||
<string name="EnterListName">Nombre de la lista</string>
|
||||
@ -302,6 +301,7 @@
|
||||
<string name="VibrationDisabled">Desactivadas</string>
|
||||
<string name="LedDisabled">Desactivado</string>
|
||||
<string name="RepeatDisabled">Apagado</string>
|
||||
<string name="InChatSound">Sonidos en el chat</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Código de acceso</string>
|
||||
<string name="ChangePasscode">Cambiar código de acceso</string>
|
||||
@ -366,6 +366,8 @@
|
||||
<string name="AreYouSureDeletePhoto">¿Quieres eliminar esta foto?</string>
|
||||
<string name="AreYouSureDeleteVideo">¿Quieres eliminar este vídeo?</string>
|
||||
<string name="DiscardChanges">¿Descartar cambios?</string>
|
||||
<string name="ClearSearch">¿Quieres borrar el historial de búsqueda?</string>
|
||||
<string name="ClearButton">Borrar</string>
|
||||
<!--password view-->
|
||||
<string name="Password">Password</string>
|
||||
<string name="ChangePassword">Change password</string>
|
||||
@ -486,7 +488,7 @@
|
||||
<string name="InvalidLastName">Apellidos inválidos</string>
|
||||
<string name="Loading">Cargando...</string>
|
||||
<string name="NoPlayerInstalled">No tienes reproductor de vídeo. Por favor, instala uno para continuar.</string>
|
||||
<string name="NoMailInstalled">Por favor, envíanos un correo electrónico a sms@telegram.org y cuéntanos tu problema.</string>
|
||||
<string name="NoMailInstalled">Por favor, envía un correo electrónico a sms@stel.com y cuéntanos tu problema.</string>
|
||||
<string name="NoHandleAppInstalled">No tienes aplicaciones que puedan manejar el tipo de archivo \'%1$s\'. Por favor, instala una para continuar.</string>
|
||||
<string name="InviteUser">Este usuario no tiene Telegram aún. ¿Enviarle una invitación?</string>
|
||||
<string name="AreYouSure">¿Quieres hacerlo?</string>
|
||||
@ -785,5 +787,6 @@
|
||||
<string name="HeaderTitle">Título de cabecera</string>
|
||||
<string name="ForwardNoQuote">Reenviar sin citar</string>
|
||||
<string name="DisableMessageClick">Desactivar pop-up al tocar</string>
|
||||
<string name="ProfileScreen">Pantalla de perfil de grupo/contacto</string>
|
||||
<string name="ProfileScreen">Perfil de grupo/contacto</string>
|
||||
<string name="HideBackground">Ocultar fondo personalizado</string>
|
||||
</resources>
|
@ -58,6 +58,7 @@
|
||||
<string name="UnmuteNotifications">Suona</string>
|
||||
<string name="WillUnmuteIn">Tra %1$s</string>
|
||||
<string name="MuteDisable">Disabilita</string>
|
||||
<string name="Hashtags">HASHTAG</string>
|
||||
<!--broadcasts-->
|
||||
<string name="NewBroadcastList">Nuova lista broadcast</string>
|
||||
<string name="EnterListName">Immetti il nome della lista</string>
|
||||
@ -302,6 +303,7 @@
|
||||
<string name="VibrationDisabled">Disabilitata</string>
|
||||
<string name="LedDisabled">Disabilitato</string>
|
||||
<string name="RepeatDisabled">No</string>
|
||||
<string name="InChatSound">Suoni in-chat</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Codice</string>
|
||||
<string name="ChangePasscode">Cambia codice</string>
|
||||
@ -366,6 +368,8 @@
|
||||
<string name="AreYouSureDeletePhoto">Sei sicuro di voler eliminare questa foto?</string>
|
||||
<string name="AreYouSureDeleteVideo">Sei sicuro di voler eliminare questo video?</string>
|
||||
<string name="DiscardChanges">Annullare le modifiche?</string>
|
||||
<string name="ClearSearch">Cancellare la cronologia di ricerca?</string>
|
||||
<string name="ClearButton">Pulisci</string>
|
||||
<!--password view-->
|
||||
<string name="Password">Password</string>
|
||||
<string name="ChangePassword">Change password</string>
|
||||
@ -486,7 +490,7 @@
|
||||
<string name="InvalidLastName">Cognome non valido</string>
|
||||
<string name="Loading">Caricamento…</string>
|
||||
<string name="NoPlayerInstalled">Non hai un lettore video, per favore installane uno per continuare</string>
|
||||
<string name="NoMailInstalled">Invia un’email a sms@telegram.org spiegandoci il problema.</string>
|
||||
<string name="NoMailInstalled">Invia un’email a sms@stel.com spiegandoci il problema.</string>
|
||||
<string name="NoHandleAppInstalled">Non hai nessuna applicazione che può gestire il tipo di file \'%1$s\': installane una per proseguire</string>
|
||||
<string name="InviteUser">Questo utente non ha ancora Telegram, vuoi invitarlo?</string>
|
||||
<string name="AreYouSure">Sei sicuro?</string>
|
||||
@ -786,4 +790,5 @@
|
||||
<string name="ForwardNoQuote">Inoltra senza citare</string>
|
||||
<string name="DisableMessageClick">Disabilita il pop-up al click</string>
|
||||
<string name="ProfileScreen">Schermata Gruppo/Profilo del contatto</string>
|
||||
<string name="HideBackground">Nascondi sfondi personalizzati</string>
|
||||
</resources>
|
@ -3,7 +3,7 @@
|
||||
<!--https://www.transifex.com/projects/p/telegram/language/ko/members/-->
|
||||
|
||||
<resources>
|
||||
<string name="AppName">텔레그램</string>
|
||||
<string name="AppName">Plus Messenger</string>
|
||||
<string name="LanguageName">한국어</string>
|
||||
<string name="LanguageNameInEnglish">Korean</string>
|
||||
<string name="LanguageCode">ko</string>
|
||||
@ -58,6 +58,7 @@
|
||||
<string name="UnmuteNotifications">음소거 해제</string>
|
||||
<string name="WillUnmuteIn">%1$s 후</string>
|
||||
<string name="MuteDisable">비활성화</string>
|
||||
<string name="Hashtags">해시태그</string>
|
||||
<!--broadcasts-->
|
||||
<string name="NewBroadcastList">새 단체 메시지 리스트</string>
|
||||
<string name="EnterListName">리스트 이름을 입력하세요</string>
|
||||
@ -302,6 +303,7 @@
|
||||
<string name="VibrationDisabled">비활성화됨</string>
|
||||
<string name="LedDisabled">비활성화됨</string>
|
||||
<string name="RepeatDisabled">끔</string>
|
||||
<string name="InChatSound">채팅중 소리 설정</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">잠금번호</string>
|
||||
<string name="ChangePasscode">잠금번호 변경</string>
|
||||
@ -366,6 +368,8 @@
|
||||
<string name="AreYouSureDeletePhoto">이 사진을 삭제하시겠습니까?</string>
|
||||
<string name="AreYouSureDeleteVideo">이 동영상을 삭제하시겠습니까?</string>
|
||||
<string name="DiscardChanges">변경을 취소하시겠습니까?</string>
|
||||
<string name="ClearSearch">검색기록을 지우시겠습니까?</string>
|
||||
<string name="ClearButton">지우기</string>
|
||||
<!--password view-->
|
||||
<string name="Password">Password</string>
|
||||
<string name="ChangePassword">Change password</string>
|
||||
@ -486,7 +490,7 @@
|
||||
<string name="InvalidLastName">올바른 성을 입력해 주세요</string>
|
||||
<string name="Loading">불러오는 중...</string>
|
||||
<string name="NoPlayerInstalled">동영상 재생 앱이 없습니다. 계속하려면 앱을 설치해 주세요.</string>
|
||||
<string name="NoMailInstalled">sms@telegram.org 이메일 주소로 이 문제를 보내주세요.</string>
|
||||
<string name="NoMailInstalled">발생한 문제에 대하여 sms@stel.com 주소로 이메일을 보내주세요.</string>
|
||||
<string name="NoHandleAppInstalled">\'%1$s\' 파일 형식을 처리할 앱이 없습니다. 계속하려면 앱을 설치해 주세요.</string>
|
||||
<string name="InviteUser">친구가 아직 텔레그램을 사용하지 않네요. 초대해 보세요!</string>
|
||||
<string name="AreYouSure">확실합니까?</string>
|
||||
|
@ -58,6 +58,7 @@
|
||||
<string name="UnmuteNotifications">Stil uitschakelen</string>
|
||||
<string name="WillUnmuteIn">Over %1$s</string>
|
||||
<string name="MuteDisable">Uitschakelen</string>
|
||||
<string name="Hashtags">HASHTAGS</string>
|
||||
<!--broadcasts-->
|
||||
<string name="NewBroadcastList">Nieuwe verzendlijst</string>
|
||||
<string name="EnterListName">Naam van lijst</string>
|
||||
@ -302,6 +303,7 @@
|
||||
<string name="VibrationDisabled">Uitgeschakeld</string>
|
||||
<string name="LedDisabled">Uitgeschakeld</string>
|
||||
<string name="RepeatDisabled">Uit</string>
|
||||
<string name="InChatSound">Chatgeluiden</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Toegangscode</string>
|
||||
<string name="ChangePasscode">Toegangscode wijzigen</string>
|
||||
@ -366,6 +368,8 @@
|
||||
<string name="AreYouSureDeletePhoto">Foto echt verwijderen?</string>
|
||||
<string name="AreYouSureDeleteVideo">Video echt verwijderen?</string>
|
||||
<string name="DiscardChanges">Wijzigingen negeren?</string>
|
||||
<string name="ClearSearch">Zoekgeschiedenis wissen?</string>
|
||||
<string name="ClearButton">Wissen</string>
|
||||
<!--password view-->
|
||||
<string name="Password">Password</string>
|
||||
<string name="ChangePassword">Change password</string>
|
||||
@ -486,7 +490,7 @@
|
||||
<string name="InvalidLastName">Ongeldige achternaam</string>
|
||||
<string name="Loading">Bezig met laden</string>
|
||||
<string name="NoPlayerInstalled">Je hebt geen mediaspeler. Installeer een mediaspeler om door te gaan.</string>
|
||||
<string name="NoMailInstalled">Mail ons op sms@telegram.org en vertel ons over je probleem.</string>
|
||||
<string name="NoMailInstalled">Mail ons op sms@stel.com en vertel ons over je probleem.</string>
|
||||
<string name="NoHandleAppInstalled">Je hebt geen apps die bestandstype \'%1$s\' kunnen verwerken, gelieve een compatibele app te installeren</string>
|
||||
<string name="InviteUser">Deze gebruiker heeft nog geen Telegram. Wil je een uitnodiging sturen?</string>
|
||||
<string name="AreYouSure">Weet je het zeker?</string>
|
||||
@ -616,54 +620,54 @@
|
||||
<string name="Users_many">%1$d gebruikers</string>
|
||||
<string name="Users_other">%1$d gebruikers</string>
|
||||
<!--forwarded messages-->
|
||||
<string name="ForwardedMessage_zero">+%1$d berichten</string>
|
||||
<string name="ForwardedMessage_one">+1 bericht</string>
|
||||
<string name="ForwardedMessage_two">+%1$d berichten</string>
|
||||
<string name="ForwardedMessage_few">+%1$d berichten</string>
|
||||
<string name="ForwardedMessage_many">+%1$d berichten</string>
|
||||
<string name="ForwardedMessage_other">+%1$d berichten</string>
|
||||
<string name="ForwardedFile_zero">+%1$d bestanden</string>
|
||||
<string name="ForwardedFile_one">+1 bestand</string>
|
||||
<string name="ForwardedFile_two">+%1$d bestanden</string>
|
||||
<string name="ForwardedFile_few">+%1$d bestanden</string>
|
||||
<string name="ForwardedFile_many">+%1$d bestanden</string>
|
||||
<string name="ForwardedFile_other">+%1$d bestanden</string>
|
||||
<string name="ForwardedPhoto_zero">+%1$d foto\'s</string>
|
||||
<string name="ForwardedPhoto_one">+1 foto</string>
|
||||
<string name="ForwardedPhoto_two">+%1$d foto\'s</string>
|
||||
<string name="ForwardedPhoto_few">+%1$d foto\'s</string>
|
||||
<string name="ForwardedPhoto_many">+%1$d foto\'s</string>
|
||||
<string name="ForwardedPhoto_other">+%1$d foto\'s</string>
|
||||
<string name="ForwardedVideo_zero">+%1$d foto\'s</string>
|
||||
<string name="ForwardedVideo_one">+1 video</string>
|
||||
<string name="ForwardedVideo_two">+%1$d video\'s</string>
|
||||
<string name="ForwardedVideo_few">+%1$d video\'s</string>
|
||||
<string name="ForwardedVideo_many">+%1$d video\'s</string>
|
||||
<string name="ForwardedVideo_other">+%1$d video\'s</string>
|
||||
<string name="ForwardedAudio_zero">+%1$d geluidsbestanden</string>
|
||||
<string name="ForwardedAudio_one">+1 geluidsbestand</string>
|
||||
<string name="ForwardedAudio_two">+%1$d geluidsbestanden</string>
|
||||
<string name="ForwardedAudio_few">+%1$d geluidsbestanden</string>
|
||||
<string name="ForwardedAudio_many">+%1$d geluidsbestanden</string>
|
||||
<string name="ForwardedAudio_other">+%1$d geluidsbestanden</string>
|
||||
<string name="ForwardedLocation_zero">+%1$d locaties</string>
|
||||
<string name="ForwardedLocation_one">+1 locatie</string>
|
||||
<string name="ForwardedLocation_two">+%1$d locaties</string>
|
||||
<string name="ForwardedLocation_few">+%1$d locaties</string>
|
||||
<string name="ForwardedLocation_many">+%1$d locaties</string>
|
||||
<string name="ForwardedLocation_other">+%1$d locaties</string>
|
||||
<string name="ForwardedContact_zero">+%1$d contacten</string>
|
||||
<string name="ForwardedContact_one">+1 contact</string>
|
||||
<string name="ForwardedContact_two">+%1$d contacten</string>
|
||||
<string name="ForwardedContact_few">+%1$d contacten</string>
|
||||
<string name="ForwardedContact_many">+%1$d contacten</string>
|
||||
<string name="ForwardedContact_other">+%1$d contacten</string>
|
||||
<string name="ForwardedSticker_zero">+%1$d stickers</string>
|
||||
<string name="ForwardedSticker_one">+1 sticker</string>
|
||||
<string name="ForwardedSticker_two">+%1$d stickers</string>
|
||||
<string name="ForwardedSticker_few">+%1$d stickers</string>
|
||||
<string name="ForwardedSticker_many">+%1$d stickers</string>
|
||||
<string name="ForwardedSticker_other">+%1$d stickers</string>
|
||||
<string name="ForwardedMessage_zero">Bijlage: %1$d berichten</string>
|
||||
<string name="ForwardedMessage_one">Bijlage: 1 bericht</string>
|
||||
<string name="ForwardedMessage_two">Bijlage: %1$d berichten</string>
|
||||
<string name="ForwardedMessage_few">Bijlage: %1$d berichten</string>
|
||||
<string name="ForwardedMessage_many">Bijlage: %1$d berichten</string>
|
||||
<string name="ForwardedMessage_other">Bijlage: %1$d berichten</string>
|
||||
<string name="ForwardedFile_zero">Bijlage: %1$d bestanden</string>
|
||||
<string name="ForwardedFile_one">Bijlage: 1 bestand</string>
|
||||
<string name="ForwardedFile_two">Bijlage: %1$d bestanden</string>
|
||||
<string name="ForwardedFile_few">Bijlage: %1$d bestanden</string>
|
||||
<string name="ForwardedFile_many">Bijlage: %1$d bestanden</string>
|
||||
<string name="ForwardedFile_other">Bijlage: %1$d bestanden</string>
|
||||
<string name="ForwardedPhoto_zero">Bijlage: %1$d foto\'s</string>
|
||||
<string name="ForwardedPhoto_one">Bijlage: 1 foto</string>
|
||||
<string name="ForwardedPhoto_two">Bijlage: %1$d foto\'s</string>
|
||||
<string name="ForwardedPhoto_few">Bijlage: %1$d foto\'s</string>
|
||||
<string name="ForwardedPhoto_many">Bijlage: %1$d foto\'s</string>
|
||||
<string name="ForwardedPhoto_other">Bijlage: %1$d foto\'s</string>
|
||||
<string name="ForwardedVideo_zero">Bijlage: %1$d foto\'s</string>
|
||||
<string name="ForwardedVideo_one">Bijlage: 1 video</string>
|
||||
<string name="ForwardedVideo_two">Bijlage: %1$d video\'s</string>
|
||||
<string name="ForwardedVideo_few">Bijlage: %1$d video\'s</string>
|
||||
<string name="ForwardedVideo_many">Bijlage: %1$d video\'s</string>
|
||||
<string name="ForwardedVideo_other">Bijlage: %1$d video\'s</string>
|
||||
<string name="ForwardedAudio_zero">Bijlage: %1$d geluidsbestanden</string>
|
||||
<string name="ForwardedAudio_one">Bijlage: 1 geluidsbestand</string>
|
||||
<string name="ForwardedAudio_two">Bijlage: %1$d geluidsbestanden</string>
|
||||
<string name="ForwardedAudio_few">Bijlage: %1$d geluidsbestanden</string>
|
||||
<string name="ForwardedAudio_many">Bijlage: %1$d geluidsbestanden</string>
|
||||
<string name="ForwardedAudio_other">Bijlage: %1$d geluidsbestanden</string>
|
||||
<string name="ForwardedLocation_zero">Bijlage: %1$d locaties</string>
|
||||
<string name="ForwardedLocation_one">Bijlage: 1 locatie</string>
|
||||
<string name="ForwardedLocation_two">Bijlage: %1$d locaties</string>
|
||||
<string name="ForwardedLocation_few">Bijlage: %1$d locaties</string>
|
||||
<string name="ForwardedLocation_many">Bijlage: %1$d locaties</string>
|
||||
<string name="ForwardedLocation_other">Bijlage: %1$d locaties</string>
|
||||
<string name="ForwardedContact_zero">Bijlage: %1$d contacten</string>
|
||||
<string name="ForwardedContact_one">Bijlage: 1 contact</string>
|
||||
<string name="ForwardedContact_two">Bijlage: %1$d contacten</string>
|
||||
<string name="ForwardedContact_few">Bijlage: %1$d contacten</string>
|
||||
<string name="ForwardedContact_many">Bijlage: %1$d contacten</string>
|
||||
<string name="ForwardedContact_other">Bijlage: %1$d contacten</string>
|
||||
<string name="ForwardedSticker_zero">Bijlage: %1$d stickers</string>
|
||||
<string name="ForwardedSticker_one">Bijlage: 1 sticker</string>
|
||||
<string name="ForwardedSticker_two">Bijlage: %1$d stickers</string>
|
||||
<string name="ForwardedSticker_few">Bijlage: %1$d stickers</string>
|
||||
<string name="ForwardedSticker_many">Bijlage: %1$d stickers</string>
|
||||
<string name="ForwardedSticker_other">Bijlage: %1$d stickers</string>
|
||||
<string name="AndOther_zero">en %1$d anderen</string>
|
||||
<string name="AndOther_one">en %1$d andere</string>
|
||||
<string name="AndOther_two">en %1$d anderen</string>
|
||||
@ -744,7 +748,7 @@
|
||||
<string name="SaveThemeSum">Sla uw thema op in de Telegram/Thema\'s-map</string>
|
||||
<string name="SaveThemeToastText">Het thema is opgeslagen!</string>
|
||||
<string name="SavedTo">%1$s is opgeslagen naar %2$s</string>
|
||||
<string name="SaveErrorMsg0">Het thema is nog niet gecreëerd. Pas eerst de Telegram+ MOD toe.</string>
|
||||
<string name="SaveErrorMsg0">Het thema is nog niet gecreëerd. Pas eerst de Plus Messenger MOD toe.</string>
|
||||
<string name="restoreOkMsg">De voorkeuren zijn hersteld vanaf de SD-kaart</string>
|
||||
<string name="restoreErrorMsg">Er is geen voorkeurenbestand aangetroffen in %s</string>
|
||||
<string name="NoMediaMessage">Er is geen SD-kaart gevonden.</string>
|
||||
@ -786,4 +790,5 @@
|
||||
<string name="ForwardNoQuote">Doorsturen zonder citeren</string>
|
||||
<string name="DisableMessageClick">Pop-up bij klikken uitschakelen</string>
|
||||
<string name="ProfileScreen">Groeps-/contactpersoonprofielscherm</string>
|
||||
<string name="HideBackground">Aangepaste achtergrond verbergen</string>
|
||||
</resources>
|
@ -58,6 +58,7 @@
|
||||
<string name="UnmuteNotifications">Restaurar Som</string>
|
||||
<string name="WillUnmuteIn">Em %1$s</string>
|
||||
<string name="MuteDisable">Desativado</string>
|
||||
<string name="Hashtags">HASHTAGS</string>
|
||||
<!--broadcasts-->
|
||||
<string name="NewBroadcastList">Nova Lista de Transmissão</string>
|
||||
<string name="EnterListName">Digite o nome da lista</string>
|
||||
@ -302,6 +303,7 @@
|
||||
<string name="VibrationDisabled">Desativar</string>
|
||||
<string name="LedDisabled">Desativado</string>
|
||||
<string name="RepeatDisabled">Desativado</string>
|
||||
<string name="InChatSound">Sons no Chat</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Senha</string>
|
||||
<string name="ChangePasscode">Alterar Senha</string>
|
||||
@ -366,6 +368,8 @@
|
||||
<string name="AreYouSureDeletePhoto">Você tem certeza que deseja apagar esta foto?</string>
|
||||
<string name="AreYouSureDeleteVideo">Você tem certeza que deseja apagar este vídeo?</string>
|
||||
<string name="DiscardChanges">Descartar mudanças?</string>
|
||||
<string name="ClearSearch">Limpar histórico de busca?</string>
|
||||
<string name="ClearButton">Limpar</string>
|
||||
<!--password view-->
|
||||
<string name="Password">Password</string>
|
||||
<string name="ChangePassword">Change password</string>
|
||||
@ -486,7 +490,7 @@
|
||||
<string name="InvalidLastName">Sobrenome inválido</string>
|
||||
<string name="Loading">Carregando...</string>
|
||||
<string name="NoPlayerInstalled">Você não possui um reprodutor de vídeo, instale um para continuar</string>
|
||||
<string name="NoMailInstalled">Por favor, envie um email para sms@telegram.org e conte-nos sobre seu problema.</string>
|
||||
<string name="NoMailInstalled">Por favor, envie um email para sms@stel.com e conte-nos sobre seu problema.</string>
|
||||
<string name="NoHandleAppInstalled">Você não possui um aplicativo que suporte o tipo de arquivo \'%1$s\', por favor instale um para continuar</string>
|
||||
<string name="InviteUser">Este usuário ainda não possui Telegram, deseja enviar um convite?</string>
|
||||
<string name="AreYouSure">Você tem certeza?</string>
|
||||
@ -780,8 +784,11 @@
|
||||
<string name="HeaderIconsColor">Cor dos Ícones do Cabeçalho</string>
|
||||
<string name="DividerColor">Cor das Linhas Divisórias</string>
|
||||
<string name="AvatarRadius">Diâmetro do Avatar</string>
|
||||
<string name="SetMemberColor">Definir a Cor dos Membros</string>
|
||||
<string name="SetMemberColor">Definir Cor do Membro</string>
|
||||
<string name="ForwardNameColor">Cor do Nome em Encaminhamentos</string>
|
||||
<string name="HeaderTitle">Título do Cabeçalho</string>
|
||||
<string name="ForwardNoQuote">Encaminhar sem mencionar</string>
|
||||
<string name="DisableMessageClick">Desativar Pop-up ao Clicar</string>
|
||||
<string name="ProfileScreen">Tela de Perfil de Contato/Grupo</string>
|
||||
<string name="HideBackground">Ocultar wallpaper personalizado</string>
|
||||
</resources>
|
@ -58,6 +58,7 @@
|
||||
<string name="UnmuteNotifications">Restaurar Som</string>
|
||||
<string name="WillUnmuteIn">Em %1$s</string>
|
||||
<string name="MuteDisable">Desativado</string>
|
||||
<string name="Hashtags">HASHTAGS</string>
|
||||
<!--broadcasts-->
|
||||
<string name="NewBroadcastList">Nova Lista de Transmissão</string>
|
||||
<string name="EnterListName">Digite o nome da lista</string>
|
||||
@ -302,6 +303,7 @@
|
||||
<string name="VibrationDisabled">Desativar</string>
|
||||
<string name="LedDisabled">Desativado</string>
|
||||
<string name="RepeatDisabled">Desativado</string>
|
||||
<string name="InChatSound">Sons no Chat</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Senha</string>
|
||||
<string name="ChangePasscode">Alterar Senha</string>
|
||||
@ -366,6 +368,8 @@
|
||||
<string name="AreYouSureDeletePhoto">Você tem certeza que deseja apagar esta foto?</string>
|
||||
<string name="AreYouSureDeleteVideo">Você tem certeza que deseja apagar este vídeo?</string>
|
||||
<string name="DiscardChanges">Descartar mudanças?</string>
|
||||
<string name="ClearSearch">Limpar histórico de busca?</string>
|
||||
<string name="ClearButton">Limpar</string>
|
||||
<!--password view-->
|
||||
<string name="Password">Password</string>
|
||||
<string name="ChangePassword">Change password</string>
|
||||
@ -486,7 +490,7 @@
|
||||
<string name="InvalidLastName">Sobrenome inválido</string>
|
||||
<string name="Loading">Carregando...</string>
|
||||
<string name="NoPlayerInstalled">Você não possui um reprodutor de vídeo, instale um para continuar</string>
|
||||
<string name="NoMailInstalled">Por favor, envie um email para sms@telegram.org e conte-nos sobre seu problema.</string>
|
||||
<string name="NoMailInstalled">Por favor, envie um email para sms@stel.com e conte-nos sobre seu problema.</string>
|
||||
<string name="NoHandleAppInstalled">Você não possui um aplicativo que suporte o tipo de arquivo \'%1$s\', por favor instale um para continuar</string>
|
||||
<string name="InviteUser">Este usuário ainda não possui Telegram, deseja enviar um convite?</string>
|
||||
<string name="AreYouSure">Você tem certeza?</string>
|
||||
@ -682,24 +686,35 @@
|
||||
<string name="formatterDay12H">h:mm a</string>
|
||||
<string name="formatDateAtTime">%1$s às %2$s</string>
|
||||
<!--Telegram+ Portuguese(Portugal)-->
|
||||
<string name="TelegramForAndroid">Plus Messenger para Android</string>
|
||||
<string name="Theming">Personalização</string>
|
||||
<string name="colorHexInvalid">Código hexadecimal da cor é inválido!</string>
|
||||
<!--Smart Notifications-->
|
||||
<string name="SmartNotification">Notificação Inteligente</string>
|
||||
<string name="TimeUnitSeconds">segundo(s)</string>
|
||||
<string name="TimeUnitMinutes">minuto(s)</string>
|
||||
<string name="TimeUnitHours">hora(s)</string>
|
||||
<string name="TimeUnitDays">dia(s)</string>
|
||||
<string name="settings_smart_notify_begin">Pelo menos som</string>
|
||||
<string name="settings_smart_notify_mid1">vezes</string>
|
||||
<string name="settings_smart_notify_mid11">vez</string>
|
||||
<string name="settings_smart_notify_mid2">dentro de</string>
|
||||
<!---->
|
||||
<string name="TelegramForAndroid">Plus Messenger para Android</string>
|
||||
<string name="Theming">Temas</string>
|
||||
<string name="colorHexInvalid">O código hexadecimal da cor é inválido!</string>
|
||||
<string name="themeColor">Cor do Tema</string>
|
||||
<string name="ResetThemeSettings">Redefinir Tema</string>
|
||||
<string name="ResetThemeSettingsSum">Reverter todas as personalizações</string>
|
||||
<string name="ResetThemeToastText">O tema foi redefinido para o tema padrão!</string>
|
||||
<string name="ResetThemeSettings">Repor Definições do Tema</string>
|
||||
<string name="ResetThemeSettingsSum">Anular todas as definições do tema</string>
|
||||
<string name="ResetThemeToastText">Repor as definições do tema para a predefinição!</string>
|
||||
<string name="General">Geral</string>
|
||||
<string name="Screens">Ecrãs</string>
|
||||
<string name="MainScreen">Ecrã Principal</string>
|
||||
<string name="ChatScreen">Ecrã de chat</string>
|
||||
<string name="ContactsScreen">Ecrã de Contactos</string>
|
||||
<string name="ChatScreen">Ecrã de Conversação</string>
|
||||
<string name="ContactsScreen">Ecrã dos Contactos</string>
|
||||
<string name="Header">Cabeçalho</string>
|
||||
<string name="Rows">Linhas</string>
|
||||
<string name="Rows">Filas</string>
|
||||
<string name="ChatList">Lista de Conversas</string>
|
||||
<string name="ChatsList">Lista de Conversas</string>
|
||||
<string name="ContactsList">Lista de Contactos</string>
|
||||
<string name="HeaderColor">Cor de Cabeçalho</string>
|
||||
<string name="HeaderColor">Cor do Cabeçalho</string>
|
||||
<string name="NameColor">Cor do Nome do Contato</string>
|
||||
<string name="NameSize">Tamanho do Nome do Contato</string>
|
||||
<string name="MessageColor">Cor das Mensagens</string>
|
||||
@ -717,38 +732,62 @@
|
||||
<string name="DateColor">Cor da Data</string>
|
||||
<string name="DateSize">Tamanho da Data</string>
|
||||
<string name="DateBubbleColor">Cor da Bolha da Data</string>
|
||||
<string name="RTextColor">Cor do Texto</string>
|
||||
<string name="RTextColor">Cor do texto à direita</string>
|
||||
<string name="LTextColor">Cor do Texto da Esquerdaa</string>
|
||||
<string name="RTimeColor">Cor do Texto da Direita</string>
|
||||
<string name="LTimeColor">Cor da Hora da Esquerda</string>
|
||||
<string name="TimeSize">Tamanho da Hora</string>
|
||||
<string name="EditTextColor">Cor do Texto Introduzido</string>
|
||||
<string name="EditTextSize">Tamanho do Texto Introduzido</string>
|
||||
<string name="EditTextBGColor">Cor de Fundo do Texto Introduzido</string>
|
||||
<string name="EmojiViewBGColor">Cor de Fundo dos Emoji</string>
|
||||
<string name="EditTextBGColor">Cor de Fundo do Texto de Entrada</string>
|
||||
<string name="EmojiViewBGColor">Cor de Fundo do Emoji</string>
|
||||
<string name="EmojiViewTabColor">Cor da Tab dos Emoji</string>
|
||||
<string name="OnlineColor">Cor do Status Online</string>
|
||||
<string name="ChatMusic">Música</string>
|
||||
<string name="SaveTheme">Guardar Tema</string>
|
||||
<string name="SaveThemeSum">Guarda o teu tema na pasta Telegram/Themes</string>
|
||||
<string name="SaveThemeToastText">Tema Guardado!!</string>
|
||||
<string name="SaveThemeToastText">Tema guardado!</string>
|
||||
<string name="SavedTo">%1$s guardado em %2$s</string>
|
||||
<string name="SaveErrorMsg0">Tema ainda não criado. Por favor aplica algum MOD do Telegram+ primeiro.</string>
|
||||
<string name="SaveErrorMsg0">O tema ainda não foi criado. Por favor, primeiro aplique algum MOD</string>
|
||||
<string name="restoreOkMsg">Preferências restauradas do cartão SD</string>
|
||||
<string name="restoreErrorMsg">Nenhum ficheiro de preferências encontrado em %s</string>
|
||||
<string name="NoMediaMessage">Não foi encontrado nenhum cartão SD.</string>
|
||||
<string name="EnterName">Introduzo Nome</string>
|
||||
<string name="Themes">Temas</string>
|
||||
<string name="ApplyTheme">Aplicar Tema</string>
|
||||
<string name="ApplyThemeSum">Aplicar tema .xml de um ficheiro local</string>
|
||||
<string name="MemberColor">Cor de Participantes</string>
|
||||
<string name="ApplyThemeSum">Aplicar tema .xml a partir de um ficheiro local</string>
|
||||
<string name="MemberColor">Cor do Membro</string>
|
||||
<string name="ChecksColor">Cor de Ticks</string>
|
||||
<string name="MuteColor">Cor de Silênciar</string>
|
||||
<string name="SendLogs">Enviar Registos</string>
|
||||
<string name="SendLogsEmpty">Não existem registos</string>
|
||||
<string name="SendIcon">Enviar Ícon</string>
|
||||
<string name="HideMobile">Esconder Número de Telemóvel</string>
|
||||
<string name="HideMobile">Ocultar do menu o número de telemóvel</string>
|
||||
<string name="FloatingPencilColor">Cor do Lápis Flutuante</string>
|
||||
<string name="FloatingBGColor">Cor de Fundo do Botão Flutuante</string>
|
||||
<string name="Community">Comunidade G+</string>
|
||||
<string name="TypingColor">Cor da Digitação</string>
|
||||
<string name="EditTextIconsColor">Cor dos ícones do texto de entrada</string>
|
||||
<string name="NavigationDrawer">Menu de Navegação</string>
|
||||
<string name="OptionsList">Lista de Opções</string>
|
||||
<string name="ListColor">Cor da Lista</string>
|
||||
<string name="OwnNameSize">Tamanho do Nome</string>
|
||||
<string name="PhoneColor">Cor do Dispositivo</string>
|
||||
<string name="PhoneSize">Tamanho do Dispositivo</string>
|
||||
<string name="AvatarColor">Cor do Avatar</string>
|
||||
<string name="IconColor">Opção da cor do ícone</string>
|
||||
<string name="OptionColor">Cor da opção</string>
|
||||
<string name="OptionSize">Tamanho da opção</string>
|
||||
<string name="VersionColor">Cor da versão</string>
|
||||
<string name="VersionSize">Tamanho da versão</string>
|
||||
<string name="HeaderTitleColor">Cor do título do cabeçalho</string>
|
||||
<string name="HeaderIconsColor">Cor dos ícones do cabeçalho</string>
|
||||
<string name="DividerColor">Cor do separador</string>
|
||||
<string name="AvatarRadius">Raio do Avatar</string>
|
||||
<string name="SetMemberColor">Defina a cor do membro</string>
|
||||
<string name="ForwardNameColor">Cor do nome de encaminhar</string>
|
||||
<string name="HeaderTitle">Título do cabeçalho</string>
|
||||
<string name="ForwardNoQuote">Encaminhar sem citação</string>
|
||||
<string name="DisableMessageClick">Desativar a janela ao clicar</string>
|
||||
<string name="ProfileScreen">Ecrã de Perfil do Grupo/Contacto</string>
|
||||
</resources>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<resources>
|
||||
<string name="AppName">Plus</string>
|
||||
<string name="AppName">Plus Messenger</string>
|
||||
<string name="ShortAppName">Plus</string>
|
||||
<string name="LanguageName">English</string>
|
||||
<string name="LanguageNameInEnglish">English</string>
|
||||
<string name="LanguageCode">en</string>
|
||||
@ -56,6 +56,7 @@
|
||||
<string name="UnmuteNotifications">Unmute</string>
|
||||
<string name="WillUnmuteIn">In %1$s</string>
|
||||
<string name="MuteDisable">Disable</string>
|
||||
<string name="Hashtags">HASHTAGS</string>
|
||||
<!--broadcasts-->
|
||||
<string name="NewBroadcastList">New Broadcast List</string>
|
||||
<string name="EnterListName">Enter list name</string>
|
||||
@ -300,6 +301,7 @@
|
||||
<string name="VibrationDisabled">Disabled</string>
|
||||
<string name="LedDisabled">Disabled</string>
|
||||
<string name="RepeatDisabled">Off</string>
|
||||
<string name="InChatSound">In-Chat Sounds</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Passcode</string>
|
||||
<string name="ChangePasscode">Change Passcode</string>
|
||||
@ -364,6 +366,8 @@
|
||||
<string name="AreYouSureDeletePhoto">Are you sure you want to delete this photo?</string>
|
||||
<string name="AreYouSureDeleteVideo">Are you sure you want to delete this video?</string>
|
||||
<string name="DiscardChanges">Discard changes?</string>
|
||||
<string name="ClearSearch">Clear search history?</string>
|
||||
<string name="ClearButton">Clear</string>
|
||||
<!--password view-->
|
||||
<string name="Password">Password</string>
|
||||
<string name="ChangePassword">Change password</string>
|
||||
@ -484,7 +488,7 @@
|
||||
<string name="InvalidLastName">Invalid last name</string>
|
||||
<string name="Loading">Loading...</string>
|
||||
<string name="NoPlayerInstalled">You don\'t have a video player, please install one to continue</string>
|
||||
<string name="NoMailInstalled">Please send an email to sms@telegram.org and tell us about your problem.</string>
|
||||
<string name="NoMailInstalled">Please send an email to sms@stel.com and tell us about your problem.</string>
|
||||
<string name="NoHandleAppInstalled">You don\'t have applications that can handle the file type \'%1$s\', please install one to continue</string>
|
||||
<string name="InviteUser">This user does not have Telegram yet, send an invitation?</string>
|
||||
<string name="AreYouSure">Are you sure?</string>
|
||||
@ -742,7 +746,7 @@
|
||||
<string name="SaveThemeSum">Save your theme to Telegram/Themes folder</string>
|
||||
<string name="SaveThemeToastText">Theme saved!</string>
|
||||
<string name="SavedTo">%1$s saved to %2$s</string>
|
||||
<string name="SaveErrorMsg0">Theme not created yet. Apply any Telegram+ MOD first, please</string>
|
||||
<string name="SaveErrorMsg0">Theme not created yet. Apply any MOD first, please</string>
|
||||
<string name="restoreOkMsg">Preferences restored from sdcard</string>
|
||||
<string name="restoreErrorMsg">No preferences file found in %s</string>
|
||||
<string name="NoMediaMessage">No SD card found.</string>
|
||||
@ -784,4 +788,5 @@
|
||||
<string name="ForwardNoQuote">Forward without quoting</string>
|
||||
<string name="DisableMessageClick">Disable pop-up on click</string>
|
||||
<string name="ProfileScreen">Group/Contact Profile screen</string>
|
||||
<string name="HideBackground">Hide custom background</string>
|
||||
</resources>
|