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)
|
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
|
**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
|
### USAGE
|
||||||
**Beware of using the dev branch and uploading it to any markets, in many cases it not will work as expected**.
|
**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
|
### 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 {
|
android {
|
||||||
compileSdkVersion 22
|
compileSdkVersion 22
|
||||||
buildToolsVersion '22.0.0'
|
buildToolsVersion '22.0.1'
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
@ -47,6 +47,7 @@ android {
|
|||||||
debuggable true
|
debuggable true
|
||||||
jniDebuggable true
|
jniDebuggable true
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
|
applicationIdSuffix ".beta"
|
||||||
}
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
@ -88,7 +89,7 @@ android {
|
|||||||
applicationId "org.telegram.plus"
|
applicationId "org.telegram.plus"
|
||||||
minSdkVersion 8
|
minSdkVersion 8
|
||||||
targetSdkVersion 22
|
targetSdkVersion 22
|
||||||
versionCode 469
|
versionCode 475
|
||||||
versionName "2.6.0.2"
|
versionName "2.6.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="org.telegram.messenger"
|
package="org.telegram.messenger"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|
||||||
@ -9,25 +10,30 @@
|
|||||||
<uses-feature android:name="android.hardware.LOCATION" android:required="false" />
|
<uses-feature android:name="android.hardware.LOCATION" android:required="false" />
|
||||||
|
|
||||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
<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.beta.permission.MAPS_RECEIVE"/>
|
||||||
<uses-permission android:name="org.telegram.plus.permission.C2D_MESSAGE" />
|
<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="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_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.beta.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.C2D_MESSAGE" android:protectionLevel="signature" />
|
||||||
|
<!--
|
||||||
|
<permission android:name="org.telegram.plus.beta.android.provider.ACCESS" android:protectionLevel="signature"/>-->
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/AppName"
|
android:label="Plus beta"
|
||||||
|
tools:replace="label"
|
||||||
android:theme="@style/Theme.TMessages.Start"
|
android:theme="@style/Theme.TMessages.Start"
|
||||||
android:name=".ApplicationLoader"
|
android:name=".ApplicationLoader"
|
||||||
android:hardwareAccelerated="@bool/useHardwareAcceleration"
|
android:hardwareAccelerated="@bool/useHardwareAcceleration"
|
||||||
android:largeHeap="true">
|
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" />
|
<activity android:name="net.hockeyapp.android.UpdateActivity" />
|
||||||
|
|
||||||
@ -37,7 +43,7 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
||||||
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
|
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
|
||||||
<category android:name="org.telegram.plus" />
|
<category android:name="org.telegram.plus.beta" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
|
<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_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_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.MAPS_RECEIVE" android:protectionLevel="signature"/>
|
||||||
<permission android:name="org.telegram.plus.permission.C2D_MESSAGE" android:protectionLevel="signature" />
|
<permission android:name="org.telegram.plus.permission.C2D_MESSAGE" android:protectionLevel="signature" />
|
||||||
@ -21,7 +23,7 @@
|
|||||||
<application
|
<application
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/AppName"
|
android:label="@string/ShortAppName"
|
||||||
android:theme="@style/Theme.TMessages.Start"
|
android:theme="@style/Theme.TMessages.Start"
|
||||||
android:name=".ApplicationLoader"
|
android:name=".ApplicationLoader"
|
||||||
android:hardwareAccelerated="@bool/useHardwareAcceleration"
|
android:hardwareAccelerated="@bool/useHardwareAcceleration"
|
||||||
|
@ -39,13 +39,15 @@
|
|||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
|
<!--
|
||||||
|
<uses-permission android:name="org.telegram.plus.android.provider.ACCESS" />-->
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".ApplicationLoader"
|
android:name=".ApplicationLoader"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:hardwareAccelerated="@bool/useHardwareAcceleration"
|
android:hardwareAccelerated="@bool/useHardwareAcceleration"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/AppName"
|
android:label="@string/ShortAppName"
|
||||||
android:largeHeap="true"
|
android:largeHeap="true"
|
||||||
android:theme="@style/Theme.TMessages.Start">
|
android:theme="@style/Theme.TMessages.Start">
|
||||||
|
|
||||||
|
@ -78,9 +78,11 @@ public class AndroidUtilities {
|
|||||||
public static Point displaySize = new Point();
|
public static Point displaySize = new Point();
|
||||||
public static Integer photoSize = null;
|
public static Integer photoSize = null;
|
||||||
public static DisplayMetrics displayMetrics = new DisplayMetrics();
|
public static DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||||
|
public static int leftBaseline;
|
||||||
private static Boolean isTablet = null;
|
private static Boolean isTablet = null;
|
||||||
|
|
||||||
public static final String THEME_PREFS = "theme";
|
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 final int defColor = 0xff009688;//0xff58BCD5;//0xff43C3DB;//0xff2f8cc9;58BCD5//0xff55abd2
|
||||||
public static int themeColor = getIntColor("themeColor");
|
public static int themeColor = getIntColor("themeColor");
|
||||||
@ -89,6 +91,7 @@ public class AndroidUtilities {
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
density = ApplicationLoader.applicationContext.getResources().getDisplayMetrics().density;
|
density = ApplicationLoader.applicationContext.getResources().getDisplayMetrics().density;
|
||||||
|
leftBaseline = isTablet() ? 80 : 72;
|
||||||
checkDisplaySize();
|
checkDisplaySize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -602,17 +605,17 @@ public class AndroidUtilities {
|
|||||||
}*/
|
}*/
|
||||||
//PLUS
|
//PLUS
|
||||||
public static int getIntColor(String key){
|
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);
|
return themePrefs.getInt(key, defColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getIntDef(String key, int def){
|
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);
|
return themePrefs.getInt(key, def);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getIntAlphaColor(String key, int def, float factor){
|
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 color = themePrefs.getInt(key, def);
|
||||||
int alpha = Math.round(Color.alpha(color) * factor);
|
int alpha = Math.round(Color.alpha(color) * factor);
|
||||||
int red = Color.red(color);
|
int red = Color.red(color);
|
||||||
@ -622,7 +625,7 @@ public class AndroidUtilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int getIntDarkerColor(String key, int factor){
|
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);
|
int color = themePrefs.getInt(key, defColor);
|
||||||
return setDarkColor(color, factor);
|
return setDarkColor(color, factor);
|
||||||
}
|
}
|
||||||
@ -655,7 +658,7 @@ public class AndroidUtilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setIntColor(String key, int value){
|
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();
|
SharedPreferences.Editor e = themePrefs.edit();
|
||||||
e.putInt(key, value);
|
e.putInt(key, value);
|
||||||
e.commit();
|
e.commit();
|
||||||
|
@ -108,7 +108,7 @@ public class MessageObject {
|
|||||||
fromUser = MessagesController.getInstance().getUser(message.from_id);
|
fromUser = MessagesController.getInstance().getUser(message.from_id);
|
||||||
}
|
}
|
||||||
if (message.action instanceof TLRPC.TL_messageActionChatCreate) {
|
if (message.action instanceof TLRPC.TL_messageActionChatCreate) {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = LocaleController.getString("ActionYouCreateGroup", R.string.ActionYouCreateGroup);
|
messageText = LocaleController.getString("ActionYouCreateGroup", R.string.ActionYouCreateGroup);
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -119,7 +119,7 @@ public class MessageObject {
|
|||||||
}
|
}
|
||||||
} else if (message.action instanceof TLRPC.TL_messageActionChatDeleteUser) {
|
} else if (message.action instanceof TLRPC.TL_messageActionChatDeleteUser) {
|
||||||
if (message.action.user_id == message.from_id) {
|
if (message.action.user_id == message.from_id) {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = LocaleController.getString("ActionYouLeftUser", R.string.ActionYouLeftUser);
|
messageText = LocaleController.getString("ActionYouLeftUser", R.string.ActionYouLeftUser);
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -137,7 +137,7 @@ public class MessageObject {
|
|||||||
whoUser = MessagesController.getInstance().getUser(message.action.user_id);
|
whoUser = MessagesController.getInstance().getUser(message.action.user_id);
|
||||||
}
|
}
|
||||||
if (whoUser != null && fromUser != null) {
|
if (whoUser != null && fromUser != null) {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = replaceWithLink(LocaleController.getString("ActionYouKickUser", R.string.ActionYouKickUser), "un2", whoUser);
|
messageText = replaceWithLink(LocaleController.getString("ActionYouKickUser", R.string.ActionYouKickUser), "un2", whoUser);
|
||||||
} else if (message.action.user_id == UserConfig.getClientUserId()) {
|
} else if (message.action.user_id == UserConfig.getClientUserId()) {
|
||||||
messageText = replaceWithLink(LocaleController.getString("ActionKickUserYou", R.string.ActionKickUserYou), "un1", fromUser);
|
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);
|
whoUser = MessagesController.getInstance().getUser(message.action.user_id);
|
||||||
}
|
}
|
||||||
if (whoUser != null && fromUser != null) {
|
if (whoUser != null && fromUser != null) {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = replaceWithLink(LocaleController.getString("ActionYouAddUser", R.string.ActionYouAddUser), "un2", whoUser);
|
messageText = replaceWithLink(LocaleController.getString("ActionYouAddUser", R.string.ActionYouAddUser), "un2", whoUser);
|
||||||
} else if (message.action.user_id == UserConfig.getClientUserId()) {
|
} else if (message.action.user_id == UserConfig.getClientUserId()) {
|
||||||
messageText = replaceWithLink(LocaleController.getString("ActionAddUserYou", R.string.ActionAddUserYou), "un1", fromUser);
|
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", "");
|
messageText = LocaleController.getString("ActionAddUser", R.string.ActionAddUser).replace("un2", "").replace("un1", "");
|
||||||
}
|
}
|
||||||
} else if (message.action instanceof TLRPC.TL_messageActionChatEditPhoto) {
|
} else if (message.action instanceof TLRPC.TL_messageActionChatEditPhoto) {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = LocaleController.getString("ActionYouChangedPhoto", R.string.ActionYouChangedPhoto);
|
messageText = LocaleController.getString("ActionYouChangedPhoto", R.string.ActionYouChangedPhoto);
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -180,7 +180,7 @@ public class MessageObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (message.action instanceof TLRPC.TL_messageActionChatEditTitle) {
|
} else if (message.action instanceof TLRPC.TL_messageActionChatEditTitle) {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = LocaleController.getString("ActionYouChangedTitle", R.string.ActionYouChangedTitle).replace("un2", message.action.title);
|
messageText = LocaleController.getString("ActionYouChangedTitle", R.string.ActionYouChangedTitle).replace("un2", message.action.title);
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -190,7 +190,7 @@ public class MessageObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (message.action instanceof TLRPC.TL_messageActionChatDeletePhoto) {
|
} else if (message.action instanceof TLRPC.TL_messageActionChatDeletePhoto) {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = LocaleController.getString("ActionYouRemovedPhoto", R.string.ActionYouRemovedPhoto);
|
messageText = LocaleController.getString("ActionYouRemovedPhoto", R.string.ActionYouRemovedPhoto);
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -201,7 +201,7 @@ public class MessageObject {
|
|||||||
}
|
}
|
||||||
} else if (message.action instanceof TLRPC.TL_messageActionTTLChange) {
|
} else if (message.action instanceof TLRPC.TL_messageActionTTLChange) {
|
||||||
if (message.action.ttl != 0) {
|
if (message.action.ttl != 0) {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = LocaleController.formatString("MessageLifetimeChangedOutgoing", R.string.MessageLifetimeChangedOutgoing, AndroidUtilities.formatTTLString(message.action.ttl));
|
messageText = LocaleController.formatString("MessageLifetimeChangedOutgoing", R.string.MessageLifetimeChangedOutgoing, AndroidUtilities.formatTTLString(message.action.ttl));
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -211,7 +211,7 @@ public class MessageObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = LocaleController.getString("MessageLifetimeYouRemoved", R.string.MessageLifetimeYouRemoved);
|
messageText = LocaleController.getString("MessageLifetimeYouRemoved", R.string.MessageLifetimeYouRemoved);
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -251,7 +251,7 @@ public class MessageObject {
|
|||||||
}
|
}
|
||||||
} else if (message.action instanceof TLRPC.TL_messageEncryptedAction) {
|
} else if (message.action instanceof TLRPC.TL_messageEncryptedAction) {
|
||||||
if (message.action.encryptedAction instanceof TLRPC.TL_decryptedMessageActionScreenshotMessages) {
|
if (message.action.encryptedAction instanceof TLRPC.TL_decryptedMessageActionScreenshotMessages) {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = LocaleController.formatString("ActionTakeScreenshootYou", R.string.ActionTakeScreenshootYou);
|
messageText = LocaleController.formatString("ActionTakeScreenshootYou", R.string.ActionTakeScreenshootYou);
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -263,7 +263,7 @@ public class MessageObject {
|
|||||||
} else if (message.action.encryptedAction instanceof TLRPC.TL_decryptedMessageActionSetMessageTTL) {
|
} else if (message.action.encryptedAction instanceof TLRPC.TL_decryptedMessageActionSetMessageTTL) {
|
||||||
TLRPC.TL_decryptedMessageActionSetMessageTTL action = (TLRPC.TL_decryptedMessageActionSetMessageTTL) message.action.encryptedAction;
|
TLRPC.TL_decryptedMessageActionSetMessageTTL action = (TLRPC.TL_decryptedMessageActionSetMessageTTL) message.action.encryptedAction;
|
||||||
if (action.ttl_seconds != 0) {
|
if (action.ttl_seconds != 0) {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = LocaleController.formatString("MessageLifetimeChangedOutgoing", R.string.MessageLifetimeChangedOutgoing, AndroidUtilities.formatTTLString(action.ttl_seconds));
|
messageText = LocaleController.formatString("MessageLifetimeChangedOutgoing", R.string.MessageLifetimeChangedOutgoing, AndroidUtilities.formatTTLString(action.ttl_seconds));
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -273,7 +273,7 @@ public class MessageObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isFromMe()) {
|
if (isOut()) {
|
||||||
messageText = LocaleController.getString("MessageLifetimeYouRemoved", R.string.MessageLifetimeYouRemoved);
|
messageText = LocaleController.getString("MessageLifetimeYouRemoved", R.string.MessageLifetimeYouRemoved);
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -568,7 +568,7 @@ public class MessageObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
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);
|
Matcher matcher = pattern.matcher(messageText);
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
int start = matcher.start();
|
int start = matcher.start();
|
||||||
@ -586,13 +586,13 @@ public class MessageObject {
|
|||||||
|
|
||||||
int maxWidth;
|
int maxWidth;
|
||||||
if (AndroidUtilities.isTablet()) {
|
if (AndroidUtilities.isTablet()) {
|
||||||
if (messageOwner.to_id.chat_id != 0) {
|
if (messageOwner.to_id.chat_id != 0 && !isOut()) {
|
||||||
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
|
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
|
||||||
} else {
|
} else {
|
||||||
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(80);
|
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(80);
|
||||||
}
|
}
|
||||||
} else {
|
} 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);
|
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
|
||||||
} else {
|
} else {
|
||||||
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(80);
|
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;
|
return (messageOwner.flags & TLRPC.MESSAGE_FLAG_OUT) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFromMe() {
|
|
||||||
return messageOwner.from_id == UserConfig.getClientUserId();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isUnread() {
|
public boolean isUnread() {
|
||||||
return (messageOwner.flags & TLRPC.MESSAGE_FLAG_UNREAD) != 0;
|
return (messageOwner.flags & TLRPC.MESSAGE_FLAG_UNREAD) != 0;
|
||||||
}
|
}
|
||||||
@ -791,7 +787,7 @@ public class MessageObject {
|
|||||||
} else {
|
} else {
|
||||||
if (messageOwner.to_id.chat_id != 0) {
|
if (messageOwner.to_id.chat_id != 0) {
|
||||||
return -messageOwner.to_id.chat_id;
|
return -messageOwner.to_id.chat_id;
|
||||||
} else if (isFromMe()) {
|
} else if (isOut()) {
|
||||||
return messageOwner.to_id.user_id;
|
return messageOwner.to_id.user_id;
|
||||||
} else {
|
} else {
|
||||||
return messageOwner.from_id;
|
return messageOwner.from_id;
|
||||||
|
@ -1293,7 +1293,11 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
|||||||
if (label.length() != 0) {
|
if (label.length() != 0) {
|
||||||
label += ", ";
|
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++;
|
count++;
|
||||||
}
|
}
|
||||||
if (count == 2) {
|
if (count == 2) {
|
||||||
@ -2597,7 +2601,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
|||||||
|
|
||||||
public void getDifference() {
|
public void getDifference() {
|
||||||
registerForPush(UserConfig.pushString);
|
registerForPush(UserConfig.pushString);
|
||||||
if (MessagesStorage.lastDateValue == 0) {
|
if (MessagesStorage.lastPtsValue == 0) {
|
||||||
loadCurrentState();
|
loadCurrentState();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2713,7 +2717,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!obj.isFromMe() && obj.isUnread()) {
|
if (!obj.isOut() && obj.isUnread()) {
|
||||||
pushMessages.add(obj);
|
pushMessages.add(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2946,7 +2950,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
|||||||
AndroidUtilities.runOnUIThread(new Runnable() {
|
AndroidUtilities.runOnUIThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!obj.isFromMe() && obj.isUnread()) {
|
if (!obj.isOut()) {
|
||||||
NotificationsController.getInstance().processNewMessages(objArr, true);
|
NotificationsController.getInstance().processNewMessages(objArr, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3192,7 +3196,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
|||||||
messages.put(uid, arr);
|
messages.put(uid, arr);
|
||||||
}
|
}
|
||||||
arr.add(obj);
|
arr.add(obj);
|
||||||
if (!obj.isFromMe() && obj.isUnread()) {
|
if (!obj.isOut() && obj.isUnread()) {
|
||||||
pushMessages.add(obj);
|
pushMessages.add(obj);
|
||||||
}
|
}
|
||||||
} else if (update instanceof TLRPC.TL_updateReadMessages) {
|
} 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 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 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 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_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();
|
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();
|
database.executeFast("CREATE TABLE keyvalue(id TEXT PRIMARY KEY, value TEXT)").stepThis().dispose();
|
||||||
|
|
||||||
//version
|
//version
|
||||||
database.executeFast("PRAGMA user_version = 14").stepThis().dispose();
|
database.executeFast("PRAGMA user_version = 15").stepThis().dispose();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
SQLiteCursor cursor = database.queryFinalized("SELECT seq, pts, date, qts, lsv, sg, pbytes FROM params WHERE id = 1");
|
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");
|
int version = database.executeInt("PRAGMA user_version");
|
||||||
if (version < 14) {
|
if (version < 15) {
|
||||||
updateDbToLastVersion(version);
|
updateDbToLastVersion(version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -373,6 +374,11 @@ public class MessagesStorage {
|
|||||||
database.executeFast("PRAGMA user_version = 14").stepThis().dispose();
|
database.executeFast("PRAGMA user_version = 14").stepThis().dispose();
|
||||||
version = 14;
|
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) {
|
} catch (Exception e) {
|
||||||
FileLog.e("tmessages", e);
|
FileLog.e("tmessages", e);
|
||||||
}
|
}
|
||||||
@ -627,7 +633,7 @@ public class MessagesStorage {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
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<>();
|
final ArrayList<MediaController.SearchImage> arrayList = new ArrayList<>();
|
||||||
while (cursor.next()) {
|
while (cursor.next()) {
|
||||||
MediaController.SearchImage searchImage = new MediaController.SearchImage();
|
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) {
|
public void putWebRecent(final ArrayList<MediaController.SearchImage> arrayList) {
|
||||||
storageQueue.postRunnable(new Runnable() {
|
storageQueue.postRunnable(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -19,6 +19,8 @@ import android.content.pm.PackageManager;
|
|||||||
import android.content.pm.ResolveInfo;
|
import android.content.pm.ResolveInfo;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
|
import android.media.MediaPlayer;
|
||||||
|
import android.media.SoundPool;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
@ -66,6 +68,13 @@ public class NotificationsController {
|
|||||||
private int personal_count = 0;
|
private int personal_count = 0;
|
||||||
private boolean notifyCheck = false;
|
private boolean notifyCheck = false;
|
||||||
private int lastOnlineFromOtherDevice = 0;
|
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;
|
private static volatile NotificationsController Instance = null;
|
||||||
public static NotificationsController getInstance() {
|
public static NotificationsController getInstance() {
|
||||||
@ -83,6 +92,16 @@ public class NotificationsController {
|
|||||||
|
|
||||||
public NotificationsController() {
|
public NotificationsController() {
|
||||||
notificationManager = NotificationManagerCompat.from(ApplicationLoader.applicationContext);
|
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() {
|
public void cleanup() {
|
||||||
@ -101,6 +120,10 @@ public class NotificationsController {
|
|||||||
editor.commit();
|
editor.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setInChatSoundEnabled(boolean value) {
|
||||||
|
inChatSoundEnabled = value;
|
||||||
|
}
|
||||||
|
|
||||||
public void setOpennedDialogId(long dialog_id) {
|
public void setOpennedDialogId(long dialog_id) {
|
||||||
openned_dialog_id = 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) {
|
public void processNewMessages(ArrayList<MessageObject> messageObjects, boolean isLast) {
|
||||||
if (messageObjects.isEmpty()) {
|
if (messageObjects.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
@ -843,6 +923,7 @@ public class NotificationsController {
|
|||||||
long dialog_id = messageObject.getDialogId();
|
long dialog_id = messageObject.getDialogId();
|
||||||
long original_dialog_id = dialog_id;
|
long original_dialog_id = dialog_id;
|
||||||
if (dialog_id == openned_dialog_id && ApplicationLoader.isScreenOn) {
|
if (dialog_id == openned_dialog_id && ApplicationLoader.isScreenOn) {
|
||||||
|
playInChatSound();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((messageObject.messageOwner.flags & TLRPC.MESSAGE_FLAG_MENTION) != 0) {
|
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
|
@Override
|
||||||
public void quickAck() {
|
public void quickAck() {
|
||||||
final int msg_id = newMsgObj.id;
|
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) {
|
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) {
|
if (bmOptions.outWidth != 0 && bmOptions.outHeight != 0 && bmOptions.outWidth <= 800 && bmOptions.outHeight <= 800) {
|
||||||
TLRPC.TL_documentAttributeSticker attributeSticker = new TLRPC.TL_documentAttributeSticker();
|
TLRPC.TL_documentAttributeSticker attributeSticker = new TLRPC.TL_documentAttributeSticker();
|
||||||
|
attributeSticker.alt = "";
|
||||||
document.attributes.add(attributeSticker);
|
document.attributes.add(attributeSticker);
|
||||||
TLRPC.TL_documentAttributeImageSize attributeImageSize = new TLRPC.TL_documentAttributeImageSize();
|
TLRPC.TL_documentAttributeImageSize attributeImageSize = new TLRPC.TL_documentAttributeImageSize();
|
||||||
attributeImageSize.w = bmOptions.outWidth;
|
attributeImageSize.w = bmOptions.outWidth;
|
||||||
|
@ -237,7 +237,10 @@ public class MP4Builder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public long getTimescale(Mp4Movie mp4Movie) {
|
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()) {
|
for (Track track : mp4Movie.getTracks()) {
|
||||||
timescale = gcd(track.getTimeScale(), timescale);
|
timescale = gcd(track.getTimeScale(), timescale);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,8 @@ public class FileLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public FileLog() {
|
public FileLog() {
|
||||||
if (!BuildVars.DEBUG_VERSION) {
|
//if (!BuildVars.DEBUG_VERSION) {
|
||||||
|
if (!BuildConfig.DEBUG) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dateFormat = FastDateFormat.getInstance("dd_MM_yyyy_HH_mm_ss", Locale.US);
|
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) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
Log.e(tag, message, exception);
|
Log.e(tag, message, exception);
|
||||||
@ -95,7 +97,8 @@ public class FileLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void e(final String tag, final String message) {
|
public static void e(final String tag, final String message) {
|
||||||
if (!BuildVars.DEBUG_VERSION) {
|
//if (!BuildVars.DEBUG_VERSION) {
|
||||||
|
if (!BuildConfig.DEBUG) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.e(tag, message);
|
Log.e(tag, message);
|
||||||
@ -115,7 +118,8 @@ public class FileLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void e(final String tag, final Throwable e) {
|
public static void e(final String tag, final Throwable e) {
|
||||||
if (!BuildVars.DEBUG_VERSION) {
|
//if (!BuildVars.DEBUG_VERSION) {
|
||||||
|
if (!BuildConfig.DEBUG) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -141,7 +145,8 @@ public class FileLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void d(final String tag, final String message) {
|
public static void d(final String tag, final String message) {
|
||||||
if (!BuildVars.DEBUG_VERSION) {
|
//if (!BuildVars.DEBUG_VERSION) {
|
||||||
|
if (!BuildConfig.DEBUG) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.d(tag, message);
|
Log.d(tag, message);
|
||||||
@ -161,7 +166,8 @@ public class FileLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void w(final String tag, final String message) {
|
public static void w(final String tag, final String message) {
|
||||||
if (!BuildVars.DEBUG_VERSION) {
|
//if (!BuildVars.DEBUG_VERSION) {
|
||||||
|
if (!BuildConfig.DEBUG) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.w(tag, message);
|
Log.w(tag, message);
|
||||||
|
@ -108,7 +108,7 @@ public class FileUploadOperation {
|
|||||||
if (estimatedSize != 0 && finalSize != 0) {
|
if (estimatedSize != 0 && finalSize != 0) {
|
||||||
estimatedSize = 0;
|
estimatedSize = 0;
|
||||||
totalFileSize = finalSize;
|
totalFileSize = finalSize;
|
||||||
totalPartsCount = (int) Math.ceil((float) totalFileSize / (float) uploadChunkSize);
|
totalPartsCount = (int) (totalFileSize + uploadChunkSize - 1) / uploadChunkSize;
|
||||||
if (started) {
|
if (started) {
|
||||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("uploadinfo", Activity.MODE_PRIVATE);
|
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("uploadinfo", Activity.MODE_PRIVATE);
|
||||||
storeFileUploadInfo(preferences);
|
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) {
|
if (1024 % uploadChunkSize != 0) {
|
||||||
int chunkSize = 64;
|
int chunkSize = 64;
|
||||||
while (uploadChunkSize > chunkSize) {
|
while (uploadChunkSize > chunkSize) {
|
||||||
@ -172,7 +172,7 @@ public class FileUploadOperation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uploadChunkSize *= 1024;
|
uploadChunkSize *= 1024;
|
||||||
totalPartsCount = (int) Math.ceil((float) totalFileSize / (float) uploadChunkSize);
|
totalPartsCount = (int) (totalFileSize + uploadChunkSize - 1) / uploadChunkSize;
|
||||||
readBuffer = new byte[uploadChunkSize];
|
readBuffer = new byte[uploadChunkSize];
|
||||||
|
|
||||||
fileKey = Utilities.MD5(uploadingFilePath + (isEncrypted ? "enc" : ""));
|
fileKey = Utilities.MD5(uploadingFilePath + (isEncrypted ? "enc" : ""));
|
||||||
@ -355,7 +355,7 @@ public class FileUploadOperation {
|
|||||||
if (error == null) {
|
if (error == null) {
|
||||||
if (response instanceof TLRPC.TL_boolTrue) {
|
if (response instanceof TLRPC.TL_boolTrue) {
|
||||||
currentPartNum++;
|
currentPartNum++;
|
||||||
delegate.didChangedUploadProgress(FileUploadOperation.this, (float) currentUploaded / (float) totalFileSize);
|
delegate.didChangedUploadProgress(FileUploadOperation.this, currentUploaded / (float) totalFileSize);
|
||||||
if (isLastPart) {
|
if (isLastPart) {
|
||||||
state = 3;
|
state = 3;
|
||||||
if (key == null) {
|
if (key == null) {
|
||||||
|
@ -464,8 +464,11 @@ public class TLClassStore {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FileLog.e("tmessages", String.format("unknown class %x", constructor));
|
FileLog.e("tmessages", String.format("unknown class %x", constructor));
|
||||||
|
if (BuildVars.DEBUG_VERSION) {
|
||||||
|
throw new RuntimeException(String.format("unknown class %x", constructor));
|
||||||
|
} else {
|
||||||
return null;
|
return null;
|
||||||
//throw new RuntimeException(String.format("unknown class %x", constructor));
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -763,7 +763,8 @@ public class Utilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void checkForUpdates(Activity context) {
|
public static void checkForUpdates(Activity context) {
|
||||||
if (BuildVars.DEBUG_VERSION) {
|
//if (BuildVars.DEBUG_VERSION) {
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
UpdateManager.register(context, BuildVars.HOCKEY_APP_HASH);
|
UpdateManager.register(context, BuildVars.HOCKEY_APP_HASH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -430,10 +430,10 @@ public class ActionBar extends FrameLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void openSearchField(String text) {
|
public void openSearchField(String text) {
|
||||||
if (isSearchFieldVisible || menu == null) {
|
if (menu == null || text == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
menu.openSearchField(text);
|
menu.openSearchField(!isSearchFieldVisible, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -505,8 +505,6 @@ public class ActionBar extends FrameLayout {
|
|||||||
backButtonImageView.setBackgroundResource(itemsBackgroundResourceId);
|
backButtonImageView.setBackgroundResource(itemsBackgroundResourceId);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
//SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
|
|
||||||
//setBackgroundColor(themePrefs.getInt("themeColor", 0x000000));
|
|
||||||
setBackgroundColor(AndroidUtilities.getIntColor("themeColor"));
|
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++) {
|
for (int a = 0; a < getChildCount(); a++) {
|
||||||
View view = getChildAt(a);
|
View view = getChildAt(a);
|
||||||
if (view instanceof ActionBarMenuItem) {
|
if (view instanceof ActionBarMenuItem) {
|
||||||
ActionBarMenuItem item = (ActionBarMenuItem)view;
|
ActionBarMenuItem item = (ActionBarMenuItem)view;
|
||||||
if (item.isSearchField()) {
|
if (item.isSearchField()) {
|
||||||
|
if (toggle) {
|
||||||
parentActionBar.onSearchFieldVisibilityChanged(item.toggleSearch());
|
parentActionBar.onSearchFieldVisibilityChanged(item.toggleSearch());
|
||||||
|
}
|
||||||
item.getSearchField().setText(text);
|
item.getSearchField().setText(text);
|
||||||
item.getSearchField().setSelection(text.length());
|
item.getSearchField().setSelection(text.length());
|
||||||
break;
|
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){
|
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));
|
viewGroup.setBackgroundColor(themePrefs.getInt("chatsRowColor", 0xffffffff));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ import org.telegram.messenger.UserConfig;
|
|||||||
import org.telegram.messenger.Utilities;
|
import org.telegram.messenger.Utilities;
|
||||||
import org.telegram.ui.Cells.DialogCell;
|
import org.telegram.ui.Cells.DialogCell;
|
||||||
import org.telegram.ui.Cells.GreySectionCell;
|
import org.telegram.ui.Cells.GreySectionCell;
|
||||||
|
import org.telegram.ui.Cells.HashtagSearchCell;
|
||||||
import org.telegram.ui.Cells.LoadingCell;
|
import org.telegram.ui.Cells.LoadingCell;
|
||||||
import org.telegram.ui.Cells.ProfileSearchCell;
|
import org.telegram.ui.Cells.ProfileSearchCell;
|
||||||
|
|
||||||
@ -44,13 +45,14 @@ import java.util.Locale;
|
|||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
public class DialogsSearchAdapter extends BaseSearchAdapter {
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private Timer searchTimer;
|
private Timer searchTimer;
|
||||||
private ArrayList<TLObject> searchResult = new ArrayList<>();
|
private ArrayList<TLObject> searchResult = new ArrayList<>();
|
||||||
private ArrayList<CharSequence> searchResultNames = new ArrayList<>();
|
private ArrayList<CharSequence> searchResultNames = new ArrayList<>();
|
||||||
private ArrayList<MessageObject> searchResultMessages = new ArrayList<>();
|
private ArrayList<MessageObject> searchResultMessages = new ArrayList<>();
|
||||||
|
private ArrayList<String> searchResultHashtags = new ArrayList<>();
|
||||||
private String lastSearchText;
|
private String lastSearchText;
|
||||||
private long reqId = 0;
|
private long reqId = 0;
|
||||||
private int lastReqId;
|
private int lastReqId;
|
||||||
@ -87,6 +89,10 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
|||||||
searchMessagesInternal(lastMessagesSearchString);
|
searchMessagesInternal(lastMessagesSearchString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getLastSearchString() {
|
||||||
|
return lastMessagesSearchString;
|
||||||
|
}
|
||||||
|
|
||||||
private void searchMessagesInternal(final String query) {
|
private void searchMessagesInternal(final String query) {
|
||||||
if (needMessagesSearch == 0) {
|
if (needMessagesSearch == 0) {
|
||||||
return;
|
return;
|
||||||
@ -188,8 +194,8 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
|||||||
dialogSearchResult.date = cursor.intValue(1);
|
dialogSearchResult.date = cursor.intValue(1);
|
||||||
dialogsResult.put(id, dialogSearchResult);
|
dialogsResult.put(id, dialogSearchResult);
|
||||||
|
|
||||||
int lower_id = (int)id;
|
int lower_id = (int) id;
|
||||||
int high_id = (int)(id >> 32);
|
int high_id = (int) (id >> 32);
|
||||||
if (lower_id != 0) {
|
if (lower_id != 0) {
|
||||||
if (high_id == 1) {
|
if (high_id == 1) {
|
||||||
if (!serverOnly && !chatsToLoad.contains(lower_id)) {
|
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");
|
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()) {
|
while (cursor.next()) {
|
||||||
int uid = cursor.intValue(3);
|
int uid = cursor.intValue(3);
|
||||||
if (dialogsResult.containsKey((long)uid)) {
|
if (dialogsResult.containsKey((long) uid)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String name = cursor.stringValue(2);
|
String name = cursor.stringValue(2);
|
||||||
@ -477,6 +483,25 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
|||||||
return i > searchResult.size() && i <= globalSearch.size() + searchResult.size();
|
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) {
|
public void searchDialogs(final String query, final boolean serverOnly) {
|
||||||
if (query != null && lastSearchText != null && query.equals(lastSearchText)) {
|
if (query != null && lastSearchText != null && query.equals(lastSearchText)) {
|
||||||
return;
|
return;
|
||||||
@ -489,14 +514,38 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
|||||||
FileLog.e("tmessages", e);
|
FileLog.e("tmessages", e);
|
||||||
}
|
}
|
||||||
if (query == null || query.length() == 0) {
|
if (query == null || query.length() == 0) {
|
||||||
|
hashtagsLoadedFromDb = false;
|
||||||
searchResult.clear();
|
searchResult.clear();
|
||||||
searchResultNames.clear();
|
searchResultNames.clear();
|
||||||
|
searchResultHashtags.clear();
|
||||||
if (needMessagesSearch != 2) {
|
if (needMessagesSearch != 2) {
|
||||||
queryServerSearch(null);
|
queryServerSearch(null);
|
||||||
}
|
}
|
||||||
searchMessagesInternal(null);
|
searchMessagesInternal(null);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
} else {
|
} 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;
|
final int searchId = ++lastSearchId;
|
||||||
searchTimer = new Timer();
|
searchTimer = new Timer();
|
||||||
searchTimer.schedule(new TimerTask() {
|
searchTimer.schedule(new TimerTask() {
|
||||||
@ -530,11 +579,27 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled(int i) {
|
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
|
@Override
|
||||||
public int getCount() {
|
public int getCount() {
|
||||||
|
if (!searchResultHashtags.isEmpty()) {
|
||||||
|
return searchResultHashtags.size() + 1;
|
||||||
|
}
|
||||||
int count = searchResult.size();
|
int count = searchResult.size();
|
||||||
int globalCount = globalSearch.size();
|
int globalCount = globalSearch.size();
|
||||||
int messagesCount = searchResultMessages.size();
|
int messagesCount = searchResultMessages.size();
|
||||||
@ -549,6 +614,9 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getItem(int i) {
|
public Object getItem(int i) {
|
||||||
|
if (!searchResultHashtags.isEmpty()) {
|
||||||
|
return searchResultHashtags.get(i - 1);
|
||||||
|
}
|
||||||
int localCount = searchResult.size();
|
int localCount = searchResult.size();
|
||||||
int globalCount = globalSearch.isEmpty() ? 0 : globalSearch.size() + 1;
|
int globalCount = globalSearch.isEmpty() ? 0 : globalSearch.size() + 1;
|
||||||
int messagesCount = searchResultMessages.isEmpty() ? 0 : searchResultMessages.size() + 1;
|
int messagesCount = searchResultMessages.isEmpty() ? 0 : searchResultMessages.size() + 1;
|
||||||
@ -580,7 +648,9 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
|||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = new GreySectionCell(mContext);
|
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));
|
((GreySectionCell) view).setText(LocaleController.getString("GlobalSearch", R.string.GlobalSearch));
|
||||||
} else {
|
} else {
|
||||||
((GreySectionCell) view).setText(LocaleController.getString("SearchMessages", R.string.SearchMessages));
|
((GreySectionCell) view).setText(LocaleController.getString("SearchMessages", R.string.SearchMessages));
|
||||||
@ -647,6 +717,12 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
|||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = new LoadingCell(mContext);
|
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;
|
return view;
|
||||||
@ -669,11 +745,11 @@ public class DialogsSearchAdapter extends BaseContactsSearchAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getViewTypeCount() {
|
public int getViewTypeCount() {
|
||||||
return 4;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEmpty() {
|
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.Context;
|
||||||
import android.content.pm.PackageInfo;
|
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.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.BaseAdapter;
|
import android.widget.BaseAdapter;
|
||||||
@ -97,21 +100,21 @@ public class DrawerLayoutAdapter extends BaseAdapter {
|
|||||||
}
|
}
|
||||||
DrawerActionCell actionCell = (DrawerActionCell) view;
|
DrawerActionCell actionCell = (DrawerActionCell) view;
|
||||||
if (i == 2) {
|
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) {
|
} 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) {
|
} 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) {
|
} 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) {
|
}/* else if (i == 7) {
|
||||||
actionCell.setTextAndIcon(LocaleController.getString("InviteFriends", R.string.InviteFriends), R.drawable.menu_invite);
|
actionCell.setTextAndIcon(LocaleController.getString("InviteFriends", R.string.InviteFriends), R.drawable.menu_invite);
|
||||||
}*/ else if (i == themingRow) {
|
}*/ 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) {
|
} 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) {
|
} 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) {
|
} /*else if (i == 10) {
|
||||||
actionCell.setTextAndIcon(LocaleController.getString("TelegramFaq", R.string.TelegramFaq), R.drawable.menu_help);
|
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 org.telegram.ui.Cells.StickerCell;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
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) {
|
public void loadStikersForEmoji(CharSequence emoji) {
|
||||||
boolean search = emoji != null && emoji.length() != 0 && emoji.length() <= 2;
|
boolean search = emoji != null && emoji.length() != 0 && emoji.length() <= 2;
|
||||||
if (search) {
|
if (search) {
|
||||||
@ -257,6 +269,13 @@ public class StickersAdapter extends RecyclerView.Adapter implements Notificatio
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
stickers = newStickers;
|
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();
|
checkStickerFilesExistAndDownload();
|
||||||
delegate.needChangePanelVisibility(stickers != null && !stickers.isEmpty() && stickersToLoad.isEmpty());
|
delegate.needChangePanelVisibility(stickers != null && !stickers.isEmpty() && stickersToLoad.isEmpty());
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
|
@ -10,6 +10,7 @@ package org.telegram.ui.Cells;
|
|||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.res.Configuration;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
@ -452,11 +453,15 @@ public class ChatBaseCell extends BaseCell {
|
|||||||
if (messageObject.type == 13) {
|
if (messageObject.type == 13) {
|
||||||
int width;
|
int width;
|
||||||
if (AndroidUtilities.isTablet()) {
|
if (AndroidUtilities.isTablet()) {
|
||||||
|
if (AndroidUtilities.isSmallTablet() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||||
|
width = AndroidUtilities.displaySize.x;
|
||||||
|
} else {
|
||||||
int leftWidth = AndroidUtilities.displaySize.x / 100 * 35;
|
int leftWidth = AndroidUtilities.displaySize.x / 100 * 35;
|
||||||
if (leftWidth < AndroidUtilities.dp(320)) {
|
if (leftWidth < AndroidUtilities.dp(320)) {
|
||||||
leftWidth = AndroidUtilities.dp(320);
|
leftWidth = AndroidUtilities.dp(320);
|
||||||
}
|
}
|
||||||
width = AndroidUtilities.displaySize.x - leftWidth;
|
width = AndroidUtilities.displaySize.x - leftWidth;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
width = AndroidUtilities.displaySize.x;
|
width = AndroidUtilities.displaySize.x;
|
||||||
}
|
}
|
||||||
|
@ -928,6 +928,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
|
|||||||
protected void onAfterBackgroundDraw(Canvas canvas) {
|
protected void onAfterBackgroundDraw(Canvas canvas) {
|
||||||
boolean imageDrawn = false;
|
boolean imageDrawn = false;
|
||||||
if (gifDrawable != null) {
|
if (gifDrawable != null) {
|
||||||
|
drawTime = !gifDrawable.isPlaying();
|
||||||
canvas.save();
|
canvas.save();
|
||||||
gifDrawable.setBounds(photoImage.getImageX(), photoImage.getImageY(), photoImage.getImageX() + photoWidth, photoImage.getImageY() + photoHeight);
|
gifDrawable.setBounds(photoImage.getImageX(), photoImage.getImageY(), photoImage.getImageX() + photoWidth, photoImage.getImageY() + photoHeight);
|
||||||
gifDrawable.draw(canvas);
|
gifDrawable.draw(canvas);
|
||||||
|
@ -63,7 +63,7 @@ public class DialogCell extends BaseCell {
|
|||||||
private static Drawable lockWhiteDrawable;
|
private static Drawable lockWhiteDrawable;
|
||||||
private static Drawable groupWhiteDrawable;
|
private static Drawable groupWhiteDrawable;
|
||||||
private static Drawable broadcastWhiteDrawable;
|
private static Drawable broadcastWhiteDrawable;
|
||||||
private static Drawable muteWhiteDrawable;
|
//private static Drawable muteWhiteDrawable;
|
||||||
|
|
||||||
private static Paint linePaint;
|
private static Paint linePaint;
|
||||||
|
|
||||||
@ -188,8 +188,8 @@ public class DialogCell extends BaseCell {
|
|||||||
groupDrawable = groupWhiteDrawable;
|
groupDrawable = groupWhiteDrawable;
|
||||||
broadcastWhiteDrawable = getResources().getDrawable(R.drawable.list_broadcast_white);
|
broadcastWhiteDrawable = getResources().getDrawable(R.drawable.list_broadcast_white);
|
||||||
broadcastDrawable = broadcastWhiteDrawable;
|
broadcastDrawable = broadcastWhiteDrawable;
|
||||||
muteWhiteDrawable = getResources().getDrawable(R.drawable.mute_white);
|
//muteWhiteDrawable = getResources().getDrawable(R.drawable.mute_white);
|
||||||
muteDrawable = muteWhiteDrawable;
|
//muteDrawable = muteWhiteDrawable;
|
||||||
updateTheme();
|
updateTheme();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -272,10 +272,10 @@ public class DialogCell extends BaseCell {
|
|||||||
drawNameLock = true;
|
drawNameLock = true;
|
||||||
nameLockTop = AndroidUtilities.dp(16.5f);
|
nameLockTop = AndroidUtilities.dp(16.5f);
|
||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
nameLockLeft = AndroidUtilities.dp(72);
|
nameLockLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||||
nameLeft = AndroidUtilities.dp(76) + lockDrawable.getIntrinsicWidth();
|
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline + 4) + lockDrawable.getIntrinsicWidth();
|
||||||
} else {
|
} else {
|
||||||
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(72) - lockDrawable.getIntrinsicWidth();
|
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline) - lockDrawable.getIntrinsicWidth();
|
||||||
nameLeft = AndroidUtilities.dp(14);
|
nameLeft = AndroidUtilities.dp(14);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -289,15 +289,15 @@ public class DialogCell extends BaseCell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
nameLockLeft = AndroidUtilities.dp(72);
|
nameLockLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||||
nameLeft = AndroidUtilities.dp(76) + (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline + 4) + (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
||||||
} else {
|
} 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);
|
nameLeft = AndroidUtilities.dp(14);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
nameLeft = AndroidUtilities.dp(72);
|
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||||
} else {
|
} else {
|
||||||
nameLeft = AndroidUtilities.dp(14);
|
nameLeft = AndroidUtilities.dp(14);
|
||||||
}
|
}
|
||||||
@ -364,7 +364,7 @@ public class DialogCell extends BaseCell {
|
|||||||
} else {
|
} else {
|
||||||
if (chat != null && chat.id > 0) {
|
if (chat != null && chat.id > 0) {
|
||||||
String name = "";
|
String name = "";
|
||||||
if (message.isFromMe()) {
|
if (message.isOut()) {
|
||||||
name = LocaleController.getString("FromYou", R.string.FromYou);
|
name = LocaleController.getString("FromYou", R.string.FromYou);
|
||||||
} else {
|
} else {
|
||||||
if (fromUser != null) {
|
if (fromUser != null) {
|
||||||
@ -410,7 +410,7 @@ public class DialogCell extends BaseCell {
|
|||||||
drawCount = false;
|
drawCount = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message.isFromMe() && message.isOut()) {
|
if (message.isOut()) {
|
||||||
if (message.isSending()) {
|
if (message.isSending()) {
|
||||||
drawCheck1 = false;
|
drawCheck1 = false;
|
||||||
drawCheck2 = false;
|
drawCheck2 = false;
|
||||||
@ -479,7 +479,7 @@ public class DialogCell extends BaseCell {
|
|||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(14) - timeWidth;
|
nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(14) - timeWidth;
|
||||||
} else {
|
} else {
|
||||||
nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(72) - timeWidth;
|
nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(AndroidUtilities.leftBaseline) - timeWidth;
|
||||||
nameLeft += timeWidth;
|
nameLeft += timeWidth;
|
||||||
}
|
}
|
||||||
if (drawNameLock) {
|
if (drawNameLock) {
|
||||||
@ -537,14 +537,14 @@ public class DialogCell extends BaseCell {
|
|||||||
FileLog.e("tmessages", e);
|
FileLog.e("tmessages", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
int messageWidth = getMeasuredWidth() - AndroidUtilities.dp(88);
|
int messageWidth = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline + 16);
|
||||||
int avatarLeft;
|
int avatarLeft;
|
||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
messageLeft = AndroidUtilities.dp(72);
|
messageLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||||
avatarLeft = AndroidUtilities.dp(9);
|
avatarLeft = AndroidUtilities.dp(AndroidUtilities.isTablet() ? 13 : 9);
|
||||||
} else {
|
} else {
|
||||||
messageLeft = AndroidUtilities.dp(16);
|
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));
|
avatarImage.setImageCoords(avatarLeft, avatarTop, AndroidUtilities.dp(52), AndroidUtilities.dp(52));
|
||||||
if (drawError) {
|
if (drawError) {
|
||||||
@ -774,7 +774,7 @@ public class DialogCell extends BaseCell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateTheme(){
|
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 tColor = AndroidUtilities.getIntColor("themeColor");
|
||||||
int dColor = AndroidUtilities.getIntDarkerColor("themeColor",0x15);
|
int dColor = AndroidUtilities.getIntDarkerColor("themeColor",0x15);
|
||||||
|
|
||||||
@ -814,7 +814,8 @@ public class DialogCell extends BaseCell {
|
|||||||
broadcastWhiteDrawable.setColorFilter(nColor, PorterDuff.Mode.MULTIPLY);
|
broadcastWhiteDrawable.setColorFilter(nColor, PorterDuff.Mode.MULTIPLY);
|
||||||
|
|
||||||
int mColor = themePrefs.getInt("chatsMuteColor", 0xffa8a8a8);
|
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));
|
linePaint.setColor(themePrefs.getInt("chatsDividerColor", 0xffdcdcdc));
|
||||||
|
|
||||||
@ -894,9 +895,9 @@ public class DialogCell extends BaseCell {
|
|||||||
|
|
||||||
if (useSeparator) {
|
if (useSeparator) {
|
||||||
if (LocaleController.isRTL) {
|
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 {
|
} 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(){
|
private void updateTheme(){
|
||||||
textView.setTextColor(AndroidUtilities.getIntDef("drawerOptionColor", 0xff444444));
|
textView.setTextColor(AndroidUtilities.getIntDef("drawerOptionColor", 0xff444444));
|
||||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("drawerOptionSize", 15));
|
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("drawerOptionSize", 15));
|
||||||
|
Drawable[] drawables = textView.getCompoundDrawables();
|
||||||
int color = AndroidUtilities.getIntDef("drawerIconColor", 0xff737373);
|
int color = AndroidUtilities.getIntDef("drawerIconColor", 0xff737373);
|
||||||
Drawable icon = getResources().getDrawable(R.drawable.menu_newgroup_white);
|
if(drawables[0] != null)drawables[0].setColorFilter(color, PorterDuff.Mode.SRC_IN);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,11 +11,18 @@ package org.telegram.ui.Cells;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Bitmap;
|
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.os.Build;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.telegram.PhoneFormat.PhoneFormat;
|
import org.telegram.PhoneFormat.PhoneFormat;
|
||||||
@ -23,6 +30,8 @@ import org.telegram.android.AndroidUtilities;
|
|||||||
import org.telegram.android.ContactsController;
|
import org.telegram.android.ContactsController;
|
||||||
import org.telegram.android.MessageObject;
|
import org.telegram.android.MessageObject;
|
||||||
import org.telegram.android.MessagesController;
|
import org.telegram.android.MessagesController;
|
||||||
|
import org.telegram.messenger.ApplicationLoader;
|
||||||
|
import org.telegram.messenger.R;
|
||||||
import org.telegram.messenger.TLRPC;
|
import org.telegram.messenger.TLRPC;
|
||||||
import org.telegram.messenger.UserConfig;
|
import org.telegram.messenger.UserConfig;
|
||||||
import org.telegram.ui.Components.AvatarDrawable;
|
import org.telegram.ui.Components.AvatarDrawable;
|
||||||
@ -34,15 +43,30 @@ public class DrawerProfileCell extends FrameLayout implements PhotoViewer.PhotoV
|
|||||||
private BackupImageView avatarImageView;
|
private BackupImageView avatarImageView;
|
||||||
private TextView nameTextView;
|
private TextView nameTextView;
|
||||||
private TextView phoneTextView;
|
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) {
|
public DrawerProfileCell(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
setBackgroundColor(0xff4c84b5);
|
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 = new BackupImageView(context);
|
||||||
avatarImageView.imageReceiver.setRoundRadius(AndroidUtilities.dp(32));
|
avatarImageView.imageReceiver.setRoundRadius(AndroidUtilities.dp(32));
|
||||||
addView(avatarImageView);
|
addView(avatarImageView);
|
||||||
LayoutParams layoutParams = (LayoutParams) avatarImageView.getLayoutParams();
|
layoutParams = (LayoutParams) avatarImageView.getLayoutParams();
|
||||||
layoutParams.width = AndroidUtilities.dp(64);
|
layoutParams.width = AndroidUtilities.dp(64);
|
||||||
layoutParams.height = AndroidUtilities.dp(64);
|
layoutParams.height = AndroidUtilities.dp(64);
|
||||||
layoutParams.gravity = Gravity.LEFT | Gravity.BOTTOM;
|
layoutParams.gravity = Gravity.LEFT | Gravity.BOTTOM;
|
||||||
@ -110,6 +134,36 @@ public class DrawerProfileCell extends FrameLayout implements PhotoViewer.PhotoV
|
|||||||
updateTheme();
|
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) {
|
public void setUser(TLRPC.User user) {
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
return;
|
return;
|
||||||
@ -192,7 +246,7 @@ public class DrawerProfileCell extends FrameLayout implements PhotoViewer.PhotoV
|
|||||||
phoneTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("drawerPhoneSize", 13));
|
phoneTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("drawerPhoneSize", 13));
|
||||||
TLRPC.User user = MessagesController.getInstance().getUser(UserConfig.getClientUserId());
|
TLRPC.User user = MessagesController.getInstance().getUser(UserConfig.getClientUserId());
|
||||||
TLRPC.FileLocation photo = null;
|
TLRPC.FileLocation photo = null;
|
||||||
if (user.photo != null) {
|
if (user != null && user.photo != null && user.photo.photo_small != null ) {
|
||||||
photo = user.photo.photo_small;
|
photo = user.photo.photo_small;
|
||||||
}
|
}
|
||||||
AvatarDrawable avatarDrawable = new AvatarDrawable(user);
|
AvatarDrawable avatarDrawable = new AvatarDrawable(user);
|
||||||
|
@ -149,10 +149,10 @@ public class ProfileSearchCell extends BaseCell {
|
|||||||
if (encryptedChat != null) {
|
if (encryptedChat != null) {
|
||||||
drawNameLock = true;
|
drawNameLock = true;
|
||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
nameLockLeft = AndroidUtilities.dp(72);
|
nameLockLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||||
nameLeft = AndroidUtilities.dp(76) + lockDrawable.getIntrinsicWidth();
|
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline + 4) + lockDrawable.getIntrinsicWidth();
|
||||||
} else {
|
} else {
|
||||||
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(74) - lockDrawable.getIntrinsicWidth();
|
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline + 2) - lockDrawable.getIntrinsicWidth();
|
||||||
nameLeft = AndroidUtilities.dp(11);
|
nameLeft = AndroidUtilities.dp(11);
|
||||||
}
|
}
|
||||||
nameLockTop = AndroidUtilities.dp(16.5f);
|
nameLockTop = AndroidUtilities.dp(16.5f);
|
||||||
@ -167,15 +167,15 @@ public class ProfileSearchCell extends BaseCell {
|
|||||||
nameLockTop = AndroidUtilities.dp(30);
|
nameLockTop = AndroidUtilities.dp(30);
|
||||||
}
|
}
|
||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
nameLockLeft = AndroidUtilities.dp(72);
|
nameLockLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||||
nameLeft = AndroidUtilities.dp(76) + (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline + 4) + (drawNameGroup ? groupDrawable.getIntrinsicWidth() : broadcastDrawable.getIntrinsicWidth());
|
||||||
} else {
|
} 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);
|
nameLeft = AndroidUtilities.dp(11);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
nameLeft = AndroidUtilities.dp(72);
|
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||||
} else {
|
} else {
|
||||||
nameLeft = AndroidUtilities.dp(11);
|
nameLeft = AndroidUtilities.dp(11);
|
||||||
}
|
}
|
||||||
@ -211,7 +211,7 @@ public class ProfileSearchCell extends BaseCell {
|
|||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
onlineWidth = nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(14);
|
onlineWidth = nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(14);
|
||||||
} else {
|
} else {
|
||||||
onlineWidth = nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(72);
|
onlineWidth = nameWidth = getMeasuredWidth() - nameLeft - AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||||
}
|
}
|
||||||
if (drawNameLock) {
|
if (drawNameLock) {
|
||||||
nameWidth -= AndroidUtilities.dp(6) + lockDrawable.getIntrinsicWidth();
|
nameWidth -= AndroidUtilities.dp(6) + lockDrawable.getIntrinsicWidth();
|
||||||
@ -226,7 +226,7 @@ public class ProfileSearchCell extends BaseCell {
|
|||||||
|
|
||||||
if (chat == null) {
|
if (chat == null) {
|
||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
onlineLeft = AndroidUtilities.dp(72);
|
onlineLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||||
} else {
|
} else {
|
||||||
onlineLeft = AndroidUtilities.dp(11);
|
onlineLeft = AndroidUtilities.dp(11);
|
||||||
}
|
}
|
||||||
@ -254,9 +254,9 @@ public class ProfileSearchCell extends BaseCell {
|
|||||||
|
|
||||||
int avatarLeft;
|
int avatarLeft;
|
||||||
if (!LocaleController.isRTL) {
|
if (!LocaleController.isRTL) {
|
||||||
avatarLeft = AndroidUtilities.dp(9);
|
avatarLeft = AndroidUtilities.dp(AndroidUtilities.isTablet() ? 13 : 9);
|
||||||
} else {
|
} 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));
|
avatarImage.setImageCoords(avatarLeft, AndroidUtilities.dp(10), AndroidUtilities.dp(52), AndroidUtilities.dp(52));
|
||||||
@ -384,9 +384,9 @@ public class ProfileSearchCell extends BaseCell {
|
|||||||
|
|
||||||
if (useSeparator) {
|
if (useSeparator) {
|
||||||
if (LocaleController.isRTL) {
|
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 {
|
} 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.TLClassStore;
|
||||||
import org.telegram.messenger.TLObject;
|
import org.telegram.messenger.TLObject;
|
||||||
import org.telegram.messenger.TLRPC;
|
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.UserConfig;
|
||||||
import org.telegram.messenger.Utilities;
|
import org.telegram.messenger.Utilities;
|
||||||
import org.telegram.ui.ActionBar.ActionBar;
|
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.ChatContactCell;
|
||||||
import org.telegram.ui.Cells.ChatMediaCell;
|
import org.telegram.ui.Cells.ChatMediaCell;
|
||||||
import org.telegram.ui.Cells.ChatMessageCell;
|
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.AvatarDrawable;
|
||||||
import org.telegram.ui.Components.BackupImageView;
|
import org.telegram.ui.Components.BackupImageView;
|
||||||
|
import org.telegram.ui.ActionBar.BaseFragment;
|
||||||
import org.telegram.ui.Components.ChatActivityEnterView;
|
import org.telegram.ui.Components.ChatActivityEnterView;
|
||||||
|
import org.telegram.android.ImageReceiver;
|
||||||
import org.telegram.ui.Components.FrameLayoutFixed;
|
import org.telegram.ui.Components.FrameLayoutFixed;
|
||||||
import org.telegram.ui.Components.LayoutListView;
|
import org.telegram.ui.Components.LayoutListView;
|
||||||
import org.telegram.ui.Components.RecyclerListView;
|
import org.telegram.ui.Components.RecyclerListView;
|
||||||
@ -193,6 +205,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
private int loadsCount = 0;
|
private int loadsCount = 0;
|
||||||
|
|
||||||
private int startLoadFromMessageId = 0;
|
private int startLoadFromMessageId = 0;
|
||||||
|
private boolean needSelectFromMessageId;
|
||||||
|
private int returnToMessageId = 0;
|
||||||
|
|
||||||
private int minDate = 0;
|
private int minDate = 0;
|
||||||
private boolean first = true;
|
private boolean first = true;
|
||||||
@ -430,6 +444,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
loading = true;
|
loading = true;
|
||||||
|
|
||||||
if (startLoadFromMessageId != 0) {
|
if (startLoadFromMessageId != 0) {
|
||||||
|
needSelectFromMessageId = true;
|
||||||
MessagesController.getInstance().loadMessages(dialog_id, AndroidUtilities.isTablet() ? 30 : 20, startLoadFromMessageId, true, 0, classGuid, 3, 0, 0, false);
|
MessagesController.getInstance().loadMessages(dialog_id, AndroidUtilities.isTablet() ? 30 : 20, startLoadFromMessageId, true, 0, classGuid, 3, 0, 0, false);
|
||||||
} else {
|
} else {
|
||||||
MessagesController.getInstance().loadMessages(dialog_id, AndroidUtilities.isTablet() ? 30 : 20, 0, true, 0, classGuid, 2, 0, 0, true);
|
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;
|
layoutParams2.gravity = Gravity.CENTER;
|
||||||
progressBar.setLayoutParams(layoutParams2);
|
progressBar.setLayoutParams(layoutParams2);
|
||||||
|
|
||||||
if (currentChat != null && !isBroadcast) {
|
if (currentEncryptedChat == null && !isBroadcast) {
|
||||||
mentionListView = new ListView(getParentActivity());
|
mentionListView = new ListView(getParentActivity());
|
||||||
mentionListView.setBackgroundResource(R.drawable.compose_panel);
|
mentionListView.setBackgroundResource(R.drawable.compose_panel);
|
||||||
mentionListView.setVisibility(View.GONE);
|
mentionListView.setVisibility(View.GONE);
|
||||||
@ -1443,8 +1458,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
public void needChangePanelVisibility(boolean show) {
|
public void needChangePanelVisibility(boolean show) {
|
||||||
if (show) {
|
if (show) {
|
||||||
RelativeLayout.LayoutParams layoutParams3 = (RelativeLayout.LayoutParams) mentionListView.getLayoutParams();
|
RelativeLayout.LayoutParams layoutParams3 = (RelativeLayout.LayoutParams) mentionListView.getLayoutParams();
|
||||||
layoutParams3.height = AndroidUtilities.dp(2 + 36 * Math.min(3, mentionsAdapter.getCount()));
|
int height = 36 * Math.min(3, mentionsAdapter.getCount()) + (mentionsAdapter.getCount() > 3 ? 18 : 0);
|
||||||
layoutParams3.topMargin = -AndroidUtilities.dp(36 * Math.min(3, mentionsAdapter.getCount()));
|
layoutParams3.height = AndroidUtilities.dp(2 + height);
|
||||||
|
layoutParams3.topMargin = -AndroidUtilities.dp(height);
|
||||||
mentionListView.setLayoutParams(layoutParams3);
|
mentionListView.setLayoutParams(layoutParams3);
|
||||||
|
|
||||||
if (mentionListAnimation != null) {
|
if (mentionListAnimation != null) {
|
||||||
@ -1512,16 +1528,44 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
mentionsAdapter.setChatInfo(info);
|
mentionsAdapter.setChatInfo(info);
|
||||||
|
mentionsAdapter.setNeedUsernames(currentChat != null);
|
||||||
|
|
||||||
mentionListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
mentionListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
TLRPC.User user = mentionsAdapter.getItem(position);
|
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) {
|
if (user != null) {
|
||||||
int start = mentionsAdapter.getUsernameStartPosition();
|
|
||||||
int len = mentionsAdapter.getUsernameLength();
|
|
||||||
chatActivityEnterView.replaceWithText(start, len, "@" + user.username + " ");
|
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.setLayoutParams(layoutParams3);
|
||||||
chatActivityEnterView.setDelegate(new ChatActivityEnterView.ChatActivityEnterViewDelegate() {
|
chatActivityEnterView.setDelegate(new ChatActivityEnterView.ChatActivityEnterViewDelegate() {
|
||||||
@Override
|
@Override
|
||||||
public void onMessageSend() {
|
public void onMessageSend(String message) {
|
||||||
moveScrollToLastMessage();
|
moveScrollToLastMessage();
|
||||||
showReplyForMessageObjectOrForward(false, null, null, true);
|
showReplyForMessageObjectOrForward(false, null, null, true);
|
||||||
|
if (mentionsAdapter != null) {
|
||||||
|
mentionsAdapter.addHashtagsFromMessage(message);
|
||||||
|
}
|
||||||
|
if (message != null) {
|
||||||
|
NotificationsController.getInstance().playOutChatSound();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1552,7 +1602,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
stickersAdapter.loadStikersForEmoji(text);
|
stickersAdapter.loadStikersForEmoji(text);
|
||||||
}
|
}
|
||||||
if (mentionsAdapter != null) {
|
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 = (RelativeLayout.LayoutParams) stickersPanel.getLayoutParams();
|
||||||
layoutParams3.width = RelativeLayout.LayoutParams.WRAP_CONTENT;
|
layoutParams3.width = RelativeLayout.LayoutParams.WRAP_CONTENT;
|
||||||
layoutParams3.height = AndroidUtilities.dp(81.5f);
|
layoutParams3.height = AndroidUtilities.dp(81.5f);
|
||||||
|
//layoutParams3.height = AndroidUtilities.dp(100);
|
||||||
layoutParams3.bottomMargin = AndroidUtilities.dp(38);
|
layoutParams3.bottomMargin = AndroidUtilities.dp(38);
|
||||||
layoutParams3.addRule(RelativeLayout.ALIGN_BOTTOM, id_chat_compose_panel);
|
layoutParams3.addRule(RelativeLayout.ALIGN_BOTTOM, id_chat_compose_panel);
|
||||||
stickersPanel.setLayoutParams(layoutParams3);
|
stickersPanel.setLayoutParams(layoutParams3);
|
||||||
@ -1715,6 +1766,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
layoutParams2 = (FrameLayout.LayoutParams) stickersListView.getLayoutParams();
|
layoutParams2 = (FrameLayout.LayoutParams) stickersListView.getLayoutParams();
|
||||||
layoutParams2.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
layoutParams2.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||||
layoutParams2.height = AndroidUtilities.dp(78);
|
layoutParams2.height = AndroidUtilities.dp(78);
|
||||||
|
//layoutParams2.height = AndroidUtilities.dp(97);
|
||||||
stickersListView.setLayoutParams(layoutParams2);
|
stickersListView.setLayoutParams(layoutParams2);
|
||||||
if (currentEncryptedChat == null || currentEncryptedChat != null && AndroidUtilities.getPeerLayerVersion(currentEncryptedChat.layer) >= 23) {
|
if (currentEncryptedChat == null || currentEncryptedChat != null && AndroidUtilities.getPeerLayerVersion(currentEncryptedChat.layer) >= 23) {
|
||||||
if (stickersAdapter != null) {
|
if (stickersAdapter != null) {
|
||||||
@ -1902,8 +1954,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
pagedownButton.setOnClickListener(new View.OnClickListener() {
|
pagedownButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
if (returnToMessageId > 0) {
|
||||||
|
scrollToMessageId(returnToMessageId, 0, true);
|
||||||
|
} else {
|
||||||
scrollToLastMessage();
|
scrollToLastMessage();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (loading && messages.isEmpty()) {
|
if (loading && messages.isEmpty()) {
|
||||||
@ -2129,11 +2185,80 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
forward_end_reached = true;
|
forward_end_reached = true;
|
||||||
loading = true;
|
loading = true;
|
||||||
startLoadFromMessageId = 0;
|
startLoadFromMessageId = 0;
|
||||||
|
needSelectFromMessageId = false;
|
||||||
chatAdapter.notifyDataSetChanged();
|
chatAdapter.notifyDataSetChanged();
|
||||||
MessagesController.getInstance().loadMessages(dialog_id, 30, 0, true, 0, classGuid, 0, 0, 0, true);
|
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) {
|
private void showPagedownButton(boolean show, boolean animated) {
|
||||||
if (pagedownButton == null) {
|
if (pagedownButton == null) {
|
||||||
return;
|
return;
|
||||||
@ -2149,6 +2274,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
returnToMessageId = 0;
|
||||||
if (pagedownButton.getVisibility() == View.VISIBLE) {
|
if (pagedownButton.getVisibility() == View.VISIBLE) {
|
||||||
if (animated) {
|
if (animated) {
|
||||||
ObjectAnimatorProxy.ofFloatProxy(pagedownButton, "alpha", 0.0f).setDuration(200).addListener(new AnimatorListenerAdapterProxy() {
|
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);
|
Drawable lock = getParentActivity().getResources().getDrawable(R.drawable.ic_lock_header);
|
||||||
lock.setColorFilter(AndroidUtilities.getIntDef("chatHeaderIconsColor", 0xffffffff), PorterDuff.Mode.MULTIPLY);
|
lock.setColorFilter(AndroidUtilities.getIntDef("chatHeaderIconsColor", 0xffffffff), PorterDuff.Mode.MULTIPLY);
|
||||||
lock = currentEncryptedChat != null ? lock : null;
|
lock = currentEncryptedChat != null ? lock : null;
|
||||||
Drawable mute = getParentActivity().getResources().getDrawable(R.drawable.mute_white);
|
Drawable mute = getParentActivity().getResources().getDrawable(R.drawable.mute_blue);
|
||||||
mute.setColorFilter(AndroidUtilities.getIntDef("chatHeaderIconsColor", 0xffffffff), PorterDuff.Mode.MULTIPLY);
|
mute.setColorFilter(AndroidUtilities.getIntDef("chatHeaderIconsColor", 0xffffffff), PorterDuff.Mode.SRC_IN);
|
||||||
mute = MessagesController.getInstance().isDialogMuted(dialog_id) ? mute : null;
|
mute = MessagesController.getInstance().isDialogMuted(dialog_id) ? mute : null;
|
||||||
nameTextView.setCompoundDrawablesWithIntrinsicBounds(lock, null, mute, null);
|
nameTextView.setCompoundDrawablesWithIntrinsicBounds(lock, null, mute, null);
|
||||||
if (rightIcon != 0) {
|
if (rightIcon != 0) {
|
||||||
@ -2892,7 +3018,11 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
scrollToMessageMiddleScreen = false;
|
scrollToMessageMiddleScreen = false;
|
||||||
newRowsCount++;
|
newRowsCount++;
|
||||||
} else if (load_type == 3 && obj.getId() == startLoadFromMessageId) {
|
} else if (load_type == 3 && obj.getId() == startLoadFromMessageId) {
|
||||||
|
if (needSelectFromMessageId) {
|
||||||
highlightMessageId = obj.getId();
|
highlightMessageId = obj.getId();
|
||||||
|
} else {
|
||||||
|
highlightMessageId = Integer.MAX_VALUE;
|
||||||
|
}
|
||||||
scrollToMessage = obj;
|
scrollToMessage = obj;
|
||||||
if (isCache) {
|
if (isCache) {
|
||||||
startLoadFromMessageId = 0;
|
startLoadFromMessageId = 0;
|
||||||
@ -3623,7 +3753,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
paused = false;
|
paused = false;
|
||||||
if (readWhenResume && !messages.isEmpty()) {
|
if (readWhenResume && !messages.isEmpty()) {
|
||||||
for (MessageObject messageObject : messages) {
|
for (MessageObject messageObject : messages) {
|
||||||
if (!messageObject.isUnread() && !messageObject.isFromMe()) {
|
if (!messageObject.isUnread() && !messageObject.isOut()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!messageObject.isOut()) {
|
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.setTextColor(AndroidUtilities.getIntDef("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor",-0x40)));
|
||||||
onlineTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("chatStatusSize", 14));
|
onlineTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("chatStatusSize", 14));
|
||||||
int iColor = AndroidUtilities.getIntDef("chatHeaderIconsColor", 0xffffffff);
|
int iColor = AndroidUtilities.getIntDef("chatHeaderIconsColor", 0xffffffff);
|
||||||
Drawable mute = getParentActivity().getResources().getDrawable(R.drawable.mute_white);
|
Drawable mute = getParentActivity().getResources().getDrawable(R.drawable.mute_blue);
|
||||||
mute.setColorFilter(iColor, PorterDuff.Mode.MULTIPLY);
|
mute.setColorFilter(iColor, PorterDuff.Mode.SRC_IN);
|
||||||
Drawable dots = getParentActivity().getResources().getDrawable(R.drawable.ic_ab_other);
|
Drawable dots = getParentActivity().getResources().getDrawable(R.drawable.ic_ab_other);
|
||||||
dots.setColorFilter(iColor, PorterDuff.Mode.MULTIPLY);
|
dots.setColorFilter(iColor, PorterDuff.Mode.MULTIPLY);
|
||||||
Drawable back = getParentActivity().getResources().getDrawable(R.drawable.ic_ab_back);
|
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
|
@Override
|
||||||
public void didSelectDialog(MessagesActivity activity, long did, boolean param) {
|
public void didSelectDialog(MessagesActivity activity, long did, boolean param) {
|
||||||
if (dialog_id != 0 && (forwaringMessage != null || !selectedMessagesIds.isEmpty())) {
|
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
|
@Override
|
||||||
public boolean onBackPressed() {
|
public boolean onBackPressed() {
|
||||||
if (actionBar.isActionModeShowed()) {
|
if (actionBar.isActionModeShowed()) {
|
||||||
@ -4613,63 +4742,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void didPressReplyMessage(ChatBaseCell cell, int id) {
|
public void didPressReplyMessage(ChatBaseCell cell, int id) {
|
||||||
MessageObject object = messagesDict.get(id);
|
scrollToMessageId(id, cell.getMessageObject().getId(), true);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (view instanceof ChatMediaCell) {
|
if (view instanceof ChatMediaCell) {
|
||||||
|
@ -66,7 +66,7 @@ import java.lang.reflect.Field;
|
|||||||
public class ChatActivityEnterView extends FrameLayoutFixed implements NotificationCenter.NotificationCenterDelegate, SizeNotifierRelativeLayout.SizeNotifierRelativeLayoutDelegate {
|
public class ChatActivityEnterView extends FrameLayoutFixed implements NotificationCenter.NotificationCenterDelegate, SizeNotifierRelativeLayout.SizeNotifierRelativeLayoutDelegate {
|
||||||
|
|
||||||
public interface ChatActivityEnterViewDelegate {
|
public interface ChatActivityEnterViewDelegate {
|
||||||
void onMessageSend();
|
void onMessageSend(String message);
|
||||||
void needSendTyping();
|
void needSendTyping();
|
||||||
void onTextChanged(CharSequence text);
|
void onTextChanged(CharSequence text);
|
||||||
void onAttachButtonHidden();
|
void onAttachButtonHidden();
|
||||||
@ -74,7 +74,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
void onWindowSizeChanged(int size);
|
void onWindowSizeChanged(int size);
|
||||||
}
|
}
|
||||||
|
|
||||||
private EditText messsageEditText;
|
private EditText messageEditText;
|
||||||
private ImageView sendButton;
|
private ImageView sendButton;
|
||||||
private PopupWindow emojiPopup;
|
private PopupWindow emojiPopup;
|
||||||
private ImageView emojiButton;
|
private ImageView emojiButton;
|
||||||
@ -178,28 +178,28 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
messsageEditText = new EditText(context);
|
messageEditText = new EditText(context);
|
||||||
messsageEditText.setHint(LocaleController.getString("TypeMessage", R.string.TypeMessage));
|
messageEditText.setHint(LocaleController.getString("TypeMessage", R.string.TypeMessage));
|
||||||
messsageEditText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
messageEditText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||||
messsageEditText.setInputType(messsageEditText.getInputType() | EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE);
|
messageEditText.setInputType(messageEditText.getInputType() | EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE);
|
||||||
messsageEditText.setSingleLine(false);
|
messageEditText.setSingleLine(false);
|
||||||
messsageEditText.setMaxLines(4);
|
messageEditText.setMaxLines(4);
|
||||||
messsageEditText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
|
messageEditText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
|
||||||
messsageEditText.setGravity(Gravity.BOTTOM);
|
messageEditText.setGravity(Gravity.BOTTOM);
|
||||||
messsageEditText.setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(12));
|
messageEditText.setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(12));
|
||||||
messsageEditText.setBackgroundDrawable(null);
|
messageEditText.setBackgroundDrawable(null);
|
||||||
AndroidUtilities.clearCursorDrawable(messsageEditText);
|
AndroidUtilities.clearCursorDrawable(messageEditText);
|
||||||
messsageEditText.setTextColor(0xff000000);
|
messageEditText.setTextColor(0xff000000);
|
||||||
messsageEditText.setHintTextColor(0xffb2b2b2);
|
messageEditText.setHintTextColor(0xffb2b2b2);
|
||||||
frameLayout.addView(messsageEditText);
|
frameLayout.addView(messageEditText);
|
||||||
layoutParams1 = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
|
layoutParams1 = (FrameLayout.LayoutParams) messageEditText.getLayoutParams();
|
||||||
layoutParams1.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
layoutParams1.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||||
layoutParams1.height = FrameLayout.LayoutParams.WRAP_CONTENT;
|
layoutParams1.height = FrameLayout.LayoutParams.WRAP_CONTENT;
|
||||||
layoutParams1.gravity = Gravity.BOTTOM;
|
layoutParams1.gravity = Gravity.BOTTOM;
|
||||||
layoutParams1.leftMargin = AndroidUtilities.dp(52);
|
layoutParams1.leftMargin = AndroidUtilities.dp(52);
|
||||||
layoutParams1.rightMargin = AndroidUtilities.dp(isChat ? 50 : 2);
|
layoutParams1.rightMargin = AndroidUtilities.dp(isChat ? 50 : 2);
|
||||||
messsageEditText.setLayoutParams(layoutParams1);
|
messageEditText.setLayoutParams(layoutParams1);
|
||||||
messsageEditText.setOnKeyListener(new View.OnKeyListener() {
|
messageEditText.setOnKeyListener(new View.OnKeyListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onKey(View view, int i, KeyEvent keyEvent) {
|
public boolean onKey(View view, int i, KeyEvent keyEvent) {
|
||||||
if (i == 4 && !keyboardVisible && emojiPopup != null && emojiPopup.isShowing()) {
|
if (i == 4 && !keyboardVisible && emojiPopup != null && emojiPopup.isShowing()) {
|
||||||
@ -214,7 +214,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
messsageEditText.setOnClickListener(new View.OnClickListener() {
|
messageEditText.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
if (emojiPopup != null && emojiPopup.isShowing()) {
|
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
|
@Override
|
||||||
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
|
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
|
||||||
if (i == EditorInfo.IME_ACTION_SEND) {
|
if (i == EditorInfo.IME_ACTION_SEND) {
|
||||||
@ -237,7 +237,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
messsageEditText.addTextChangedListener(new TextWatcher() {
|
messageEditText.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
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;
|
int j = arrayOfImageSpan.length;
|
||||||
while (true) {
|
while (true) {
|
||||||
if (i >= j) {
|
if (i >= j) {
|
||||||
Emoji.replaceEmoji(editable, messsageEditText.getPaint().getFontMetricsInt(), AndroidUtilities.dp(20));
|
Emoji.replaceEmoji(editable, messageEditText.getPaint().getFontMetricsInt(), AndroidUtilities.dp(20));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
editable.removeSpan(arrayOfImageSpan[i]);
|
editable.removeSpan(arrayOfImageSpan[i]);
|
||||||
@ -400,7 +400,6 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
@Override
|
@Override
|
||||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||||
Drawable mic = parentActivity.getResources().getDrawable(R.drawable.mic);
|
Drawable mic = parentActivity.getResources().getDrawable(R.drawable.mic);
|
||||||
|
|
||||||
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
|
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
|
||||||
mic.setColorFilter(0xffda564d, PorterDuff.Mode.SRC_IN);
|
mic.setColorFilter(0xffda564d, PorterDuff.Mode.SRC_IN);
|
||||||
audioSendButton.setImageDrawable(mic);
|
audioSendButton.setImageDrawable(mic);
|
||||||
@ -506,9 +505,9 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
Drawable send = parentActivity.getResources().getDrawable(R.drawable.ic_send);
|
Drawable send = parentActivity.getResources().getDrawable(R.drawable.ic_send);
|
||||||
send.setColorFilter(AndroidUtilities.getIntDef("chatSendIconColor", AndroidUtilities.getIntColor("chatEditTextIconsColor")), PorterDuff.Mode.SRC_IN);
|
send.setColorFilter(AndroidUtilities.getIntDef("chatSendIconColor", AndroidUtilities.getIntColor("chatEditTextIconsColor")), PorterDuff.Mode.SRC_IN);
|
||||||
sendButton.setImageDrawable(send);
|
sendButton.setImageDrawable(send);
|
||||||
messsageEditText.setTextColor(AndroidUtilities.getIntDef("chatEditTextColor",0xff000000));
|
messageEditText.setTextColor(AndroidUtilities.getIntDef("chatEditTextColor",0xff000000));
|
||||||
messsageEditText.setHintTextColor(AndroidUtilities.getIntAlphaColor("chatEditTextColor", 0xff000000, 0.35f));
|
messageEditText.setHintTextColor(AndroidUtilities.getIntAlphaColor("chatEditTextColor", 0xff000000, 0.35f));
|
||||||
messsageEditText.setTextSize(AndroidUtilities.getIntDef("chatEditTextSize",18));
|
messageEditText.setTextSize(AndroidUtilities.getIntDef("chatEditTextSize",18));
|
||||||
int color = AndroidUtilities.getIntDef("chatEditTextBGColor", 0xffffffff);
|
int color = AndroidUtilities.getIntDef("chatEditTextBGColor", 0xffffffff);
|
||||||
setBackgroundColor(color);
|
setBackgroundColor(color);
|
||||||
textFieldContainer.setBackgroundColor(color);
|
textFieldContainer.setBackgroundColor(color);
|
||||||
@ -553,6 +552,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
if (allowShowTopView) {
|
if (allowShowTopView) {
|
||||||
topView.setVisibility(VISIBLE);
|
topView.setVisibility(VISIBLE);
|
||||||
if (animated) {
|
if (animated) {
|
||||||
|
if (keyboardVisible || emojiPopup != null && emojiPopup.isShowing()) {
|
||||||
AnimatorSetProxy animatorSetProxy = new AnimatorSetProxy();
|
AnimatorSetProxy animatorSetProxy = new AnimatorSetProxy();
|
||||||
animatorSetProxy.playTogether(
|
animatorSetProxy.playTogether(
|
||||||
ObjectAnimatorProxy.ofFloat(ChatActivityEnterView.this, "topViewAnimation", 0.0f, 1.0f)
|
ObjectAnimatorProxy.ofFloat(ChatActivityEnterView.this, "topViewAnimation", 0.0f, 1.0f)
|
||||||
@ -570,6 +570,14 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
});
|
});
|
||||||
animatorSetProxy.setDuration(200);
|
animatorSetProxy.setDuration(200);
|
||||||
animatorSetProxy.start();
|
animatorSetProxy.start();
|
||||||
|
} else {
|
||||||
|
LayoutParams layoutParams2 = (LayoutParams) textFieldContainer.getLayoutParams();
|
||||||
|
layoutParams2.topMargin = AndroidUtilities.dp(2) + topView.getLayoutParams().height;
|
||||||
|
textFieldContainer.setLayoutParams(layoutParams2);
|
||||||
|
if (!forceShowSendButton) {
|
||||||
|
openKeyboard();
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
LayoutParams layoutParams2 = (LayoutParams) textFieldContainer.getLayoutParams();
|
LayoutParams layoutParams2 = (LayoutParams) textFieldContainer.getLayoutParams();
|
||||||
layoutParams2.topMargin = AndroidUtilities.dp(2) + topView.getLayoutParams().height;
|
layoutParams2.topMargin = AndroidUtilities.dp(2) + topView.getLayoutParams().height;
|
||||||
@ -692,15 +700,16 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (processSendingText(messsageEditText.getText().toString())) {
|
String message = messageEditText.getText().toString();
|
||||||
messsageEditText.setText("");
|
if (processSendingText(message)) {
|
||||||
|
messageEditText.setText("");
|
||||||
lastTypingTimeSend = 0;
|
lastTypingTimeSend = 0;
|
||||||
if (delegate != null) {
|
if (delegate != null) {
|
||||||
delegate.onMessageSend();
|
delegate.onMessageSend(message);
|
||||||
}
|
}
|
||||||
} else if (forceShowSendButton) {
|
} else if (forceShowSendButton) {
|
||||||
if (delegate != null) {
|
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) {
|
private void checkSendButton(final boolean animated) {
|
||||||
String message = getTrimmedString(messsageEditText.getText().toString());
|
String message = getTrimmedString(messageEditText.getText().toString());
|
||||||
if (message.length() > 0 || forceShowSendButton) {
|
if (message.length() > 0 || forceShowSendButton) {
|
||||||
if (audioSendButton.getVisibility() == View.VISIBLE) {
|
if (audioSendButton.getVisibility() == View.VISIBLE) {
|
||||||
if (animated) {
|
if (animated) {
|
||||||
@ -767,10 +776,10 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
});
|
});
|
||||||
runningAnimation2.start();
|
runningAnimation2.start();
|
||||||
|
|
||||||
if (messsageEditText != null) {
|
if (messageEditText != null) {
|
||||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
|
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messageEditText.getLayoutParams();
|
||||||
layoutParams.rightMargin = AndroidUtilities.dp(0);
|
layoutParams.rightMargin = AndroidUtilities.dp(0);
|
||||||
messsageEditText.setLayoutParams(layoutParams);
|
messageEditText.setLayoutParams(layoutParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate.onAttachButtonHidden();
|
delegate.onAttachButtonHidden();
|
||||||
@ -817,9 +826,9 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
attachButton.setVisibility(View.GONE);
|
attachButton.setVisibility(View.GONE);
|
||||||
attachButton.clearAnimation();
|
attachButton.clearAnimation();
|
||||||
delegate.onAttachButtonHidden();
|
delegate.onAttachButtonHidden();
|
||||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
|
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messageEditText.getLayoutParams();
|
||||||
layoutParams.rightMargin = AndroidUtilities.dp(0);
|
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.setDuration(100);
|
||||||
runningAnimation2.start();
|
runningAnimation2.start();
|
||||||
|
|
||||||
if (messsageEditText != null) {
|
if (messageEditText != null) {
|
||||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
|
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messageEditText.getLayoutParams();
|
||||||
layoutParams.rightMargin = AndroidUtilities.dp(50);
|
layoutParams.rightMargin = AndroidUtilities.dp(50);
|
||||||
messsageEditText.setLayoutParams(layoutParams);
|
messageEditText.setLayoutParams(layoutParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate.onAttachButtonShow();
|
delegate.onAttachButtonShow();
|
||||||
@ -897,9 +906,9 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
if (attachButton != null) {
|
if (attachButton != null) {
|
||||||
delegate.onAttachButtonShow();
|
delegate.onAttachButtonShow();
|
||||||
attachButton.setVisibility(View.VISIBLE);
|
attachButton.setVisibility(View.VISIBLE);
|
||||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messsageEditText.getLayoutParams();
|
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) messageEditText.getLayoutParams();
|
||||||
layoutParams.rightMargin = AndroidUtilities.dp(50);
|
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 = new EmojiView(parentActivity);
|
||||||
emojiView.setListener(new EmojiView.Listener() {
|
emojiView.setListener(new EmojiView.Listener() {
|
||||||
public void onBackspace() {
|
public void onBackspace() {
|
||||||
messsageEditText.dispatchKeyEvent(new KeyEvent(0, 67));
|
messageEditText.dispatchKeyEvent(new KeyEvent(0, 67));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEmojiSelected(String symbol) {
|
public void onEmojiSelected(String symbol) {
|
||||||
int i = messsageEditText.getSelectionEnd();
|
int i = messageEditText.getSelectionEnd();
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
i = 0;
|
i = 0;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
CharSequence localCharSequence = Emoji.replaceEmoji(symbol, messsageEditText.getPaint().getFontMetricsInt(), AndroidUtilities.dp(20));
|
CharSequence localCharSequence = Emoji.replaceEmoji(symbol, messageEditText.getPaint().getFontMetricsInt(), AndroidUtilities.dp(20));
|
||||||
messsageEditText.setText(messsageEditText.getText().insert(i, localCharSequence));
|
messageEditText.setText(messageEditText.getText().insert(i, localCharSequence));
|
||||||
int j = i + localCharSequence.length();
|
int j = i + localCharSequence.length();
|
||||||
messsageEditText.setSelection(j, j);
|
messageEditText.setSelection(j, j);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
FileLog.e("tmessages", e);
|
FileLog.e("tmessages", e);
|
||||||
}
|
}
|
||||||
@ -1025,19 +1034,19 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
int currentHeight;
|
int currentHeight;
|
||||||
WindowManager wm = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
|
||||||
int rotation = wm.getDefaultDisplay().getRotation();
|
|
||||||
if (keyboardHeight <= 0) {
|
if (keyboardHeight <= 0) {
|
||||||
keyboardHeight = ApplicationLoader.applicationContext.getSharedPreferences("emoji", 0).getInt("kbd_height", AndroidUtilities.dp(200));
|
keyboardHeight = ApplicationLoader.applicationContext.getSharedPreferences("emoji", 0).getInt("kbd_height", AndroidUtilities.dp(200));
|
||||||
}
|
}
|
||||||
if (keyboardHeightLand <= 0) {
|
if (keyboardHeightLand <= 0) {
|
||||||
keyboardHeightLand = ApplicationLoader.applicationContext.getSharedPreferences("emoji", 0).getInt("kbd_height_land3", AndroidUtilities.dp(200));
|
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;
|
currentHeight = keyboardHeightLand;
|
||||||
} else {
|
} else {
|
||||||
currentHeight = keyboardHeight;
|
currentHeight = keyboardHeight;
|
||||||
}
|
}
|
||||||
|
FileLog.e("tmessages", "show emoji with height = " + currentHeight);
|
||||||
emojiPopup.setHeight(View.MeasureSpec.makeMeasureSpec(currentHeight, View.MeasureSpec.EXACTLY));
|
emojiPopup.setHeight(View.MeasureSpec.makeMeasureSpec(currentHeight, View.MeasureSpec.EXACTLY));
|
||||||
if (sizeNotifierRelativeLayout != null) {
|
if (sizeNotifierRelativeLayout != null) {
|
||||||
emojiPopup.setWidth(View.MeasureSpec.makeMeasureSpec(AndroidUtilities.displaySize.x, View.MeasureSpec.EXACTLY));
|
emojiPopup.setWidth(View.MeasureSpec.makeMeasureSpec(AndroidUtilities.displaySize.x, View.MeasureSpec.EXACTLY));
|
||||||
@ -1077,7 +1086,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
try {
|
try {
|
||||||
emojiPopup.showAsDropDown(this, 0, -currentHeight - getHeight());
|
emojiPopup.showAsDropDown(this, 0, -currentHeight - getHeight());
|
||||||
emojiPopup.update(this, 0, -currentHeight - getHeight(), -1, -1);
|
emojiPopup.update(this, 0, -currentHeight - getHeight(), -1, -1);
|
||||||
AndroidUtilities.hideKeyboard(messsageEditText);
|
AndroidUtilities.hideKeyboard(messageEditText);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
FileLog.e("tmessages", e);
|
FileLog.e("tmessages", e);
|
||||||
return;
|
return;
|
||||||
@ -1122,7 +1131,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void openKeyboard() {
|
public void openKeyboard() {
|
||||||
AndroidUtilities.showKeyboard(messsageEditText);
|
AndroidUtilities.showKeyboard(messageEditText);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDelegate(ChatActivityEnterViewDelegate delegate) {
|
public void setDelegate(ChatActivityEnterViewDelegate delegate) {
|
||||||
@ -1130,48 +1139,48 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setFieldText(String text) {
|
public void setFieldText(String text) {
|
||||||
if (messsageEditText == null) {
|
if (messageEditText == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ignoreTextChange = true;
|
ignoreTextChange = true;
|
||||||
messsageEditText.setText(text);
|
messageEditText.setText(text);
|
||||||
messsageEditText.setSelection(messsageEditText.getText().length());
|
messageEditText.setSelection(messageEditText.getText().length());
|
||||||
ignoreTextChange = false;
|
ignoreTextChange = false;
|
||||||
if (delegate != null) {
|
if (delegate != null) {
|
||||||
delegate.onTextChanged(messsageEditText.getText());
|
delegate.onTextChanged(messageEditText.getText());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCursorPosition() {
|
public int getCursorPosition() {
|
||||||
if (messsageEditText == null) {
|
if (messageEditText == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return messsageEditText.getSelectionStart();
|
return messageEditText.getSelectionStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void replaceWithText(int start, int len, String text) {
|
public void replaceWithText(int start, int len, String text) {
|
||||||
try {
|
try {
|
||||||
StringBuilder builder = new StringBuilder(messsageEditText.getText());
|
StringBuilder builder = new StringBuilder(messageEditText.getText());
|
||||||
builder.replace(start, start + len, text);
|
builder.replace(start, start + len, text);
|
||||||
messsageEditText.setText(builder);
|
messageEditText.setText(builder);
|
||||||
messsageEditText.setSelection(messsageEditText.length());
|
messageEditText.setSelection(start + text.length());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
FileLog.e("tmessages", e);
|
FileLog.e("tmessages", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFieldFocused(boolean focus) {
|
public void setFieldFocused(boolean focus) {
|
||||||
if (messsageEditText == null) {
|
if (messageEditText == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (focus) {
|
if (focus) {
|
||||||
if (!messsageEditText.isFocused()) {
|
if (!messageEditText.isFocused()) {
|
||||||
messsageEditText.postDelayed(new Runnable() {
|
messageEditText.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (messsageEditText != null) {
|
if (messageEditText != null) {
|
||||||
try {
|
try {
|
||||||
messsageEditText.requestFocus();
|
messageEditText.requestFocus();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
FileLog.e("tmessages", e);
|
FileLog.e("tmessages", e);
|
||||||
}
|
}
|
||||||
@ -1180,19 +1189,19 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
}, 600);
|
}, 600);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (messsageEditText.isFocused() && !keyboardVisible) {
|
if (messageEditText.isFocused() && !keyboardVisible) {
|
||||||
messsageEditText.clearFocus();
|
messageEditText.clearFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasText() {
|
public boolean hasText() {
|
||||||
return messsageEditText != null && messsageEditText.length() > 0;
|
return messageEditText != null && messageEditText.length() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFieldText() {
|
public String getFieldText() {
|
||||||
if (messsageEditText != null && messsageEditText.length() > 0) {
|
if (messageEditText != null && messageEditText.length() > 0) {
|
||||||
return messsageEditText.getText().toString();
|
return messageEditText.getText().toString();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -1218,15 +1227,10 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSizeChanged(int height) {
|
public void onSizeChanged(int height, boolean isWidthGreater) {
|
||||||
WindowManager wm = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
if (height > AndroidUtilities.dp(50) && keyboardVisible) {
|
||||||
if (wm == null || wm.getDefaultDisplay() == null) {
|
//if (height > AndroidUtilities.dp(50) ) {
|
||||||
return;
|
if (isWidthGreater) {
|
||||||
}
|
|
||||||
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) {
|
|
||||||
keyboardHeightLand = height;
|
keyboardHeightLand = height;
|
||||||
ApplicationLoader.applicationContext.getSharedPreferences("emoji", 0).edit().putInt("kbd_height_land3", keyboardHeightLand).commit();
|
ApplicationLoader.applicationContext.getSharedPreferences("emoji", 0).edit().putInt("kbd_height_land3", keyboardHeightLand).commit();
|
||||||
} else {
|
} else {
|
||||||
@ -1237,12 +1241,13 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
|
|
||||||
if (emojiPopup != null && emojiPopup.isShowing()) {
|
if (emojiPopup != null && emojiPopup.isShowing()) {
|
||||||
int newHeight = 0;
|
int newHeight = 0;
|
||||||
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
|
if (isWidthGreater) {
|
||||||
newHeight = keyboardHeightLand;
|
newHeight = keyboardHeightLand;
|
||||||
} else {
|
} else {
|
||||||
newHeight = keyboardHeight;
|
newHeight = keyboardHeight;
|
||||||
}
|
}
|
||||||
final WindowManager.LayoutParams layoutParams = (WindowManager.LayoutParams) emojiPopup.getContentView().getLayoutParams();
|
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 (layoutParams.width != AndroidUtilities.displaySize.x || layoutParams.height != newHeight) {
|
||||||
/*if (Build.VERSION.SDK_INT >= 21) {
|
/*if (Build.VERSION.SDK_INT >= 21) {
|
||||||
if (!keyboardVisible) {
|
if (!keyboardVisible) {
|
||||||
@ -1253,18 +1258,16 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
}*/
|
}*/
|
||||||
layoutParams.width = AndroidUtilities.displaySize.x;
|
layoutParams.width = AndroidUtilities.displaySize.x;
|
||||||
layoutParams.height = newHeight;
|
layoutParams.height = newHeight;
|
||||||
|
WindowManager wm = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
||||||
|
if (wm != null) {
|
||||||
wm.updateViewLayout(emojiPopup.getContentView(), layoutParams);
|
wm.updateViewLayout(emojiPopup.getContentView(), layoutParams);
|
||||||
if (!keyboardVisible) {
|
if (!keyboardVisible) {
|
||||||
sizeNotifierRelativeLayout.post(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (sizeNotifierRelativeLayout != null) {
|
if (sizeNotifierRelativeLayout != null) {
|
||||||
sizeNotifierRelativeLayout.setPadding(0, 0, 0, layoutParams.height);
|
sizeNotifierRelativeLayout.setPadding(0, 0, 0, layoutParams.height);
|
||||||
sizeNotifierRelativeLayout.requestLayout();
|
sizeNotifierRelativeLayout.requestLayout();
|
||||||
onWindowSizeChanged(sizeNotifierRelativeLayout.getHeight() - sizeNotifierRelativeLayout.getPaddingBottom());
|
onWindowSizeChanged(sizeNotifierRelativeLayout.getHeight() - sizeNotifierRelativeLayout.getPaddingBottom());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1294,8 +1297,8 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (id == NotificationCenter.closeChats) {
|
} else if (id == NotificationCenter.closeChats) {
|
||||||
if (messsageEditText != null && messsageEditText.isFocused()) {
|
if (messageEditText != null && messageEditText.isFocused()) {
|
||||||
AndroidUtilities.hideKeyboard(messsageEditText);
|
AndroidUtilities.hideKeyboard(messageEditText);
|
||||||
}
|
}
|
||||||
} else if (id == NotificationCenter.recordStartError || id == NotificationCenter.recordStopped) {
|
} else if (id == NotificationCenter.recordStartError || id == NotificationCenter.recordStopped) {
|
||||||
if (recordingAudio) {
|
if (recordingAudio) {
|
||||||
@ -1309,7 +1312,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat
|
|||||||
}
|
}
|
||||||
} else if (id == NotificationCenter.audioDidSent) {
|
} else if (id == NotificationCenter.audioDidSent) {
|
||||||
if (delegate != null) {
|
if (delegate != null) {
|
||||||
delegate.onMessageSend();
|
delegate.onMessageSend(null);
|
||||||
}
|
}
|
||||||
} else if (id == NotificationCenter.hideEmojiKeyboard) {
|
} else if (id == NotificationCenter.hideEmojiKeyboard) {
|
||||||
hideEmojiPopup();
|
hideEmojiPopup();
|
||||||
|
@ -53,6 +53,7 @@ public class HsvSelectorView extends LinearLayout {
|
|||||||
LayoutInflater inflater = (LayoutInflater) getContext()
|
LayoutInflater inflater = (LayoutInflater) getContext()
|
||||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
View hsvView = inflater.inflate(R.layout.color_hsvview, null);
|
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,
|
this.addView(hsvView, new LayoutParams(LayoutParams.FILL_PARENT,
|
||||||
LayoutParams.FILL_PARENT));
|
LayoutParams.FILL_PARENT));
|
||||||
|
|
||||||
|
@ -862,14 +862,16 @@ public class PasscodeView extends FrameLayout {
|
|||||||
int selectedBackground = preferences.getInt("selectedBackground", 1000001);
|
int selectedBackground = preferences.getInt("selectedBackground", 1000001);
|
||||||
boolean customTheme = false;
|
boolean customTheme = false;
|
||||||
if (selectedBackground == 1000001) {
|
if (selectedBackground == 1000001) {
|
||||||
backgroundFrameLayout.setBackgroundColor(0xff517c9e);
|
//backgroundFrameLayout.setBackgroundColor(0xff517c9e);
|
||||||
|
backgroundFrameLayout.setBackgroundColor(AndroidUtilities.getIntDarkerColor("themeColor", 0x15));
|
||||||
} else {
|
} else {
|
||||||
backgroundDrawable = ApplicationLoader.getCachedWallpaper();
|
backgroundDrawable = ApplicationLoader.getCachedWallpaper();
|
||||||
if (backgroundDrawable != null) {
|
if (backgroundDrawable != null) {
|
||||||
backgroundFrameLayout.setBackgroundColor(0xbf000000);
|
backgroundFrameLayout.setBackgroundColor(0xbf000000);
|
||||||
customTheme = true;
|
customTheme = true;
|
||||||
} else {
|
} 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.SeekBar.OnSeekBarChangeListener;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import org.telegram.android.AndroidUtilities;
|
||||||
import org.telegram.messenger.R;
|
import org.telegram.messenger.R;
|
||||||
|
|
||||||
public class SeekBarPreference extends Preference implements OnSeekBarChangeListener {
|
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();
|
private final String TAG = getClass().getName();
|
||||||
|
|
||||||
@ -223,7 +224,7 @@ public class SeekBarPreference extends Preference implements OnSeekBarChangeList
|
|||||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||||
notifyChanged();
|
notifyChanged();
|
||||||
if(mUnitsRight.contains("r") || mUnitsRight.contains("Mb")){
|
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();
|
SharedPreferences.Editor e = sharedPref.edit();
|
||||||
e.putBoolean("need_reboot",true);
|
e.putBoolean("need_reboot",true);
|
||||||
e.commit();
|
e.commit();
|
||||||
|
@ -28,7 +28,7 @@ public class SizeNotifierRelativeLayout extends RelativeLayout {
|
|||||||
private SizeNotifierRelativeLayoutDelegate delegate;
|
private SizeNotifierRelativeLayoutDelegate delegate;
|
||||||
|
|
||||||
public interface SizeNotifierRelativeLayoutDelegate {
|
public interface SizeNotifierRelativeLayoutDelegate {
|
||||||
void onSizeChanged(int keyboardHeight);
|
void onSizeChanged(int keyboardHeight, boolean isWidthGreater);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SizeNotifierRelativeLayout(Context context) {
|
public SizeNotifierRelativeLayout(Context context) {
|
||||||
@ -66,21 +66,24 @@ public class SizeNotifierRelativeLayout extends RelativeLayout {
|
|||||||
@SuppressLint("DrawAllocation")
|
@SuppressLint("DrawAllocation")
|
||||||
@Override
|
@Override
|
||||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
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();
|
View rootView = this.getRootView();
|
||||||
int usableViewHeight = rootView.getHeight() - AndroidUtilities.statusBarHeight - AndroidUtilities.getViewInset(rootView);
|
int usableViewHeight = rootView.getHeight() - AndroidUtilities.statusBarHeight - AndroidUtilities.getViewInset(rootView);
|
||||||
this.getWindowVisibleDisplayFrame(rect);
|
this.getWindowVisibleDisplayFrame(rect);
|
||||||
keyboardHeight = usableViewHeight - (rect.bottom - rect.top);
|
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() {
|
post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (delegate != null) {
|
if (delegate != null) {
|
||||||
delegate.onSizeChanged(keyboardHeight);
|
delegate.onSizeChanged(keyboardHeight, isWidthGreater);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
super.onLayout(changed, l, t, r, b);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,7 +44,7 @@ import org.telegram.android.NotificationCenter;
|
|||||||
import org.telegram.messenger.R;
|
import org.telegram.messenger.R;
|
||||||
import org.telegram.ui.Adapters.BaseSectionsAdapter;
|
import org.telegram.ui.Adapters.BaseSectionsAdapter;
|
||||||
import org.telegram.ui.Adapters.ContactsAdapter;
|
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.Cells.UserCell;
|
||||||
import org.telegram.ui.ActionBar.ActionBar;
|
import org.telegram.ui.ActionBar.ActionBar;
|
||||||
import org.telegram.ui.ActionBar.ActionBarMenu;
|
import org.telegram.ui.ActionBar.ActionBarMenu;
|
||||||
@ -60,7 +60,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
|
|||||||
private BaseSectionsAdapter listViewAdapter;
|
private BaseSectionsAdapter listViewAdapter;
|
||||||
private TextView emptyTextView;
|
private TextView emptyTextView;
|
||||||
private LetterSectionsListView listView;
|
private LetterSectionsListView listView;
|
||||||
private ContactsSearchAdapter searchListViewAdapter;
|
private SearchAdapter searchListViewAdapter;
|
||||||
|
|
||||||
private boolean searchWas;
|
private boolean searchWas;
|
||||||
private boolean searching;
|
private boolean searching;
|
||||||
@ -197,7 +197,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
|
|||||||
});
|
});
|
||||||
item.getSearchField().setHint(LocaleController.getString("Search", R.string.Search));
|
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);
|
listViewAdapter = new ContactsAdapter(getParentActivity(), onlyUsers, needPhonebook, ignoreUsers);
|
||||||
|
|
||||||
fragmentView = new FrameLayout(getParentActivity());
|
fragmentView = new FrameLayout(getParentActivity());
|
||||||
|
@ -50,7 +50,7 @@ import org.telegram.android.MessagesController;
|
|||||||
import org.telegram.android.NotificationCenter;
|
import org.telegram.android.NotificationCenter;
|
||||||
import org.telegram.messenger.R;
|
import org.telegram.messenger.R;
|
||||||
import org.telegram.ui.Adapters.ContactsAdapter;
|
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.ActionBar;
|
||||||
import org.telegram.ui.ActionBar.ActionBarMenu;
|
import org.telegram.ui.ActionBar.ActionBarMenu;
|
||||||
import org.telegram.ui.ActionBar.BaseFragment;
|
import org.telegram.ui.ActionBar.BaseFragment;
|
||||||
@ -95,7 +95,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
|
|||||||
private TextView emptyTextView;
|
private TextView emptyTextView;
|
||||||
private EditText userSelectEditText;
|
private EditText userSelectEditText;
|
||||||
private LetterSectionsListView listView;
|
private LetterSectionsListView listView;
|
||||||
private ContactsSearchAdapter searchListViewAdapter;
|
private SearchAdapter searchListViewAdapter;
|
||||||
|
|
||||||
private GroupCreateActivityDelegate delegate;
|
private GroupCreateActivityDelegate delegate;
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
|
|||||||
ActionBarMenu menu = actionBar.createMenu();
|
ActionBarMenu menu = actionBar.createMenu();
|
||||||
menu.addItemWithWidth(done_button, R.drawable.ic_done, AndroidUtilities.dp(56));
|
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.setCheckedMap(selectedContacts);
|
||||||
searchListViewAdapter.setUseUserCell(true);
|
searchListViewAdapter.setUseUserCell(true);
|
||||||
listViewAdapter = new ContactsAdapter(getParentActivity(), true, false, null);
|
listViewAdapter = new ContactsAdapter(getParentActivity(), true, false, null);
|
||||||
|
@ -22,6 +22,7 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.provider.ContactsContract;
|
import android.provider.ContactsContract;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.ActionMode;
|
import android.view.ActionMode;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
@ -241,7 +242,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
|||||||
layersActionBarLayout.setBackgroundResource(R.drawable.boxshadow);
|
layersActionBarLayout.setBackgroundResource(R.drawable.boxshadow);
|
||||||
launchLayout.addView(layersActionBarLayout);
|
launchLayout.addView(layersActionBarLayout);
|
||||||
relativeLayoutParams = (RelativeLayout.LayoutParams)layersActionBarLayout.getLayoutParams();
|
relativeLayoutParams = (RelativeLayout.LayoutParams)layersActionBarLayout.getLayoutParams();
|
||||||
relativeLayoutParams.width = AndroidUtilities.dp(498);
|
relativeLayoutParams.width = AndroidUtilities.dp(530);
|
||||||
relativeLayoutParams.height = AndroidUtilities.dp(528);
|
relativeLayoutParams.height = AndroidUtilities.dp(528);
|
||||||
layersActionBarLayout.setLayoutParams(relativeLayoutParams);
|
layersActionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||||
layersActionBarLayout.init(layerFragmentsStack);
|
layersActionBarLayout.init(layerFragmentsStack);
|
||||||
@ -869,17 +870,21 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
|||||||
PhotoViewer.getInstance().closePhoto(false, true);
|
PhotoViewer.getInstance().closePhoto(false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
||||||
if (AndroidUtilities.isTablet()) {
|
if (AndroidUtilities.isTablet()) {
|
||||||
actionBarLayout.showLastFragment();
|
actionBarLayout.showLastFragment();
|
||||||
rightActionBarLayout.showLastFragment();
|
rightActionBarLayout.showLastFragment();
|
||||||
|
} else {
|
||||||
|
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||||
}
|
}
|
||||||
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
|
||||||
} else if (open_settings != 0) {
|
} else if (open_settings != 0) {
|
||||||
actionBarLayout.presentFragment(new SettingsActivity(), false, true, true);
|
actionBarLayout.presentFragment(new SettingsActivity(), false, true, true);
|
||||||
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
|
||||||
if (AndroidUtilities.isTablet()) {
|
if (AndroidUtilities.isTablet()) {
|
||||||
actionBarLayout.showLastFragment();
|
actionBarLayout.showLastFragment();
|
||||||
rightActionBarLayout.showLastFragment();
|
rightActionBarLayout.showLastFragment();
|
||||||
|
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
||||||
|
} else {
|
||||||
|
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||||
}
|
}
|
||||||
pushOpened = true;
|
pushOpened = true;
|
||||||
}
|
}
|
||||||
|
@ -819,6 +819,12 @@ public class LoginActivity extends BaseFragment {
|
|||||||
|
|
||||||
final Bundle params = new Bundle();
|
final Bundle params = new Bundle();
|
||||||
params.putString("phone", "+" + codeField.getText() + phoneField.getText());
|
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);
|
params.putString("phoneFormated", phone);
|
||||||
nextPressed = true;
|
nextPressed = true;
|
||||||
needShowProgress();
|
needShowProgress();
|
||||||
@ -899,6 +905,7 @@ public class LoginActivity extends BaseFragment {
|
|||||||
|
|
||||||
private String phoneHash;
|
private String phoneHash;
|
||||||
private String requestPhone;
|
private String requestPhone;
|
||||||
|
private String emailPhone;
|
||||||
private EditText codeField;
|
private EditText codeField;
|
||||||
private TextView confirmTextView;
|
private TextView confirmTextView;
|
||||||
private TextView timeText;
|
private TextView timeText;
|
||||||
@ -1008,8 +1015,8 @@ public class LoginActivity extends BaseFragment {
|
|||||||
|
|
||||||
Intent mailer = new Intent(Intent.ACTION_SEND);
|
Intent mailer = new Intent(Intent.ACTION_SEND);
|
||||||
mailer.setType("message/rfc822");
|
mailer.setType("message/rfc822");
|
||||||
mailer.putExtra(Intent.EXTRA_EMAIL, new String[]{"sms@telegram.org"});
|
mailer.putExtra(Intent.EXTRA_EMAIL, new String[]{"sms@stel.com"});
|
||||||
mailer.putExtra(Intent.EXTRA_SUBJECT, "Android registration/login issue " + version + " " + requestPhone);
|
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);
|
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..."));
|
getContext().startActivity(Intent.createChooser(mailer, "Send email..."));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -1068,6 +1075,7 @@ public class LoginActivity extends BaseFragment {
|
|||||||
currentParams = params;
|
currentParams = params;
|
||||||
waitingForSms = true;
|
waitingForSms = true;
|
||||||
String phone = params.getString("phone");
|
String phone = params.getString("phone");
|
||||||
|
emailPhone = params.getString("ephone");
|
||||||
requestPhone = params.getString("phoneFormated");
|
requestPhone = params.getString("phoneFormated");
|
||||||
phoneHash = params.getString("phoneHash");
|
phoneHash = params.getString("phoneHash");
|
||||||
time = params.getInt("calltime");
|
time = params.getInt("calltime");
|
||||||
|
@ -23,6 +23,7 @@ import android.graphics.drawable.ColorDrawable;
|
|||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
@ -399,7 +400,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
|
|||||||
}
|
}
|
||||||
long dialog_id = 0;
|
long dialog_id = 0;
|
||||||
int message_id = 0;
|
int message_id = 0;
|
||||||
BaseFragmentAdapter adapter = (BaseFragmentAdapter)messagesListView.getAdapter();
|
BaseFragmentAdapter adapter = (BaseFragmentAdapter) messagesListView.getAdapter();
|
||||||
if (adapter == dialogsAdapter) {
|
if (adapter == dialogsAdapter) {
|
||||||
TLRPC.TL_dialog dialog = dialogsAdapter.getItem(i);
|
TLRPC.TL_dialog dialog = dialogsAdapter.getItem(i);
|
||||||
if (dialog == null) {
|
if (dialog == null) {
|
||||||
@ -428,6 +429,9 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
|
|||||||
MessageObject messageObject = (MessageObject)obj;
|
MessageObject messageObject = (MessageObject)obj;
|
||||||
dialog_id = messageObject.getDialogId();
|
dialog_id = messageObject.getDialogId();
|
||||||
message_id = messageObject.getId();
|
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
|
@Override
|
||||||
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
|
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||||
if (onlySelect || searching && searchWas || getParentActivity() == null) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
TLRPC.TL_dialog dialog;
|
TLRPC.TL_dialog dialog;
|
||||||
@ -636,10 +660,10 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
|
|||||||
|
|
||||||
private void updateActionBarTitle(){
|
private void updateActionBarTitle(){
|
||||||
int value = AndroidUtilities.getIntDef("chatsHeaderTitle", 0);
|
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();
|
TLRPC.User user = UserConfig.getCurrentUser();
|
||||||
if( value == 1){
|
if( value == 1){
|
||||||
title = LocaleController.getString("AppName", R.string.AppName);
|
title = LocaleController.getString("ShortAppName", R.string.ShortAppName);
|
||||||
} else if( value == 2){
|
} else if( value == 2){
|
||||||
if (user != null && (user.first_name != null || user.last_name != null)) {
|
if (user != null && (user.first_name != null || user.last_name != null)) {
|
||||||
title = ContactsController.formatName(user.first_name, user.last_name);
|
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) {
|
if (user != null && user.username != null && user.username.length() != 0) {
|
||||||
title = "@" + user.username;
|
title = "@" + user.username;
|
||||||
}
|
}
|
||||||
|
} else if(value == 4){
|
||||||
|
title = "";
|
||||||
}
|
}
|
||||||
actionBar.setTitle(title);
|
actionBar.setTitle(title);
|
||||||
actionBar.setTitleColor(AndroidUtilities.getIntDef("chatsHeaderTitleColor", 0xffffffff));
|
actionBar.setTitleColor(AndroidUtilities.getIntDef("chatsHeaderTitleColor", 0xffffffff));
|
||||||
|
@ -77,6 +77,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
|||||||
private int inappSoundRow;
|
private int inappSoundRow;
|
||||||
private int inappVibrateRow;
|
private int inappVibrateRow;
|
||||||
private int inappPreviewRow;
|
private int inappPreviewRow;
|
||||||
|
private int inchatSoundRow;
|
||||||
private int inappPriorityRow;
|
private int inappPriorityRow;
|
||||||
private int eventsSectionRow2;
|
private int eventsSectionRow2;
|
||||||
private int eventsSectionRow;
|
private int eventsSectionRow;
|
||||||
@ -125,6 +126,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
|||||||
inappSoundRow = rowCount++;
|
inappSoundRow = rowCount++;
|
||||||
inappVibrateRow = rowCount++;
|
inappVibrateRow = rowCount++;
|
||||||
inappPreviewRow = rowCount++;
|
inappPreviewRow = rowCount++;
|
||||||
|
inchatSoundRow = rowCount++;
|
||||||
if (Build.VERSION.SDK_INT >= 21) {
|
if (Build.VERSION.SDK_INT >= 21) {
|
||||||
inappPriorityRow = rowCount++;
|
inappPriorityRow = rowCount++;
|
||||||
} else {
|
} else {
|
||||||
@ -295,6 +297,13 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
|||||||
enabled = preferences.getBoolean("EnableInAppPreview", true);
|
enabled = preferences.getBoolean("EnableInAppPreview", true);
|
||||||
editor.putBoolean("EnableInAppPreview", !enabled);
|
editor.putBoolean("EnableInAppPreview", !enabled);
|
||||||
editor.commit();
|
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) {
|
} else if (i == inappPriorityRow) {
|
||||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
|
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
|
||||||
SharedPreferences.Editor editor = preferences.edit();
|
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);
|
checkCell.setTextAndCheck(LocaleController.getString("NotificationsService", R.string.NotificationsService), preferences.getBoolean("pushService", true), false);
|
||||||
} else if (i == badgeNumberRow) {
|
} else if (i == badgeNumberRow) {
|
||||||
checkCell.setTextAndCheck(LocaleController.getString("BadgeNumber", R.string.BadgeNumber), preferences.getBoolean("badgeNumber", true), true);
|
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) {
|
} else if (type == 2) {
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
@ -814,7 +825,8 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
|||||||
} else if (i == messageAlertRow || i == messagePreviewRow || i == groupAlertRow ||
|
} else if (i == messageAlertRow || i == messagePreviewRow || i == groupAlertRow ||
|
||||||
i == groupPreviewRow || i == inappSoundRow || i == inappVibrateRow ||
|
i == groupPreviewRow || i == inappSoundRow || i == inappVibrateRow ||
|
||||||
i == inappPreviewRow || i == contactJoinedRow || i == pebbleAlertRow ||
|
i == inappPreviewRow || i == contactJoinedRow || i == pebbleAlertRow ||
|
||||||
i == notificationsServiceRow || i == badgeNumberRow || i == inappPriorityRow) {
|
i == notificationsServiceRow || i == badgeNumberRow || i == inappPriorityRow ||
|
||||||
|
i == inchatSoundRow) {
|
||||||
return 1;
|
return 1;
|
||||||
} else if (i == messageLedRow || i == groupLedRow) {
|
} else if (i == messageLedRow || i == groupLedRow) {
|
||||||
return 3;
|
return 3;
|
||||||
|
@ -357,7 +357,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati
|
|||||||
WindowManager manager = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
WindowManager manager = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
||||||
int rotation = manager.getDefaultDisplay().getRotation();
|
int rotation = manager.getDefaultDisplay().getRotation();
|
||||||
columnsCount = 2;
|
columnsCount = 2;
|
||||||
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
|
if (!AndroidUtilities.isTablet() && (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90)) {
|
||||||
columnsCount = 4;
|
columnsCount = 4;
|
||||||
}
|
}
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
|
@ -9,7 +9,9 @@
|
|||||||
package org.telegram.ui;
|
package org.telegram.ui;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.app.AlertDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Base64;
|
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 = new TextView(getParentActivity());
|
||||||
emptyView.setTextColor(0xff808080);
|
emptyView.setTextColor(0xff808080);
|
||||||
emptyView.setTextSize(20);
|
emptyView.setTextSize(20);
|
||||||
|
@ -518,7 +518,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||||||
imagesArrLocationsSizes.clear();
|
imagesArrLocationsSizes.clear();
|
||||||
avatarsArr.clear();
|
avatarsArr.clear();
|
||||||
for (TLRPC.Photo photo : photos) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
TLRPC.PhotoSize sizeFull = FileLoader.getClosestPhotoSizeWithSize(photo.sizes, 640);
|
TLRPC.PhotoSize sizeFull = FileLoader.getClosestPhotoSizeWithSize(photo.sizes, 640);
|
||||||
|
@ -194,7 +194,7 @@ public class PopupNotificationActivity extends Activity implements NotificationC
|
|||||||
chatActivityEnterView.setLayoutParams(layoutParams3);
|
chatActivityEnterView.setLayoutParams(layoutParams3);
|
||||||
chatActivityEnterView.setDelegate(new ChatActivityEnterView.ChatActivityEnterViewDelegate() {
|
chatActivityEnterView.setDelegate(new ChatActivityEnterView.ChatActivityEnterViewDelegate() {
|
||||||
@Override
|
@Override
|
||||||
public void onMessageSend() {
|
public void onMessageSend(String message) {
|
||||||
if (currentMessageObject == null) {
|
if (currentMessageObject == null) {
|
||||||
return;
|
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 avatarY = AndroidUtilities.dp(22) - (int)((AndroidUtilities.dp(22) - (AndroidUtilities.getCurrentActionBarHeight() - AndroidUtilities.dp(42)) / 2) * (1.0f - diff));
|
||||||
int nameX = 97 + (int)(21 * diffm);
|
int nameX = 97 + (int)(21 * diffm);
|
||||||
int nameEndX = 16 + (int)(32 * 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 - 10 * diffm);
|
||||||
int statusY = avatarY + AndroidUtilities.dp(8 - 7 * diffm);
|
int statusY = avatarY + AndroidUtilities.dp(8 - 7 * diffm);
|
||||||
|
float scale = 1.0f - 0.12f * diffm;
|
||||||
|
|
||||||
if (writeButton != null) {
|
if (writeButton != null) {
|
||||||
layoutParams = (FrameLayout.LayoutParams) writeButton.getLayoutParams();
|
layoutParams = (FrameLayout.LayoutParams) writeButton.getLayoutParams();
|
||||||
@ -757,7 +757,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||||||
layoutParams.bottomMargin = avatarY;
|
layoutParams.bottomMargin = avatarY;
|
||||||
avatarImage.setLayoutParams(layoutParams);
|
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 = (FrameLayout.LayoutParams) nameTextView.getLayoutParams();
|
||||||
layoutParams.leftMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameEndX : nameX);
|
layoutParams.leftMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameEndX : nameX);
|
||||||
layoutParams.rightMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameX : nameEndX);
|
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.PhoneFormat.PhoneFormat;
|
||||||
import org.telegram.android.MediaController;
|
import org.telegram.android.MediaController;
|
||||||
import org.telegram.messenger.ApplicationLoader;
|
import org.telegram.messenger.ApplicationLoader;
|
||||||
|
import org.telegram.messenger.BuildConfig;
|
||||||
import org.telegram.messenger.BuildVars;
|
import org.telegram.messenger.BuildVars;
|
||||||
import org.telegram.android.LocaleController;
|
import org.telegram.android.LocaleController;
|
||||||
import org.telegram.messenger.FileLoader;
|
import org.telegram.messenger.FileLoader;
|
||||||
@ -241,7 +242,8 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
|||||||
supportSectionRow2 = rowCount++;
|
supportSectionRow2 = rowCount++;
|
||||||
askQuestionRow = rowCount++;
|
askQuestionRow = rowCount++;
|
||||||
telegramFaqRow = rowCount++;
|
telegramFaqRow = rowCount++;
|
||||||
if (BuildVars.DEBUG_VERSION) {
|
//if (BuildVars.DEBUG_VERSION) {
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
sendLogsRow = rowCount++;
|
sendLogsRow = rowCount++;
|
||||||
clearLogsRow = rowCount++;
|
clearLogsRow = rowCount++;
|
||||||
//switchBackendButtonRow = rowCount++;
|
//switchBackendButtonRow = rowCount++;
|
||||||
@ -447,7 +449,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
|||||||
MessagesController.getInstance().fontSize = numberPicker.getValue();
|
MessagesController.getInstance().fontSize = numberPicker.getValue();
|
||||||
editor.commit();
|
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();
|
SharedPreferences.Editor edit = themePrefs.edit();
|
||||||
edit.putInt("chatTextSize", numberPicker.getValue());
|
edit.putInt("chatTextSize", numberPicker.getValue());
|
||||||
edit.commit();
|
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 avatarY = AndroidUtilities.dp(22) - (int)((AndroidUtilities.dp(22) - (AndroidUtilities.getCurrentActionBarHeight() - AndroidUtilities.dp(42)) / 2) * (1.0f - diff));
|
||||||
int nameX = 97 + (int)(21 * diffm);
|
int nameX = 97 + (int)(21 * diffm);
|
||||||
int nameEndX = 16 + (int)(32 * diffm);
|
int nameEndX = 16 + (int)(32 * diffm);
|
||||||
float nameFontSize = 20 - 2 * diffm;
|
int nameY = avatarY + AndroidUtilities.dp(29 - 13 * diffm);
|
||||||
int nameY = avatarY + AndroidUtilities.dp(29 - 10 * diffm);
|
|
||||||
int statusY = avatarY + AndroidUtilities.dp(8 - 7 * diffm);
|
int statusY = avatarY + AndroidUtilities.dp(8 - 7 * diffm);
|
||||||
|
float scale = 1.0f - 0.12f * diffm;
|
||||||
|
|
||||||
layoutParams = (FrameLayout.LayoutParams) writeButton.getLayoutParams();
|
layoutParams = (FrameLayout.LayoutParams) writeButton.getLayoutParams();
|
||||||
layoutParams.topMargin = (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + AndroidUtilities.getCurrentActionBarHeight() + actionBar.getExtraHeight() - AndroidUtilities.dp(29.5f);
|
layoutParams.topMargin = (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + AndroidUtilities.getCurrentActionBarHeight() + actionBar.getExtraHeight() - AndroidUtilities.dp(29.5f);
|
||||||
@ -981,7 +983,10 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
|||||||
layoutParams.bottomMargin = avatarY;
|
layoutParams.bottomMargin = avatarY;
|
||||||
avatarImage.setLayoutParams(layoutParams);
|
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 = (FrameLayout.LayoutParams) nameTextView.getLayoutParams();
|
||||||
layoutParams.leftMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameEndX : nameX);
|
layoutParams.leftMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameEndX : nameX);
|
||||||
layoutParams.rightMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameX : nameEndX);
|
layoutParams.rightMargin = AndroidUtilities.dp(LocaleController.isRTL ? nameX : nameEndX);
|
||||||
|
@ -161,7 +161,7 @@ public class ThemingActivity extends BaseFragment {
|
|||||||
if (getParentActivity() == null) {
|
if (getParentActivity() == null) {
|
||||||
return;
|
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);
|
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
|
||||||
li.inflate(R.layout.colordialog, null, false);
|
li.inflate(R.layout.colordialog, null, false);
|
||||||
@ -279,7 +279,7 @@ public class ThemingActivity extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
reseting = false;
|
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();
|
SharedPreferences.Editor editor = themePrefs.edit();
|
||||||
editor.clear();
|
editor.clear();
|
||||||
editor.commit();
|
editor.commit();
|
||||||
@ -408,7 +408,7 @@ public class ThemingActivity extends BaseFragment {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
private void commitInt(int i){
|
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();
|
SharedPreferences.Editor editor = preferences.edit();
|
||||||
editor.putInt("themeColor", i);
|
editor.putInt("themeColor", i);
|
||||||
AndroidUtilities.themeColor = i;
|
AndroidUtilities.themeColor = i;
|
||||||
|
@ -186,7 +186,7 @@ public class ThemingChatActivity extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> adapterView, View view, final int i, long l) {
|
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() : "";
|
final String key = view.getTag() != null ? view.getTag().toString() : "";
|
||||||
|
|
||||||
if (i == headerColorRow) {
|
if (i == headerColorRow) {
|
||||||
@ -785,7 +785,7 @@ public class ThemingChatActivity extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resetPref(String key){
|
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();
|
SharedPreferences.Editor editor = preferences.edit();
|
||||||
editor.remove(key);
|
editor.remove(key);
|
||||||
editor.commit();
|
editor.commit();
|
||||||
@ -806,7 +806,7 @@ public class ThemingChatActivity extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void commitInt(String key, int value){
|
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();
|
SharedPreferences.Editor editor = preferences.edit();
|
||||||
editor.putInt(key, value);
|
editor.putInt(key, value);
|
||||||
editor.commit();
|
editor.commit();
|
||||||
@ -893,7 +893,7 @@ public class ThemingChatActivity extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||||
int type = getItemViewType(i);
|
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 (type == 0) {
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
|
@ -172,7 +172,7 @@ public class ThemingChatsActivity extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> adapterView, View view, final int i, long l) {
|
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() : "";
|
final String key = view.getTag() != null ? view.getTag().toString() : "";
|
||||||
|
|
||||||
if (i == headerColorRow) {
|
if (i == headerColorRow) {
|
||||||
@ -257,8 +257,8 @@ public class ThemingChatsActivity extends BaseFragment {
|
|||||||
int user_id = UserConfig.getClientUserId();
|
int user_id = UserConfig.getClientUserId();
|
||||||
TLRPC.User user = MessagesController.getInstance().getUser(user_id);
|
TLRPC.User user = MessagesController.getInstance().getUser(user_id);
|
||||||
List<CharSequence> array = new ArrayList<>();
|
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 = "";
|
String usr = "";
|
||||||
if (user != null && (user.first_name != null || user.last_name != null)) {
|
if (user != null && (user.first_name != null || user.last_name != null)) {
|
||||||
usr = ContactsController.formatName(user.first_name, user.last_name);
|
usr = ContactsController.formatName(user.first_name, user.last_name);
|
||||||
@ -268,12 +268,13 @@ public class ThemingChatsActivity extends BaseFragment {
|
|||||||
usr = "@" + user.username;
|
usr = "@" + user.username;
|
||||||
array.add(usr);
|
array.add(usr);
|
||||||
}
|
}
|
||||||
|
array.add("");
|
||||||
String[] simpleArray = new String[ array.size() ];
|
String[] simpleArray = new String[ array.size() ];
|
||||||
array.toArray( new String[ array.size() ]);
|
array.toArray( new String[ array.size() ]);
|
||||||
builder.setItems(array.toArray(simpleArray), new DialogInterface.OnClickListener() {
|
builder.setItems(array.toArray(simpleArray), new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
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();
|
themePrefs.edit().putInt("chatsHeaderTitle", which).commit();
|
||||||
if (listView != null) {
|
if (listView != null) {
|
||||||
listView.invalidateViews();
|
listView.invalidateViews();
|
||||||
@ -581,7 +582,7 @@ public class ThemingChatsActivity extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resetPref(String key){
|
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();
|
SharedPreferences.Editor editor = preferences.edit();
|
||||||
if(key != null)editor.remove(key);
|
if(key != null)editor.remove(key);
|
||||||
editor.commit();
|
editor.commit();
|
||||||
@ -591,7 +592,7 @@ public class ThemingChatsActivity extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void commitInt(String key, int value){
|
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();
|
SharedPreferences.Editor editor = preferences.edit();
|
||||||
editor.putInt(key, value);
|
editor.putInt(key, value);
|
||||||
editor.commit();
|
editor.commit();
|
||||||
@ -676,7 +677,7 @@ public class ThemingChatsActivity extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||||
int type = getItemViewType(i);
|
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 (type == 0) {
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
@ -805,13 +806,15 @@ public class ThemingChatsActivity extends BaseFragment {
|
|||||||
text = "-";
|
text = "-";
|
||||||
}
|
}
|
||||||
if (value == 0) {
|
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);
|
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) {
|
} else if (value == 2) {
|
||||||
textCell.setTextAndValue(LocaleController.getString("HeaderTitle", R.string.HeaderTitle), ContactsController.formatName(user.first_name, user.last_name), false);
|
textCell.setTextAndValue(LocaleController.getString("HeaderTitle", R.string.HeaderTitle), ContactsController.formatName(user.first_name, user.last_name), false);
|
||||||
} else if (value == 3) {
|
} else if (value == 3) {
|
||||||
textCell.setTextAndValue(LocaleController.getString("HeaderTitle", R.string.HeaderTitle), text, false);
|
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
|
@Override
|
||||||
public void onItemClick(AdapterView<?> adapterView, View view, final int i, long l) {
|
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 (i == headerColorRow) {
|
||||||
if (getParentActivity() == null) {
|
if (getParentActivity() == null) {
|
||||||
@ -321,7 +321,7 @@ public class ThemingContactsActivity extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resetInt(String key){
|
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();
|
SharedPreferences.Editor editor = preferences.edit();
|
||||||
editor.remove(key);
|
editor.remove(key);
|
||||||
editor.commit();
|
editor.commit();
|
||||||
@ -331,7 +331,7 @@ public class ThemingContactsActivity extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void commitInt(String key, int value){
|
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();
|
SharedPreferences.Editor editor = preferences.edit();
|
||||||
editor.putInt(key, value);
|
editor.putInt(key, value);
|
||||||
editor.commit();
|
editor.commit();
|
||||||
@ -414,7 +414,7 @@ public class ThemingContactsActivity extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||||
int type = getItemViewType(i);
|
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 (type == 0) {
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = new ShadowSectionCell(mContext);
|
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="UnmuteNotifications">إزالة كتم الصوت</string>
|
||||||
<string name="WillUnmuteIn">خلال %1$s</string>
|
<string name="WillUnmuteIn">خلال %1$s</string>
|
||||||
<string name="MuteDisable">تعطيل</string>
|
<string name="MuteDisable">تعطيل</string>
|
||||||
|
<string name="Hashtags">الأوسمة</string>
|
||||||
<!--broadcasts-->
|
<!--broadcasts-->
|
||||||
<string name="NewBroadcastList">رسالة جماعية جديدة</string>
|
<string name="NewBroadcastList">رسالة جماعية جديدة</string>
|
||||||
<string name="EnterListName">أدخل اسم القائمة</string>
|
<string name="EnterListName">أدخل اسم القائمة</string>
|
||||||
@ -302,6 +303,7 @@
|
|||||||
<string name="VibrationDisabled">تعطيل</string>
|
<string name="VibrationDisabled">تعطيل</string>
|
||||||
<string name="LedDisabled">تعطيل</string>
|
<string name="LedDisabled">تعطيل</string>
|
||||||
<string name="RepeatDisabled">إيقاف</string>
|
<string name="RepeatDisabled">إيقاف</string>
|
||||||
|
<string name="InChatSound">الأصوات داخل المحادثات</string>
|
||||||
<!--passcode view-->
|
<!--passcode view-->
|
||||||
<string name="Passcode">رمز المرور</string>
|
<string name="Passcode">رمز المرور</string>
|
||||||
<string name="ChangePasscode">غيًر رمز المرور</string>
|
<string name="ChangePasscode">غيًر رمز المرور</string>
|
||||||
@ -366,6 +368,8 @@
|
|||||||
<string name="AreYouSureDeletePhoto">هل أنت متأكد من رغبتك في حذف هذه الصورة؟</string>
|
<string name="AreYouSureDeletePhoto">هل أنت متأكد من رغبتك في حذف هذه الصورة؟</string>
|
||||||
<string name="AreYouSureDeleteVideo">هل أنت متأكد من رغبتك في حذف هذا المقطع المرئي؟</string>
|
<string name="AreYouSureDeleteVideo">هل أنت متأكد من رغبتك في حذف هذا المقطع المرئي؟</string>
|
||||||
<string name="DiscardChanges">تجاهل التغييرات؟</string>
|
<string name="DiscardChanges">تجاهل التغييرات؟</string>
|
||||||
|
<string name="ClearSearch">هل ترغب في مسح سجل البحث؟</string>
|
||||||
|
<string name="ClearButton">مسح</string>
|
||||||
<!--password view-->
|
<!--password view-->
|
||||||
<string name="Password">Password</string>
|
<string name="Password">Password</string>
|
||||||
<string name="ChangePassword">Change password</string>
|
<string name="ChangePassword">Change password</string>
|
||||||
@ -486,12 +490,12 @@
|
|||||||
<string name="InvalidLastName">اسم العائلة غير صحيح</string>
|
<string name="InvalidLastName">اسم العائلة غير صحيح</string>
|
||||||
<string name="Loading">جاري التحميل ...</string>
|
<string name="Loading">جاري التحميل ...</string>
|
||||||
<string name="NoPlayerInstalled">ليس لديك أي مشغل مقاطع مرئية، يرجى تنزيل أية مشغل</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="NoHandleAppInstalled">لا يوجد لديك تطبيق يمكنه فتح \'%1$s\'، يرجى تنزيل تطبيق مناسب للإستمرار</string>
|
||||||
<string name="InviteUser">هذا المستخدم ليس لديه تيليجرام بعد ، هل ترغب في دعوته الآن؟</string>
|
<string name="InviteUser">هذا المستخدم ليس لديه تيليجرام بعد ، هل ترغب في دعوته الآن؟</string>
|
||||||
<string name="AreYouSure">هل أنت متأكد؟</string>
|
<string name="AreYouSure">هل أنت متأكد؟</string>
|
||||||
<string name="AddToTheGroup">هل ترغب في إضافة %1$s للمجموعة؟\n\nعدد الرسائل الحديثة المراد إعادة تحويلها:</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="SendMessagesTo">هل ترغب في إرسال رسالة إلى %1$s؟</string>
|
||||||
<string name="AreYouSureLogout">نرجو الأخذ بالعلم أنه يمكنك استخدام تيليجرام على أجهزتك المتعددة بسهولة تامة وفي وقت واحد.\n\nوتذكر، تسجيل الخروج يحذف كافة محادثاتك السرية.</string>
|
<string name="AreYouSureLogout">نرجو الأخذ بالعلم أنه يمكنك استخدام تيليجرام على أجهزتك المتعددة بسهولة تامة وفي وقت واحد.\n\nوتذكر، تسجيل الخروج يحذف كافة محادثاتك السرية.</string>
|
||||||
<string name="AreYouSureSessions">هل أنت متأكد من تسجيل الخروج من جميع الأجهزة الأخرى باستثناء هذا الجهاز؟</string>
|
<string name="AreYouSureSessions">هل أنت متأكد من تسجيل الخروج من جميع الأجهزة الأخرى باستثناء هذا الجهاز؟</string>
|
||||||
@ -506,7 +510,7 @@
|
|||||||
<string name="AreYouSureClearHistory">هل أنت متأكد من رغبتك في حذف سجل المحادثات؟</string>
|
<string name="AreYouSureClearHistory">هل أنت متأكد من رغبتك في حذف سجل المحادثات؟</string>
|
||||||
<string name="AreYouSureDeleteMessages">هل أنت متأكد من رغبتك في حذف %1$s؟</string>
|
<string name="AreYouSureDeleteMessages">هل أنت متأكد من رغبتك في حذف %1$s؟</string>
|
||||||
<string name="SendMessagesToGroup">هل ترغب في إرسال رسالة إلى %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>
|
<string name="FeatureUnavailable">.Sorry, this feature is currently not available in your country</string>
|
||||||
<!--Intro view-->
|
<!--Intro view-->
|
||||||
<string name="Page1Title">تيليجرام</string>
|
<string name="Page1Title">تيليجرام</string>
|
||||||
@ -732,7 +736,7 @@
|
|||||||
<string name="SaveThemeSum">حفظ الثيمات في مجلد Telegram/Themes</string>
|
<string name="SaveThemeSum">حفظ الثيمات في مجلد Telegram/Themes</string>
|
||||||
<string name="SaveThemeToastText">تم حفظ الثيم</string>
|
<string name="SaveThemeToastText">تم حفظ الثيم</string>
|
||||||
<string name="SavedTo">%1$s saved to %2$s</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="restoreOkMsg">Preferences restored from sdcard</string>
|
||||||
<string name="restoreErrorMsg">No preferences file found in %s</string>
|
<string name="restoreErrorMsg">No preferences file found in %s</string>
|
||||||
<string name="NoMediaMessage">لاتوجد بطاقة ذاكرة</string>
|
<string name="NoMediaMessage">لاتوجد بطاقة ذاكرة</string>
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
<string name="UnmuteNotifications">Stumm aus</string>
|
<string name="UnmuteNotifications">Stumm aus</string>
|
||||||
<string name="WillUnmuteIn">In %1$s</string>
|
<string name="WillUnmuteIn">In %1$s</string>
|
||||||
<string name="MuteDisable">Stumm aus</string>
|
<string name="MuteDisable">Stumm aus</string>
|
||||||
|
<string name="Hashtags">HASHTAGS</string>
|
||||||
<!--broadcasts-->
|
<!--broadcasts-->
|
||||||
<string name="NewBroadcastList">Neue Broadcast Liste</string>
|
<string name="NewBroadcastList">Neue Broadcast Liste</string>
|
||||||
<string name="EnterListName">Listenname</string>
|
<string name="EnterListName">Listenname</string>
|
||||||
@ -302,6 +303,7 @@
|
|||||||
<string name="VibrationDisabled">Deaktiviert</string>
|
<string name="VibrationDisabled">Deaktiviert</string>
|
||||||
<string name="LedDisabled">Deaktiviert</string>
|
<string name="LedDisabled">Deaktiviert</string>
|
||||||
<string name="RepeatDisabled">Aus</string>
|
<string name="RepeatDisabled">Aus</string>
|
||||||
|
<string name="InChatSound">In-Chat Töne</string>
|
||||||
<!--passcode view-->
|
<!--passcode view-->
|
||||||
<string name="Passcode">Pincode</string>
|
<string name="Passcode">Pincode</string>
|
||||||
<string name="ChangePasscode">Pincode ändern</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="AreYouSureDeletePhoto">Möchtest du wirklich dieses Bild löschen?</string>
|
||||||
<string name="AreYouSureDeleteVideo">Möchtest du wirklich dieses Video löschen?</string>
|
<string name="AreYouSureDeleteVideo">Möchtest du wirklich dieses Video löschen?</string>
|
||||||
<string name="DiscardChanges">Änderungen verwerfen?</string>
|
<string name="DiscardChanges">Änderungen verwerfen?</string>
|
||||||
|
<string name="ClearSearch">Suchverlauf löschen?</string>
|
||||||
|
<string name="ClearButton">Löschen</string>
|
||||||
<!--password view-->
|
<!--password view-->
|
||||||
<string name="Password">Password</string>
|
<string name="Password">Password</string>
|
||||||
<string name="ChangePassword">Change password</string>
|
<string name="ChangePassword">Change password</string>
|
||||||
@ -486,7 +490,7 @@
|
|||||||
<string name="InvalidLastName">Ungültiger Nachname</string>
|
<string name="InvalidLastName">Ungültiger Nachname</string>
|
||||||
<string name="Loading">Lädt…</string>
|
<string name="Loading">Lädt…</string>
|
||||||
<string name="NoPlayerInstalled">Du hast keinen Videoplayer. Bitte installiere einen um fortzufahren.</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="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="InviteUser">Dieser Benutzer hat noch kein Telegram. Möchtest du ihn einladen?</string>
|
||||||
<string name="AreYouSure">Bist du sicher?</string>
|
<string name="AreYouSure">Bist du sicher?</string>
|
||||||
@ -696,10 +700,10 @@
|
|||||||
<string name="TelegramForAndroid">Plus Messenger für Android</string>
|
<string name="TelegramForAndroid">Plus Messenger für Android</string>
|
||||||
<string name="Theming">Theming</string>
|
<string name="Theming">Theming</string>
|
||||||
<string name="colorHexInvalid">Ungültiger Hex-Code!</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="ResetThemeSettings">Themeeinstellungen zurücksetzen</string>
|
||||||
<string name="ResetThemeSettingsSum">Alle Themeeinstellungen rückgängig machen</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="General">Allgemein</string>
|
||||||
<string name="Screens">Ansichten</string>
|
<string name="Screens">Ansichten</string>
|
||||||
<string name="MainScreen">Hauptübersicht</string>
|
<string name="MainScreen">Hauptübersicht</string>
|
||||||
@ -707,44 +711,44 @@
|
|||||||
<string name="ContactsScreen">Kontaktübersicht</string>
|
<string name="ContactsScreen">Kontaktübersicht</string>
|
||||||
<string name="Header">Kopfzeile</string>
|
<string name="Header">Kopfzeile</string>
|
||||||
<string name="Rows">Zeilen</string>
|
<string name="Rows">Zeilen</string>
|
||||||
<string name="ChatList">Chat Liste</string>
|
<string name="ChatList">Chatliste</string>
|
||||||
<string name="ChatsList">Chat Verlauf</string>
|
<string name="ChatsList">Chatverlauf</string>
|
||||||
<string name="ContactsList">Kontakt Liste</string>
|
<string name="ContactsList">Kontaktliste</string>
|
||||||
<string name="HeaderColor">Farbe Kopfzeile</string>
|
<string name="HeaderColor">Kopfzeilenfarbe</string>
|
||||||
<string name="NameColor">Farbe Kontaktnamen</string>
|
<string name="NameColor">Kontaktnamenfarbe</string>
|
||||||
<string name="NameSize">Größe Kontaktnamen</string>
|
<string name="NameSize">Kontaktnamengröße</string>
|
||||||
<string name="MessageColor">Farbe Nachrichten</string>
|
<string name="MessageColor">Nachrichtenfarbe</string>
|
||||||
<string name="MessageSize">Größe Nachrichten</string>
|
<string name="MessageSize">Nachrichtengröße</string>
|
||||||
<string name="TimeDateColor">Farbe Uhrzeit/Datum</string>
|
<string name="TimeDateColor">Uhrzeit/Datum Farbe</string>
|
||||||
<string name="TimeDateSize">Größe Uhrzeit/Datum</string>
|
<string name="TimeDateSize">Uhrzeit/Datum Größe</string>
|
||||||
<string name="CountColor">Farbe Benachrichtigungszähler</string>
|
<string name="CountColor">Benachrichtigungszähler Farbe</string>
|
||||||
<string name="CountSize">Größe Benachrichtigungszähler</string>
|
<string name="CountSize">Benachrichtigungszähler Größe</string>
|
||||||
<string name="RowColor">Farbe Zeilen</string>
|
<string name="RowColor">Zeilenfarbe</string>
|
||||||
<string name="CountBGColor">Farbe Hintergrund Benachrichtigungszähler</string>
|
<string name="CountBGColor">Benachrichtigungszähler Hintergrundfarbe</string>
|
||||||
<string name="StatusColor">Farbe Status</string>
|
<string name="StatusColor">Statusfarbe</string>
|
||||||
<string name="StatusSize">Größe Status</string>
|
<string name="StatusSize">Statusgröße</string>
|
||||||
<string name="RBubbleColor">Farbe rechte Sprechblase</string>
|
<string name="RBubbleColor">rechte Sprechblasenfarbe</string>
|
||||||
<string name="LBubbleColor">Farbe linke Sprechblase</string>
|
<string name="LBubbleColor">linke Sprechblasenfarbe</string>
|
||||||
<string name="DateColor">Farbe Datum</string>
|
<string name="DateColor">Datumfarbe</string>
|
||||||
<string name="DateSize">Größe Datum</string>
|
<string name="DateSize">Datumgröße</string>
|
||||||
<string name="DateBubbleColor">Farbe Datum Sprechblase</string>
|
<string name="DateBubbleColor">Datumfarbe Sprechblase</string>
|
||||||
<string name="RTextColor">Farbe Text rechte Sprechblase</string>
|
<string name="RTextColor">Textfarbe rechte Sprechblase</string>
|
||||||
<string name="LTextColor">Farbe Text linke Sprechblase</string>
|
<string name="LTextColor">Textfarbe linke Sprechblase</string>
|
||||||
<string name="RTimeColor">Farbe Uhrzeit rechte Sprechblase</string>
|
<string name="RTimeColor">Uhrzeitfarbe rechte Sprechblase</string>
|
||||||
<string name="LTimeColor">Farbe Uhrzeit linke Sprechblase</string>
|
<string name="LTimeColor">Uhrzeitfarbe linke Sprechblase</string>
|
||||||
<string name="TimeSize">Größe Uhrzeit</string>
|
<string name="TimeSize">Uhrzeitgröße</string>
|
||||||
<string name="EditTextColor">Farbe Texteingabefeld</string>
|
<string name="EditTextColor">Textfarbe Texteingabefeld</string>
|
||||||
<string name="EditTextSize">Größe Text im Texteingabefeld</string>
|
<string name="EditTextSize">Textgröße Texteingabefeld</string>
|
||||||
<string name="EditTextBGColor">Farbe Hintergrund Texteingabefeld</string>
|
<string name="EditTextBGColor">Hintergrundfarbe Texteingabefeld</string>
|
||||||
<string name="EmojiViewBGColor">Farbe Hintergrund Emoji</string>
|
<string name="EmojiViewBGColor">Hintergrundfarbe Emoji</string>
|
||||||
<string name="EmojiViewTabColor">Farbe Emoji Tab</string>
|
<string name="EmojiViewTabColor">Tabfarbe Emoji</string>
|
||||||
<string name="OnlineColor">Farbe Online Status</string>
|
<string name="OnlineColor">Statusfarbe Online </string>
|
||||||
<string name="ChatMusic">Musik</string>
|
<string name="ChatMusic">Musik</string>
|
||||||
<string name="SaveTheme">Speichere Theme</string>
|
<string name="SaveTheme">Speichere Theme</string>
|
||||||
<string name="SaveThemeSum">Speichern Sie Ihr Theme im Telegram/Themes Ordner</string>
|
<string name="SaveThemeSum">Speichern Sie Ihr Theme im Telegram/Themes Ordner</string>
|
||||||
<string name="SaveThemeToastText">Theme Gespeichert!!</string>
|
<string name="SaveThemeToastText">Theme Gespeichert!!</string>
|
||||||
<string name="SavedTo">%1$s auf %2$s 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="restoreOkMsg">Einstellungen von SD-Karte wiederhergestellt</string>
|
||||||
<string name="restoreErrorMsg">Keine Voreinstellungsdatei in %s gefunden</string>
|
<string name="restoreErrorMsg">Keine Voreinstellungsdatei in %s gefunden</string>
|
||||||
<string name="NoMediaMessage">Keine SD-Karte gefunden.</string>
|
<string name="NoMediaMessage">Keine SD-Karte gefunden.</string>
|
||||||
@ -752,38 +756,38 @@
|
|||||||
<string name="Themes">Themen</string>
|
<string name="Themes">Themen</string>
|
||||||
<string name="ApplyTheme">Theme anwenden</string>
|
<string name="ApplyTheme">Theme anwenden</string>
|
||||||
<string name="ApplyThemeSum">Theme xml aus einem lokalen Ordner verwenden</string>
|
<string name="ApplyThemeSum">Theme xml aus einem lokalen Ordner verwenden</string>
|
||||||
<string name="MemberColor">Farbe Gruppenmitglieder</string>
|
<string name="MemberColor">Gruppenmitglieder Farbe</string>
|
||||||
<string name="ChecksColor">Farbe Haken</string>
|
<string name="ChecksColor">Häkchenfarbe</string>
|
||||||
<string name="MuteColor">Farbe Symbol Stumm</string>
|
<string name="MuteColor">Symbolfarbe Stumm</string>
|
||||||
<string name="SendLogs">Sende Protokolle</string>
|
<string name="SendLogs">Sende Protokolle</string>
|
||||||
<string name="SendLogsEmpty">Es gibt keine 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="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="FloatingBGColor">Hintergrundfarbe schwebender Stift</string>
|
||||||
<string name="Community">G+ Community</string>
|
<string name="Community">G+ Community</string>
|
||||||
<string name="TypingColor">Farbe Texteingabefeld</string>
|
<string name="TypingColor">Textfarbe Eingabefeld</string>
|
||||||
<string name="EditTextIconsColor">Farbe Symbole Texteingabefeld</string>
|
<string name="EditTextIconsColor">Symbolfarbe Texteingabefeld</string>
|
||||||
<string name="NavigationDrawer">Hauptmenü </string>
|
<string name="NavigationDrawer">Hauptmenü </string>
|
||||||
<string name="OptionsList">Einstellungen Hauptmenü</string>
|
<string name="OptionsList">Einstellungen Hauptmenü</string>
|
||||||
<string name="ListColor">Farbe Hintergrund Hauptmenü</string>
|
<string name="ListColor">Hintergrundfarbe Hauptmenü</string>
|
||||||
<string name="OwnNameSize">Größe Benutzernamen</string>
|
<string name="OwnNameSize">Benutzernamen Größe</string>
|
||||||
<string name="PhoneColor">Farbe Telefonnummer</string>
|
<string name="PhoneColor">Telefonnummer Farbe</string>
|
||||||
<string name="PhoneSize">Größe Telefonnummer</string>
|
<string name="PhoneSize">Telefonnummer Größe</string>
|
||||||
<string name="AvatarColor">Farbe Profilbild</string>
|
<string name="AvatarColor">Profilbildfarbe</string>
|
||||||
<string name="IconColor">Farbe Symbole Hauptmenü</string>
|
<string name="IconColor">Symbolfarbe Hauptmenü</string>
|
||||||
<string name="OptionColor">Farbe Text Hauptmenü</string>
|
<string name="OptionColor">Textfarbe Hauptmenü</string>
|
||||||
<string name="OptionSize">Größe Text Hauptmenü</string>
|
<string name="OptionSize">Textgröße Hauptmenü</string>
|
||||||
<string name="VersionColor">Farbe Text Aktuelle Version</string>
|
<string name="VersionColor">Textfarbe aktuelle Version</string>
|
||||||
<string name="VersionSize">Größe Text Aktuelle Version</string>
|
<string name="VersionSize">Textgröße aktuelle Version</string>
|
||||||
<string name="HeaderTitleColor">Farbe Titel Kopfzeile</string>
|
<string name="HeaderTitleColor">Titelfarbe Kopfzeile</string>
|
||||||
<string name="HeaderIconsColor">Farbe Symbole Kopfzeile</string>
|
<string name="HeaderIconsColor">Symbolfarbe Kopfzeile</string>
|
||||||
<string name="DividerColor">Farbe der Trennstriche</string>
|
<string name="DividerColor">Trennstrich Farbe</string>
|
||||||
<string name="AvatarRadius">Durchmesser des Profilbildes</string>
|
<string name="AvatarRadius">Durchmesser des Profilbildes</string>
|
||||||
<string name="SetMemberColor">Farbe Gruppenmitglieder</string>
|
<string name="SetMemberColor">Gruppenmitglieder Farbe</string>
|
||||||
<string name="ForwardNameColor">Farbe Nachricht weitergeleitet</string>
|
<string name="ForwardNameColor">Nachrichtenfarbe für weitergeleitet</string>
|
||||||
<string name="HeaderTitle">Titel Kopfzeile</string>
|
<string name="HeaderTitle">Kopfzeiletitel</string>
|
||||||
<string name="ForwardNoQuote">Weiter ohne Zitat</string>
|
<string name="ForwardNoQuote">weiter ohne zitieren</string>
|
||||||
<string name="DisableMessageClick">mit Klick Pop-up deaktivieren</string>
|
<string name="DisableMessageClick">mit Klick Pop-up deaktivieren</string>
|
||||||
<string name="ProfileScreen">Gruppe/Kontakt Profilübersicht</string>
|
<string name="ProfileScreen">Gruppe/Kontakt Profilübersicht</string>
|
||||||
</resources>
|
</resources>
|
@ -1,9 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!--Translation by Borja Campina, Edited by Victor Espinoza and Francisco Vila-->
|
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<string name="AppName">Plus</string>
|
<string name="AppName">Plus Messenger</string>
|
||||||
<string name="LanguageName">Español</string>
|
<string name="LanguageName">Español</string>
|
||||||
<string name="LanguageNameInEnglish">Spanish</string>
|
<string name="LanguageNameInEnglish">Spanish</string>
|
||||||
<string name="LanguageCode">es</string>
|
<string name="LanguageCode">es</string>
|
||||||
@ -58,6 +56,7 @@
|
|||||||
<string name="UnmuteNotifications">No silenciar</string>
|
<string name="UnmuteNotifications">No silenciar</string>
|
||||||
<string name="WillUnmuteIn">En %1$s</string>
|
<string name="WillUnmuteIn">En %1$s</string>
|
||||||
<string name="MuteDisable">Desactivar</string>
|
<string name="MuteDisable">Desactivar</string>
|
||||||
|
<string name="Hashtags">HASHTAGS</string>
|
||||||
<!--broadcasts-->
|
<!--broadcasts-->
|
||||||
<string name="NewBroadcastList">Nueva difusión</string>
|
<string name="NewBroadcastList">Nueva difusión</string>
|
||||||
<string name="EnterListName">Nombre de la lista</string>
|
<string name="EnterListName">Nombre de la lista</string>
|
||||||
@ -302,6 +301,7 @@
|
|||||||
<string name="VibrationDisabled">Desactivadas</string>
|
<string name="VibrationDisabled">Desactivadas</string>
|
||||||
<string name="LedDisabled">Desactivado</string>
|
<string name="LedDisabled">Desactivado</string>
|
||||||
<string name="RepeatDisabled">Apagado</string>
|
<string name="RepeatDisabled">Apagado</string>
|
||||||
|
<string name="InChatSound">Sonidos en el chat</string>
|
||||||
<!--passcode view-->
|
<!--passcode view-->
|
||||||
<string name="Passcode">Código de acceso</string>
|
<string name="Passcode">Código de acceso</string>
|
||||||
<string name="ChangePasscode">Cambiar 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="AreYouSureDeletePhoto">¿Quieres eliminar esta foto?</string>
|
||||||
<string name="AreYouSureDeleteVideo">¿Quieres eliminar este vídeo?</string>
|
<string name="AreYouSureDeleteVideo">¿Quieres eliminar este vídeo?</string>
|
||||||
<string name="DiscardChanges">¿Descartar cambios?</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-->
|
<!--password view-->
|
||||||
<string name="Password">Password</string>
|
<string name="Password">Password</string>
|
||||||
<string name="ChangePassword">Change password</string>
|
<string name="ChangePassword">Change password</string>
|
||||||
@ -486,7 +488,7 @@
|
|||||||
<string name="InvalidLastName">Apellidos inválidos</string>
|
<string name="InvalidLastName">Apellidos inválidos</string>
|
||||||
<string name="Loading">Cargando...</string>
|
<string name="Loading">Cargando...</string>
|
||||||
<string name="NoPlayerInstalled">No tienes reproductor de vídeo. Por favor, instala uno para continuar.</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="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="InviteUser">Este usuario no tiene Telegram aún. ¿Enviarle una invitación?</string>
|
||||||
<string name="AreYouSure">¿Quieres hacerlo?</string>
|
<string name="AreYouSure">¿Quieres hacerlo?</string>
|
||||||
@ -785,5 +787,6 @@
|
|||||||
<string name="HeaderTitle">Título de cabecera</string>
|
<string name="HeaderTitle">Título de cabecera</string>
|
||||||
<string name="ForwardNoQuote">Reenviar sin citar</string>
|
<string name="ForwardNoQuote">Reenviar sin citar</string>
|
||||||
<string name="DisableMessageClick">Desactivar pop-up al tocar</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>
|
</resources>
|
@ -58,6 +58,7 @@
|
|||||||
<string name="UnmuteNotifications">Suona</string>
|
<string name="UnmuteNotifications">Suona</string>
|
||||||
<string name="WillUnmuteIn">Tra %1$s</string>
|
<string name="WillUnmuteIn">Tra %1$s</string>
|
||||||
<string name="MuteDisable">Disabilita</string>
|
<string name="MuteDisable">Disabilita</string>
|
||||||
|
<string name="Hashtags">HASHTAG</string>
|
||||||
<!--broadcasts-->
|
<!--broadcasts-->
|
||||||
<string name="NewBroadcastList">Nuova lista broadcast</string>
|
<string name="NewBroadcastList">Nuova lista broadcast</string>
|
||||||
<string name="EnterListName">Immetti il nome della lista</string>
|
<string name="EnterListName">Immetti il nome della lista</string>
|
||||||
@ -302,6 +303,7 @@
|
|||||||
<string name="VibrationDisabled">Disabilitata</string>
|
<string name="VibrationDisabled">Disabilitata</string>
|
||||||
<string name="LedDisabled">Disabilitato</string>
|
<string name="LedDisabled">Disabilitato</string>
|
||||||
<string name="RepeatDisabled">No</string>
|
<string name="RepeatDisabled">No</string>
|
||||||
|
<string name="InChatSound">Suoni in-chat</string>
|
||||||
<!--passcode view-->
|
<!--passcode view-->
|
||||||
<string name="Passcode">Codice</string>
|
<string name="Passcode">Codice</string>
|
||||||
<string name="ChangePasscode">Cambia 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="AreYouSureDeletePhoto">Sei sicuro di voler eliminare questa foto?</string>
|
||||||
<string name="AreYouSureDeleteVideo">Sei sicuro di voler eliminare questo video?</string>
|
<string name="AreYouSureDeleteVideo">Sei sicuro di voler eliminare questo video?</string>
|
||||||
<string name="DiscardChanges">Annullare le modifiche?</string>
|
<string name="DiscardChanges">Annullare le modifiche?</string>
|
||||||
|
<string name="ClearSearch">Cancellare la cronologia di ricerca?</string>
|
||||||
|
<string name="ClearButton">Pulisci</string>
|
||||||
<!--password view-->
|
<!--password view-->
|
||||||
<string name="Password">Password</string>
|
<string name="Password">Password</string>
|
||||||
<string name="ChangePassword">Change password</string>
|
<string name="ChangePassword">Change password</string>
|
||||||
@ -486,7 +490,7 @@
|
|||||||
<string name="InvalidLastName">Cognome non valido</string>
|
<string name="InvalidLastName">Cognome non valido</string>
|
||||||
<string name="Loading">Caricamento…</string>
|
<string name="Loading">Caricamento…</string>
|
||||||
<string name="NoPlayerInstalled">Non hai un lettore video, per favore installane uno per continuare</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="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="InviteUser">Questo utente non ha ancora Telegram, vuoi invitarlo?</string>
|
||||||
<string name="AreYouSure">Sei sicuro?</string>
|
<string name="AreYouSure">Sei sicuro?</string>
|
||||||
@ -786,4 +790,5 @@
|
|||||||
<string name="ForwardNoQuote">Inoltra senza citare</string>
|
<string name="ForwardNoQuote">Inoltra senza citare</string>
|
||||||
<string name="DisableMessageClick">Disabilita il pop-up al click</string>
|
<string name="DisableMessageClick">Disabilita il pop-up al click</string>
|
||||||
<string name="ProfileScreen">Schermata Gruppo/Profilo del contatto</string>
|
<string name="ProfileScreen">Schermata Gruppo/Profilo del contatto</string>
|
||||||
|
<string name="HideBackground">Nascondi sfondi personalizzati</string>
|
||||||
</resources>
|
</resources>
|
@ -3,7 +3,7 @@
|
|||||||
<!--https://www.transifex.com/projects/p/telegram/language/ko/members/-->
|
<!--https://www.transifex.com/projects/p/telegram/language/ko/members/-->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<string name="AppName">텔레그램</string>
|
<string name="AppName">Plus Messenger</string>
|
||||||
<string name="LanguageName">한국어</string>
|
<string name="LanguageName">한국어</string>
|
||||||
<string name="LanguageNameInEnglish">Korean</string>
|
<string name="LanguageNameInEnglish">Korean</string>
|
||||||
<string name="LanguageCode">ko</string>
|
<string name="LanguageCode">ko</string>
|
||||||
@ -58,6 +58,7 @@
|
|||||||
<string name="UnmuteNotifications">음소거 해제</string>
|
<string name="UnmuteNotifications">음소거 해제</string>
|
||||||
<string name="WillUnmuteIn">%1$s 후</string>
|
<string name="WillUnmuteIn">%1$s 후</string>
|
||||||
<string name="MuteDisable">비활성화</string>
|
<string name="MuteDisable">비활성화</string>
|
||||||
|
<string name="Hashtags">해시태그</string>
|
||||||
<!--broadcasts-->
|
<!--broadcasts-->
|
||||||
<string name="NewBroadcastList">새 단체 메시지 리스트</string>
|
<string name="NewBroadcastList">새 단체 메시지 리스트</string>
|
||||||
<string name="EnterListName">리스트 이름을 입력하세요</string>
|
<string name="EnterListName">리스트 이름을 입력하세요</string>
|
||||||
@ -302,6 +303,7 @@
|
|||||||
<string name="VibrationDisabled">비활성화됨</string>
|
<string name="VibrationDisabled">비활성화됨</string>
|
||||||
<string name="LedDisabled">비활성화됨</string>
|
<string name="LedDisabled">비활성화됨</string>
|
||||||
<string name="RepeatDisabled">끔</string>
|
<string name="RepeatDisabled">끔</string>
|
||||||
|
<string name="InChatSound">채팅중 소리 설정</string>
|
||||||
<!--passcode view-->
|
<!--passcode view-->
|
||||||
<string name="Passcode">잠금번호</string>
|
<string name="Passcode">잠금번호</string>
|
||||||
<string name="ChangePasscode">잠금번호 변경</string>
|
<string name="ChangePasscode">잠금번호 변경</string>
|
||||||
@ -366,6 +368,8 @@
|
|||||||
<string name="AreYouSureDeletePhoto">이 사진을 삭제하시겠습니까?</string>
|
<string name="AreYouSureDeletePhoto">이 사진을 삭제하시겠습니까?</string>
|
||||||
<string name="AreYouSureDeleteVideo">이 동영상을 삭제하시겠습니까?</string>
|
<string name="AreYouSureDeleteVideo">이 동영상을 삭제하시겠습니까?</string>
|
||||||
<string name="DiscardChanges">변경을 취소하시겠습니까?</string>
|
<string name="DiscardChanges">변경을 취소하시겠습니까?</string>
|
||||||
|
<string name="ClearSearch">검색기록을 지우시겠습니까?</string>
|
||||||
|
<string name="ClearButton">지우기</string>
|
||||||
<!--password view-->
|
<!--password view-->
|
||||||
<string name="Password">Password</string>
|
<string name="Password">Password</string>
|
||||||
<string name="ChangePassword">Change password</string>
|
<string name="ChangePassword">Change password</string>
|
||||||
@ -486,7 +490,7 @@
|
|||||||
<string name="InvalidLastName">올바른 성을 입력해 주세요</string>
|
<string name="InvalidLastName">올바른 성을 입력해 주세요</string>
|
||||||
<string name="Loading">불러오는 중...</string>
|
<string name="Loading">불러오는 중...</string>
|
||||||
<string name="NoPlayerInstalled">동영상 재생 앱이 없습니다. 계속하려면 앱을 설치해 주세요.</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="NoHandleAppInstalled">\'%1$s\' 파일 형식을 처리할 앱이 없습니다. 계속하려면 앱을 설치해 주세요.</string>
|
||||||
<string name="InviteUser">친구가 아직 텔레그램을 사용하지 않네요. 초대해 보세요!</string>
|
<string name="InviteUser">친구가 아직 텔레그램을 사용하지 않네요. 초대해 보세요!</string>
|
||||||
<string name="AreYouSure">확실합니까?</string>
|
<string name="AreYouSure">확실합니까?</string>
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
<string name="UnmuteNotifications">Stil uitschakelen</string>
|
<string name="UnmuteNotifications">Stil uitschakelen</string>
|
||||||
<string name="WillUnmuteIn">Over %1$s</string>
|
<string name="WillUnmuteIn">Over %1$s</string>
|
||||||
<string name="MuteDisable">Uitschakelen</string>
|
<string name="MuteDisable">Uitschakelen</string>
|
||||||
|
<string name="Hashtags">HASHTAGS</string>
|
||||||
<!--broadcasts-->
|
<!--broadcasts-->
|
||||||
<string name="NewBroadcastList">Nieuwe verzendlijst</string>
|
<string name="NewBroadcastList">Nieuwe verzendlijst</string>
|
||||||
<string name="EnterListName">Naam van lijst</string>
|
<string name="EnterListName">Naam van lijst</string>
|
||||||
@ -302,6 +303,7 @@
|
|||||||
<string name="VibrationDisabled">Uitgeschakeld</string>
|
<string name="VibrationDisabled">Uitgeschakeld</string>
|
||||||
<string name="LedDisabled">Uitgeschakeld</string>
|
<string name="LedDisabled">Uitgeschakeld</string>
|
||||||
<string name="RepeatDisabled">Uit</string>
|
<string name="RepeatDisabled">Uit</string>
|
||||||
|
<string name="InChatSound">Chatgeluiden</string>
|
||||||
<!--passcode view-->
|
<!--passcode view-->
|
||||||
<string name="Passcode">Toegangscode</string>
|
<string name="Passcode">Toegangscode</string>
|
||||||
<string name="ChangePasscode">Toegangscode wijzigen</string>
|
<string name="ChangePasscode">Toegangscode wijzigen</string>
|
||||||
@ -366,6 +368,8 @@
|
|||||||
<string name="AreYouSureDeletePhoto">Foto echt verwijderen?</string>
|
<string name="AreYouSureDeletePhoto">Foto echt verwijderen?</string>
|
||||||
<string name="AreYouSureDeleteVideo">Video echt verwijderen?</string>
|
<string name="AreYouSureDeleteVideo">Video echt verwijderen?</string>
|
||||||
<string name="DiscardChanges">Wijzigingen negeren?</string>
|
<string name="DiscardChanges">Wijzigingen negeren?</string>
|
||||||
|
<string name="ClearSearch">Zoekgeschiedenis wissen?</string>
|
||||||
|
<string name="ClearButton">Wissen</string>
|
||||||
<!--password view-->
|
<!--password view-->
|
||||||
<string name="Password">Password</string>
|
<string name="Password">Password</string>
|
||||||
<string name="ChangePassword">Change password</string>
|
<string name="ChangePassword">Change password</string>
|
||||||
@ -486,7 +490,7 @@
|
|||||||
<string name="InvalidLastName">Ongeldige achternaam</string>
|
<string name="InvalidLastName">Ongeldige achternaam</string>
|
||||||
<string name="Loading">Bezig met laden</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="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="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="InviteUser">Deze gebruiker heeft nog geen Telegram. Wil je een uitnodiging sturen?</string>
|
||||||
<string name="AreYouSure">Weet je het zeker?</string>
|
<string name="AreYouSure">Weet je het zeker?</string>
|
||||||
@ -616,54 +620,54 @@
|
|||||||
<string name="Users_many">%1$d gebruikers</string>
|
<string name="Users_many">%1$d gebruikers</string>
|
||||||
<string name="Users_other">%1$d gebruikers</string>
|
<string name="Users_other">%1$d gebruikers</string>
|
||||||
<!--forwarded messages-->
|
<!--forwarded messages-->
|
||||||
<string name="ForwardedMessage_zero">+%1$d berichten</string>
|
<string name="ForwardedMessage_zero">Bijlage: %1$d berichten</string>
|
||||||
<string name="ForwardedMessage_one">+1 bericht</string>
|
<string name="ForwardedMessage_one">Bijlage: 1 bericht</string>
|
||||||
<string name="ForwardedMessage_two">+%1$d berichten</string>
|
<string name="ForwardedMessage_two">Bijlage: %1$d berichten</string>
|
||||||
<string name="ForwardedMessage_few">+%1$d berichten</string>
|
<string name="ForwardedMessage_few">Bijlage: %1$d berichten</string>
|
||||||
<string name="ForwardedMessage_many">+%1$d berichten</string>
|
<string name="ForwardedMessage_many">Bijlage: %1$d berichten</string>
|
||||||
<string name="ForwardedMessage_other">+%1$d berichten</string>
|
<string name="ForwardedMessage_other">Bijlage: %1$d berichten</string>
|
||||||
<string name="ForwardedFile_zero">+%1$d bestanden</string>
|
<string name="ForwardedFile_zero">Bijlage: %1$d bestanden</string>
|
||||||
<string name="ForwardedFile_one">+1 bestand</string>
|
<string name="ForwardedFile_one">Bijlage: 1 bestand</string>
|
||||||
<string name="ForwardedFile_two">+%1$d bestanden</string>
|
<string name="ForwardedFile_two">Bijlage: %1$d bestanden</string>
|
||||||
<string name="ForwardedFile_few">+%1$d bestanden</string>
|
<string name="ForwardedFile_few">Bijlage: %1$d bestanden</string>
|
||||||
<string name="ForwardedFile_many">+%1$d bestanden</string>
|
<string name="ForwardedFile_many">Bijlage: %1$d bestanden</string>
|
||||||
<string name="ForwardedFile_other">+%1$d bestanden</string>
|
<string name="ForwardedFile_other">Bijlage: %1$d bestanden</string>
|
||||||
<string name="ForwardedPhoto_zero">+%1$d foto\'s</string>
|
<string name="ForwardedPhoto_zero">Bijlage: %1$d foto\'s</string>
|
||||||
<string name="ForwardedPhoto_one">+1 foto</string>
|
<string name="ForwardedPhoto_one">Bijlage: 1 foto</string>
|
||||||
<string name="ForwardedPhoto_two">+%1$d foto\'s</string>
|
<string name="ForwardedPhoto_two">Bijlage: %1$d foto\'s</string>
|
||||||
<string name="ForwardedPhoto_few">+%1$d foto\'s</string>
|
<string name="ForwardedPhoto_few">Bijlage: %1$d foto\'s</string>
|
||||||
<string name="ForwardedPhoto_many">+%1$d foto\'s</string>
|
<string name="ForwardedPhoto_many">Bijlage: %1$d foto\'s</string>
|
||||||
<string name="ForwardedPhoto_other">+%1$d foto\'s</string>
|
<string name="ForwardedPhoto_other">Bijlage: %1$d foto\'s</string>
|
||||||
<string name="ForwardedVideo_zero">+%1$d foto\'s</string>
|
<string name="ForwardedVideo_zero">Bijlage: %1$d foto\'s</string>
|
||||||
<string name="ForwardedVideo_one">+1 video</string>
|
<string name="ForwardedVideo_one">Bijlage: 1 video</string>
|
||||||
<string name="ForwardedVideo_two">+%1$d video\'s</string>
|
<string name="ForwardedVideo_two">Bijlage: %1$d video\'s</string>
|
||||||
<string name="ForwardedVideo_few">+%1$d video\'s</string>
|
<string name="ForwardedVideo_few">Bijlage: %1$d video\'s</string>
|
||||||
<string name="ForwardedVideo_many">+%1$d video\'s</string>
|
<string name="ForwardedVideo_many">Bijlage: %1$d video\'s</string>
|
||||||
<string name="ForwardedVideo_other">+%1$d video\'s</string>
|
<string name="ForwardedVideo_other">Bijlage: %1$d video\'s</string>
|
||||||
<string name="ForwardedAudio_zero">+%1$d geluidsbestanden</string>
|
<string name="ForwardedAudio_zero">Bijlage: %1$d geluidsbestanden</string>
|
||||||
<string name="ForwardedAudio_one">+1 geluidsbestand</string>
|
<string name="ForwardedAudio_one">Bijlage: 1 geluidsbestand</string>
|
||||||
<string name="ForwardedAudio_two">+%1$d geluidsbestanden</string>
|
<string name="ForwardedAudio_two">Bijlage: %1$d geluidsbestanden</string>
|
||||||
<string name="ForwardedAudio_few">+%1$d geluidsbestanden</string>
|
<string name="ForwardedAudio_few">Bijlage: %1$d geluidsbestanden</string>
|
||||||
<string name="ForwardedAudio_many">+%1$d geluidsbestanden</string>
|
<string name="ForwardedAudio_many">Bijlage: %1$d geluidsbestanden</string>
|
||||||
<string name="ForwardedAudio_other">+%1$d geluidsbestanden</string>
|
<string name="ForwardedAudio_other">Bijlage: %1$d geluidsbestanden</string>
|
||||||
<string name="ForwardedLocation_zero">+%1$d locaties</string>
|
<string name="ForwardedLocation_zero">Bijlage: %1$d locaties</string>
|
||||||
<string name="ForwardedLocation_one">+1 locatie</string>
|
<string name="ForwardedLocation_one">Bijlage: 1 locatie</string>
|
||||||
<string name="ForwardedLocation_two">+%1$d locaties</string>
|
<string name="ForwardedLocation_two">Bijlage: %1$d locaties</string>
|
||||||
<string name="ForwardedLocation_few">+%1$d locaties</string>
|
<string name="ForwardedLocation_few">Bijlage: %1$d locaties</string>
|
||||||
<string name="ForwardedLocation_many">+%1$d locaties</string>
|
<string name="ForwardedLocation_many">Bijlage: %1$d locaties</string>
|
||||||
<string name="ForwardedLocation_other">+%1$d locaties</string>
|
<string name="ForwardedLocation_other">Bijlage: %1$d locaties</string>
|
||||||
<string name="ForwardedContact_zero">+%1$d contacten</string>
|
<string name="ForwardedContact_zero">Bijlage: %1$d contacten</string>
|
||||||
<string name="ForwardedContact_one">+1 contact</string>
|
<string name="ForwardedContact_one">Bijlage: 1 contact</string>
|
||||||
<string name="ForwardedContact_two">+%1$d contacten</string>
|
<string name="ForwardedContact_two">Bijlage: %1$d contacten</string>
|
||||||
<string name="ForwardedContact_few">+%1$d contacten</string>
|
<string name="ForwardedContact_few">Bijlage: %1$d contacten</string>
|
||||||
<string name="ForwardedContact_many">+%1$d contacten</string>
|
<string name="ForwardedContact_many">Bijlage: %1$d contacten</string>
|
||||||
<string name="ForwardedContact_other">+%1$d contacten</string>
|
<string name="ForwardedContact_other">Bijlage: %1$d contacten</string>
|
||||||
<string name="ForwardedSticker_zero">+%1$d stickers</string>
|
<string name="ForwardedSticker_zero">Bijlage: %1$d stickers</string>
|
||||||
<string name="ForwardedSticker_one">+1 sticker</string>
|
<string name="ForwardedSticker_one">Bijlage: 1 sticker</string>
|
||||||
<string name="ForwardedSticker_two">+%1$d stickers</string>
|
<string name="ForwardedSticker_two">Bijlage: %1$d stickers</string>
|
||||||
<string name="ForwardedSticker_few">+%1$d stickers</string>
|
<string name="ForwardedSticker_few">Bijlage: %1$d stickers</string>
|
||||||
<string name="ForwardedSticker_many">+%1$d stickers</string>
|
<string name="ForwardedSticker_many">Bijlage: %1$d stickers</string>
|
||||||
<string name="ForwardedSticker_other">+%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_zero">en %1$d anderen</string>
|
||||||
<string name="AndOther_one">en %1$d andere</string>
|
<string name="AndOther_one">en %1$d andere</string>
|
||||||
<string name="AndOther_two">en %1$d anderen</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="SaveThemeSum">Sla uw thema op in de Telegram/Thema\'s-map</string>
|
||||||
<string name="SaveThemeToastText">Het thema is opgeslagen!</string>
|
<string name="SaveThemeToastText">Het thema is opgeslagen!</string>
|
||||||
<string name="SavedTo">%1$s is opgeslagen naar %2$s</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="restoreOkMsg">De voorkeuren zijn hersteld vanaf de SD-kaart</string>
|
||||||
<string name="restoreErrorMsg">Er is geen voorkeurenbestand aangetroffen in %s</string>
|
<string name="restoreErrorMsg">Er is geen voorkeurenbestand aangetroffen in %s</string>
|
||||||
<string name="NoMediaMessage">Er is geen SD-kaart gevonden.</string>
|
<string name="NoMediaMessage">Er is geen SD-kaart gevonden.</string>
|
||||||
@ -786,4 +790,5 @@
|
|||||||
<string name="ForwardNoQuote">Doorsturen zonder citeren</string>
|
<string name="ForwardNoQuote">Doorsturen zonder citeren</string>
|
||||||
<string name="DisableMessageClick">Pop-up bij klikken uitschakelen</string>
|
<string name="DisableMessageClick">Pop-up bij klikken uitschakelen</string>
|
||||||
<string name="ProfileScreen">Groeps-/contactpersoonprofielscherm</string>
|
<string name="ProfileScreen">Groeps-/contactpersoonprofielscherm</string>
|
||||||
|
<string name="HideBackground">Aangepaste achtergrond verbergen</string>
|
||||||
</resources>
|
</resources>
|
@ -58,6 +58,7 @@
|
|||||||
<string name="UnmuteNotifications">Restaurar Som</string>
|
<string name="UnmuteNotifications">Restaurar Som</string>
|
||||||
<string name="WillUnmuteIn">Em %1$s</string>
|
<string name="WillUnmuteIn">Em %1$s</string>
|
||||||
<string name="MuteDisable">Desativado</string>
|
<string name="MuteDisable">Desativado</string>
|
||||||
|
<string name="Hashtags">HASHTAGS</string>
|
||||||
<!--broadcasts-->
|
<!--broadcasts-->
|
||||||
<string name="NewBroadcastList">Nova Lista de Transmissão</string>
|
<string name="NewBroadcastList">Nova Lista de Transmissão</string>
|
||||||
<string name="EnterListName">Digite o nome da lista</string>
|
<string name="EnterListName">Digite o nome da lista</string>
|
||||||
@ -302,6 +303,7 @@
|
|||||||
<string name="VibrationDisabled">Desativar</string>
|
<string name="VibrationDisabled">Desativar</string>
|
||||||
<string name="LedDisabled">Desativado</string>
|
<string name="LedDisabled">Desativado</string>
|
||||||
<string name="RepeatDisabled">Desativado</string>
|
<string name="RepeatDisabled">Desativado</string>
|
||||||
|
<string name="InChatSound">Sons no Chat</string>
|
||||||
<!--passcode view-->
|
<!--passcode view-->
|
||||||
<string name="Passcode">Senha</string>
|
<string name="Passcode">Senha</string>
|
||||||
<string name="ChangePasscode">Alterar 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="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="AreYouSureDeleteVideo">Você tem certeza que deseja apagar este vídeo?</string>
|
||||||
<string name="DiscardChanges">Descartar mudanças?</string>
|
<string name="DiscardChanges">Descartar mudanças?</string>
|
||||||
|
<string name="ClearSearch">Limpar histórico de busca?</string>
|
||||||
|
<string name="ClearButton">Limpar</string>
|
||||||
<!--password view-->
|
<!--password view-->
|
||||||
<string name="Password">Password</string>
|
<string name="Password">Password</string>
|
||||||
<string name="ChangePassword">Change password</string>
|
<string name="ChangePassword">Change password</string>
|
||||||
@ -486,7 +490,7 @@
|
|||||||
<string name="InvalidLastName">Sobrenome inválido</string>
|
<string name="InvalidLastName">Sobrenome inválido</string>
|
||||||
<string name="Loading">Carregando...</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="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="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="InviteUser">Este usuário ainda não possui Telegram, deseja enviar um convite?</string>
|
||||||
<string name="AreYouSure">Você tem certeza?</string>
|
<string name="AreYouSure">Você tem certeza?</string>
|
||||||
@ -780,8 +784,11 @@
|
|||||||
<string name="HeaderIconsColor">Cor dos Ícones do Cabeçalho</string>
|
<string name="HeaderIconsColor">Cor dos Ícones do Cabeçalho</string>
|
||||||
<string name="DividerColor">Cor das Linhas Divisórias</string>
|
<string name="DividerColor">Cor das Linhas Divisórias</string>
|
||||||
<string name="AvatarRadius">Diâmetro do Avatar</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="ForwardNameColor">Cor do Nome em Encaminhamentos</string>
|
||||||
<string name="HeaderTitle">Título do Cabeçalho</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="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>
|
</resources>
|
@ -58,6 +58,7 @@
|
|||||||
<string name="UnmuteNotifications">Restaurar Som</string>
|
<string name="UnmuteNotifications">Restaurar Som</string>
|
||||||
<string name="WillUnmuteIn">Em %1$s</string>
|
<string name="WillUnmuteIn">Em %1$s</string>
|
||||||
<string name="MuteDisable">Desativado</string>
|
<string name="MuteDisable">Desativado</string>
|
||||||
|
<string name="Hashtags">HASHTAGS</string>
|
||||||
<!--broadcasts-->
|
<!--broadcasts-->
|
||||||
<string name="NewBroadcastList">Nova Lista de Transmissão</string>
|
<string name="NewBroadcastList">Nova Lista de Transmissão</string>
|
||||||
<string name="EnterListName">Digite o nome da lista</string>
|
<string name="EnterListName">Digite o nome da lista</string>
|
||||||
@ -302,6 +303,7 @@
|
|||||||
<string name="VibrationDisabled">Desativar</string>
|
<string name="VibrationDisabled">Desativar</string>
|
||||||
<string name="LedDisabled">Desativado</string>
|
<string name="LedDisabled">Desativado</string>
|
||||||
<string name="RepeatDisabled">Desativado</string>
|
<string name="RepeatDisabled">Desativado</string>
|
||||||
|
<string name="InChatSound">Sons no Chat</string>
|
||||||
<!--passcode view-->
|
<!--passcode view-->
|
||||||
<string name="Passcode">Senha</string>
|
<string name="Passcode">Senha</string>
|
||||||
<string name="ChangePasscode">Alterar 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="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="AreYouSureDeleteVideo">Você tem certeza que deseja apagar este vídeo?</string>
|
||||||
<string name="DiscardChanges">Descartar mudanças?</string>
|
<string name="DiscardChanges">Descartar mudanças?</string>
|
||||||
|
<string name="ClearSearch">Limpar histórico de busca?</string>
|
||||||
|
<string name="ClearButton">Limpar</string>
|
||||||
<!--password view-->
|
<!--password view-->
|
||||||
<string name="Password">Password</string>
|
<string name="Password">Password</string>
|
||||||
<string name="ChangePassword">Change password</string>
|
<string name="ChangePassword">Change password</string>
|
||||||
@ -486,7 +490,7 @@
|
|||||||
<string name="InvalidLastName">Sobrenome inválido</string>
|
<string name="InvalidLastName">Sobrenome inválido</string>
|
||||||
<string name="Loading">Carregando...</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="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="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="InviteUser">Este usuário ainda não possui Telegram, deseja enviar um convite?</string>
|
||||||
<string name="AreYouSure">Você tem certeza?</string>
|
<string name="AreYouSure">Você tem certeza?</string>
|
||||||
@ -682,24 +686,35 @@
|
|||||||
<string name="formatterDay12H">h:mm a</string>
|
<string name="formatterDay12H">h:mm a</string>
|
||||||
<string name="formatDateAtTime">%1$s às %2$s</string>
|
<string name="formatDateAtTime">%1$s às %2$s</string>
|
||||||
<!--Telegram+ Portuguese(Portugal)-->
|
<!--Telegram+ Portuguese(Portugal)-->
|
||||||
|
<!--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="TelegramForAndroid">Plus Messenger para Android</string>
|
||||||
<string name="Theming">Personalização</string>
|
<string name="Theming">Temas</string>
|
||||||
<string name="colorHexInvalid">Código hexadecimal da cor é inválido!</string>
|
<string name="colorHexInvalid">O código hexadecimal da cor é inválido!</string>
|
||||||
<string name="themeColor">Cor do Tema</string>
|
<string name="themeColor">Cor do Tema</string>
|
||||||
<string name="ResetThemeSettings">Redefinir Tema</string>
|
<string name="ResetThemeSettings">Repor Definições do Tema</string>
|
||||||
<string name="ResetThemeSettingsSum">Reverter todas as personalizações</string>
|
<string name="ResetThemeSettingsSum">Anular todas as definições do tema</string>
|
||||||
<string name="ResetThemeToastText">O tema foi redefinido para o tema padrão!</string>
|
<string name="ResetThemeToastText">Repor as definições do tema para a predefinição!</string>
|
||||||
<string name="General">Geral</string>
|
<string name="General">Geral</string>
|
||||||
<string name="Screens">Ecrãs</string>
|
<string name="Screens">Ecrãs</string>
|
||||||
<string name="MainScreen">Ecrã Principal</string>
|
<string name="MainScreen">Ecrã Principal</string>
|
||||||
<string name="ChatScreen">Ecrã de chat</string>
|
<string name="ChatScreen">Ecrã de Conversação</string>
|
||||||
<string name="ContactsScreen">Ecrã de Contactos</string>
|
<string name="ContactsScreen">Ecrã dos Contactos</string>
|
||||||
<string name="Header">Cabeçalho</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="ChatList">Lista de Conversas</string>
|
||||||
<string name="ChatsList">Lista de Conversas</string>
|
<string name="ChatsList">Lista de Conversas</string>
|
||||||
<string name="ContactsList">Lista de Contactos</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="NameColor">Cor do Nome do Contato</string>
|
||||||
<string name="NameSize">Tamanho do Nome do Contato</string>
|
<string name="NameSize">Tamanho do Nome do Contato</string>
|
||||||
<string name="MessageColor">Cor das Mensagens</string>
|
<string name="MessageColor">Cor das Mensagens</string>
|
||||||
@ -717,38 +732,62 @@
|
|||||||
<string name="DateColor">Cor da Data</string>
|
<string name="DateColor">Cor da Data</string>
|
||||||
<string name="DateSize">Tamanho da Data</string>
|
<string name="DateSize">Tamanho da Data</string>
|
||||||
<string name="DateBubbleColor">Cor da Bolha 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="LTextColor">Cor do Texto da Esquerdaa</string>
|
||||||
<string name="RTimeColor">Cor do Texto da Direita</string>
|
<string name="RTimeColor">Cor do Texto da Direita</string>
|
||||||
<string name="LTimeColor">Cor da Hora da Esquerda</string>
|
<string name="LTimeColor">Cor da Hora da Esquerda</string>
|
||||||
<string name="TimeSize">Tamanho da Hora</string>
|
<string name="TimeSize">Tamanho da Hora</string>
|
||||||
<string name="EditTextColor">Cor do Texto Introduzido</string>
|
<string name="EditTextColor">Cor do Texto Introduzido</string>
|
||||||
<string name="EditTextSize">Tamanho do Texto Introduzido</string>
|
<string name="EditTextSize">Tamanho do Texto Introduzido</string>
|
||||||
<string name="EditTextBGColor">Cor de Fundo do Texto Introduzido</string>
|
<string name="EditTextBGColor">Cor de Fundo do Texto de Entrada</string>
|
||||||
<string name="EmojiViewBGColor">Cor de Fundo dos Emoji</string>
|
<string name="EmojiViewBGColor">Cor de Fundo do Emoji</string>
|
||||||
<string name="EmojiViewTabColor">Cor da Tab dos Emoji</string>
|
<string name="EmojiViewTabColor">Cor da Tab dos Emoji</string>
|
||||||
<string name="OnlineColor">Cor do Status Online</string>
|
<string name="OnlineColor">Cor do Status Online</string>
|
||||||
<string name="ChatMusic">Música</string>
|
<string name="ChatMusic">Música</string>
|
||||||
<string name="SaveTheme">Guardar Tema</string>
|
<string name="SaveTheme">Guardar Tema</string>
|
||||||
<string name="SaveThemeSum">Guarda o teu tema na pasta Telegram/Themes</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="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="restoreOkMsg">Preferências restauradas do cartão SD</string>
|
||||||
<string name="restoreErrorMsg">Nenhum ficheiro de preferências encontrado em %s</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="NoMediaMessage">Não foi encontrado nenhum cartão SD.</string>
|
||||||
<string name="EnterName">Introduzo Nome</string>
|
<string name="EnterName">Introduzo Nome</string>
|
||||||
<string name="Themes">Temas</string>
|
<string name="Themes">Temas</string>
|
||||||
<string name="ApplyTheme">Aplicar Tema</string>
|
<string name="ApplyTheme">Aplicar Tema</string>
|
||||||
<string name="ApplyThemeSum">Aplicar tema .xml de um ficheiro local</string>
|
<string name="ApplyThemeSum">Aplicar tema .xml a partir de um ficheiro local</string>
|
||||||
<string name="MemberColor">Cor de Participantes</string>
|
<string name="MemberColor">Cor do Membro</string>
|
||||||
<string name="ChecksColor">Cor de Ticks</string>
|
<string name="ChecksColor">Cor de Ticks</string>
|
||||||
<string name="MuteColor">Cor de Silênciar</string>
|
<string name="MuteColor">Cor de Silênciar</string>
|
||||||
<string name="SendLogs">Enviar Registos</string>
|
<string name="SendLogs">Enviar Registos</string>
|
||||||
<string name="SendLogsEmpty">Não existem registos</string>
|
<string name="SendLogsEmpty">Não existem registos</string>
|
||||||
<string name="SendIcon">Enviar Ícon</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="FloatingPencilColor">Cor do Lápis Flutuante</string>
|
||||||
<string name="FloatingBGColor">Cor de Fundo do Botão Flutuante</string>
|
<string name="FloatingBGColor">Cor de Fundo do Botão Flutuante</string>
|
||||||
<string name="Community">Comunidade G+</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>
|
</resources>
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<string name="AppName">Plus</string>
|
<string name="AppName">Plus Messenger</string>
|
||||||
|
<string name="ShortAppName">Plus</string>
|
||||||
<string name="LanguageName">English</string>
|
<string name="LanguageName">English</string>
|
||||||
<string name="LanguageNameInEnglish">English</string>
|
<string name="LanguageNameInEnglish">English</string>
|
||||||
<string name="LanguageCode">en</string>
|
<string name="LanguageCode">en</string>
|
||||||
@ -56,6 +56,7 @@
|
|||||||
<string name="UnmuteNotifications">Unmute</string>
|
<string name="UnmuteNotifications">Unmute</string>
|
||||||
<string name="WillUnmuteIn">In %1$s</string>
|
<string name="WillUnmuteIn">In %1$s</string>
|
||||||
<string name="MuteDisable">Disable</string>
|
<string name="MuteDisable">Disable</string>
|
||||||
|
<string name="Hashtags">HASHTAGS</string>
|
||||||
<!--broadcasts-->
|
<!--broadcasts-->
|
||||||
<string name="NewBroadcastList">New Broadcast List</string>
|
<string name="NewBroadcastList">New Broadcast List</string>
|
||||||
<string name="EnterListName">Enter list name</string>
|
<string name="EnterListName">Enter list name</string>
|
||||||
@ -300,6 +301,7 @@
|
|||||||
<string name="VibrationDisabled">Disabled</string>
|
<string name="VibrationDisabled">Disabled</string>
|
||||||
<string name="LedDisabled">Disabled</string>
|
<string name="LedDisabled">Disabled</string>
|
||||||
<string name="RepeatDisabled">Off</string>
|
<string name="RepeatDisabled">Off</string>
|
||||||
|
<string name="InChatSound">In-Chat Sounds</string>
|
||||||
<!--passcode view-->
|
<!--passcode view-->
|
||||||
<string name="Passcode">Passcode</string>
|
<string name="Passcode">Passcode</string>
|
||||||
<string name="ChangePasscode">Change 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="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="AreYouSureDeleteVideo">Are you sure you want to delete this video?</string>
|
||||||
<string name="DiscardChanges">Discard changes?</string>
|
<string name="DiscardChanges">Discard changes?</string>
|
||||||
|
<string name="ClearSearch">Clear search history?</string>
|
||||||
|
<string name="ClearButton">Clear</string>
|
||||||
<!--password view-->
|
<!--password view-->
|
||||||
<string name="Password">Password</string>
|
<string name="Password">Password</string>
|
||||||
<string name="ChangePassword">Change password</string>
|
<string name="ChangePassword">Change password</string>
|
||||||
@ -484,7 +488,7 @@
|
|||||||
<string name="InvalidLastName">Invalid last name</string>
|
<string name="InvalidLastName">Invalid last name</string>
|
||||||
<string name="Loading">Loading...</string>
|
<string name="Loading">Loading...</string>
|
||||||
<string name="NoPlayerInstalled">You don\'t have a video player, please install one to continue</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="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="InviteUser">This user does not have Telegram yet, send an invitation?</string>
|
||||||
<string name="AreYouSure">Are you sure?</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="SaveThemeSum">Save your theme to Telegram/Themes folder</string>
|
||||||
<string name="SaveThemeToastText">Theme saved!</string>
|
<string name="SaveThemeToastText">Theme saved!</string>
|
||||||
<string name="SavedTo">%1$s saved to %2$s</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="restoreOkMsg">Preferences restored from sdcard</string>
|
||||||
<string name="restoreErrorMsg">No preferences file found in %s</string>
|
<string name="restoreErrorMsg">No preferences file found in %s</string>
|
||||||
<string name="NoMediaMessage">No SD card found.</string>
|
<string name="NoMediaMessage">No SD card found.</string>
|
||||||
@ -784,4 +788,5 @@
|
|||||||
<string name="ForwardNoQuote">Forward without quoting</string>
|
<string name="ForwardNoQuote">Forward without quoting</string>
|
||||||
<string name="DisableMessageClick">Disable pop-up on click</string>
|
<string name="DisableMessageClick">Disable pop-up on click</string>
|
||||||
<string name="ProfileScreen">Group/Contact Profile screen</string>
|
<string name="ProfileScreen">Group/Contact Profile screen</string>
|
||||||
|
<string name="HideBackground">Hide custom background</string>
|
||||||
</resources>
|
</resources>
|