mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 14:35:03 +01:00
Bug fixes
This commit is contained in:
parent
028f5d9c90
commit
a484ab0d7f
10 changed files with 48 additions and 33 deletions
|
@ -82,7 +82,7 @@ android {
|
|||
defaultConfig {
|
||||
minSdkVersion 8
|
||||
targetSdkVersion 22
|
||||
versionCode 467
|
||||
versionCode 468
|
||||
versionName "2.6.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -504,7 +504,7 @@ public class MessageObject {
|
|||
} else if (!(c != ' ' && digitsInRow > 0)) {
|
||||
digitsInRow = 0;
|
||||
}
|
||||
if ((c == '@' || c == '#') && i == 0 || i != 0 && message.charAt(i - 1) == ' ') {
|
||||
if ((c == '@' || c == '#') && i == 0 || i != 0 && (message.charAt(i - 1) == ' ' || message.charAt(i - 1) == '\n')) {
|
||||
return true;
|
||||
}
|
||||
if (c == ':') {
|
||||
|
|
|
@ -51,11 +51,11 @@ public class SmsListener extends BroadcastReceiver {
|
|||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.didReceiveSmsCode, matcher.group(0));
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
|
||||
} catch(Exception e) {
|
||||
} catch(Throwable e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2154,7 +2154,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
|
|||
implicitError.code = ((TLRPC.RpcError)resultContainer.result).error_code;
|
||||
implicitError.text = ((TLRPC.RpcError)resultContainer.result).error_message;
|
||||
} else if (!(resultContainer.result instanceof TLRPC.TL_error)) {
|
||||
if (request.rawRequest == null || !request.rawRequest.responseClass().isAssignableFrom(resultContainer.result.getClass())) {
|
||||
if (request.rawRequest == null || resultContainer.result == null || !request.rawRequest.responseClass().isAssignableFrom(resultContainer.result.getClass())) {
|
||||
if (request.rawRequest == null) {
|
||||
FileLog.e("tmessages", "rawRequest is null");
|
||||
} else {
|
||||
|
|
|
@ -132,6 +132,9 @@ public class FileLoader {
|
|||
}
|
||||
|
||||
public void uploadFile(final String location, final boolean encrypted, final boolean small, final int estimatedSize) {
|
||||
if (location == null) {
|
||||
return;
|
||||
}
|
||||
fileLoaderQueue.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
|
@ -181,7 +181,7 @@ public class FileLog {
|
|||
}
|
||||
|
||||
public static void cleanupLogs() {
|
||||
ArrayList<Uri> uris = new ArrayList<Uri>();
|
||||
ArrayList<Uri> uris = new ArrayList<>();
|
||||
File sdCard = ApplicationLoader.applicationContext.getExternalFilesDir(null);
|
||||
File dir = new File (sdCard.getAbsolutePath() + "/logs");
|
||||
File[] files = dir.listFiles();
|
||||
|
|
|
@ -70,7 +70,7 @@ public class MentionsAdapter extends BaseFragmentAdapter {
|
|||
continue;
|
||||
}
|
||||
char ch = text.charAt(a);
|
||||
if (ch == '@' && (a == 0 || text.charAt(a - 1) == ' ')) {
|
||||
if (ch == '@' && (a == 0 || text.charAt(a - 1) == ' ' || text.charAt(a - 1) == '\n')) {
|
||||
found = true;
|
||||
usernameStartPosition = a;
|
||||
usernameLength = username.length() + 1;
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.telegram.android.Emoji;
|
|||
import org.telegram.android.LocaleController;
|
||||
import org.telegram.messenger.ApplicationLoader;
|
||||
import org.telegram.messenger.FileLoader;
|
||||
import org.telegram.messenger.FileLog;
|
||||
import org.telegram.messenger.TLRPC;
|
||||
import org.telegram.android.MessagesController;
|
||||
import org.telegram.messenger.R;
|
||||
|
@ -447,11 +448,16 @@ public class ChatBaseCell extends BaseCell {
|
|||
if (stringFinalName == null) {
|
||||
stringFinalName = LocaleController.getString("Loading", R.string.Loading);
|
||||
}
|
||||
try {
|
||||
replyNameLayout = new StaticLayout(stringFinalName, replyNamePaint, maxWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
if (replyNameLayout.getLineCount() > 0) {
|
||||
replyNameWidth = (int)Math.ceil(replyNameLayout.getLineWidth(0)) + AndroidUtilities.dp(12 + (needReplyImage ? 44 : 0));
|
||||
replyNameOffset = replyNameLayout.getLineLeft(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
try {
|
||||
if (stringFinalText != null) {
|
||||
replyTextLayout = new StaticLayout(stringFinalText, replyTextPaint, maxWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
if (replyTextLayout.getLineCount() > 0) {
|
||||
|
@ -459,6 +465,9 @@ public class ChatBaseCell extends BaseCell {
|
|||
replyTextOffset = replyTextLayout.getLineLeft(0);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
|
||||
requestLayout();
|
||||
|
|
|
@ -4120,7 +4120,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
args.putInt("chat_id", -lower_part);
|
||||
}
|
||||
ChatActivity chatActivity = new ChatActivity(args);
|
||||
presentFragment(chatActivity, true);
|
||||
if (presentFragment(chatActivity, true)) {
|
||||
chatActivity.showReplyForMessageObjectOrForward(true, null, fmessages, false);
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
removeSelfFromStack();
|
||||
|
@ -4135,6 +4135,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
} else {
|
||||
activity.finishFragment();
|
||||
}
|
||||
} else {
|
||||
activity.finishFragment();
|
||||
}
|
||||
} else {
|
||||
activity.finishFragment();
|
||||
moveScrollToLastMessage();
|
||||
|
|
|
@ -664,12 +664,12 @@
|
|||
<string name="ForwardedSticker_few">%1$d ملصق معاد توجيهه</string>
|
||||
<string name="ForwardedSticker_many">%1$d ملصق معاد توجيهه</string>
|
||||
<string name="ForwardedSticker_other">%1$d ملصق معاد توجيهه</string>
|
||||
<string name="AndOther_zero">and %1$d others</string>
|
||||
<string name="AndOther_one">and %1$d other</string>
|
||||
<string name="AndOther_two">and %1$d others</string>
|
||||
<string name="AndOther_few">and %1$d others</string>
|
||||
<string name="AndOther_many">and %1$d others</string>
|
||||
<string name="AndOther_other">and %1$d others</string>
|
||||
<string name="AndOther_zero">و %1$d غيرهم</string>
|
||||
<string name="AndOther_one">و %1$d غيره</string>
|
||||
<string name="AndOther_two">و %1$d غيرهم</string>
|
||||
<string name="AndOther_few">و %1$d غيرهم</string>
|
||||
<string name="AndOther_many">و %1$d غيرهم</string>
|
||||
<string name="AndOther_other">و %1$d غيرهم</string>
|
||||
<!--date formatters-->
|
||||
<string name="formatterMonthYear">MMMM yyyy</string>
|
||||
<string name="formatterMonth">MMM dd</string>
|
||||
|
|
Loading…
Reference in a new issue