Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apk
Commits
a484ab0d
Commit
a484ab0d
authored
Mar 19, 2015
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes
parent
028f5d9c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
47 additions
and
32 deletions
+47
-32
build.gradle
TMessagesProj/build.gradle
+1
-1
MessageObject.java
...roj/src/main/java/org/telegram/android/MessageObject.java
+1
-1
SmsListener.java
...sProj/src/main/java/org/telegram/android/SmsListener.java
+2
-2
ConnectionsManager.java
.../main/java/org/telegram/messenger/ConnectionsManager.java
+1
-1
FileLoader.java
...Proj/src/main/java/org/telegram/messenger/FileLoader.java
+3
-0
FileLog.java
...gesProj/src/main/java/org/telegram/messenger/FileLog.java
+1
-1
MentionsAdapter.java
...c/main/java/org/telegram/ui/Adapters/MentionsAdapter.java
+1
-1
ChatBaseCell.java
...roj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java
+18
-9
ChatActivity.java
...sagesProj/src/main/java/org/telegram/ui/ChatActivity.java
+13
-10
strings.xml
TMessagesProj/src/main/res/values-ar/strings.xml
+6
-6
No files found.
TMessagesProj/build.gradle
View file @
a484ab0d
...
@@ -82,7 +82,7 @@ android {
...
@@ -82,7 +82,7 @@ android {
defaultConfig
{
defaultConfig
{
minSdkVersion
8
minSdkVersion
8
targetSdkVersion
22
targetSdkVersion
22
versionCode
46
7
versionCode
46
8
versionName
"2.6.0"
versionName
"2.6.0"
}
}
}
}
TMessagesProj/src/main/java/org/telegram/android/MessageObject.java
View file @
a484ab0d
...
@@ -504,7 +504,7 @@ public class MessageObject {
...
@@ -504,7 +504,7 @@ public class MessageObject {
}
else
if
(!(
c
!=
' '
&&
digitsInRow
>
0
))
{
}
else
if
(!(
c
!=
' '
&&
digitsInRow
>
0
))
{
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
;
return
true
;
}
}
if
(
c
==
':'
)
{
if
(
c
==
':'
)
{
...
...
TMessagesProj/src/main/java/org/telegram/android/SmsListener.java
View file @
a484ab0d
...
@@ -51,11 +51,11 @@ public class SmsListener extends BroadcastReceiver {
...
@@ -51,11 +51,11 @@ public class SmsListener extends BroadcastReceiver {
NotificationCenter
.
getInstance
().
postNotificationName
(
NotificationCenter
.
didReceiveSmsCode
,
matcher
.
group
(
0
));
NotificationCenter
.
getInstance
().
postNotificationName
(
NotificationCenter
.
didReceiveSmsCode
,
matcher
.
group
(
0
));
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Throwable
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
FileLog
.
e
(
"tmessages"
,
e
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Throwable
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
FileLog
.
e
(
"tmessages"
,
e
);
}
}
}
}
...
...
TMessagesProj/src/main/java/org/telegram/messenger/ConnectionsManager.java
View file @
a484ab0d
...
@@ -2154,7 +2154,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
...
@@ -2154,7 +2154,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
implicitError
.
code
=
((
TLRPC
.
RpcError
)
resultContainer
.
result
).
error_code
;
implicitError
.
code
=
((
TLRPC
.
RpcError
)
resultContainer
.
result
).
error_code
;
implicitError
.
text
=
((
TLRPC
.
RpcError
)
resultContainer
.
result
).
error_message
;
implicitError
.
text
=
((
TLRPC
.
RpcError
)
resultContainer
.
result
).
error_message
;
}
else
if
(!(
resultContainer
.
result
instanceof
TLRPC
.
TL_error
))
{
}
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
)
{
if
(
request
.
rawRequest
==
null
)
{
FileLog
.
e
(
"tmessages"
,
"rawRequest is null"
);
FileLog
.
e
(
"tmessages"
,
"rawRequest is null"
);
}
else
{
}
else
{
...
...
TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java
View file @
a484ab0d
...
@@ -132,6 +132,9 @@ public class FileLoader {
...
@@ -132,6 +132,9 @@ public class FileLoader {
}
}
public
void
uploadFile
(
final
String
location
,
final
boolean
encrypted
,
final
boolean
small
,
final
int
estimatedSize
)
{
public
void
uploadFile
(
final
String
location
,
final
boolean
encrypted
,
final
boolean
small
,
final
int
estimatedSize
)
{
if
(
location
==
null
)
{
return
;
}
fileLoaderQueue
.
postRunnable
(
new
Runnable
()
{
fileLoaderQueue
.
postRunnable
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
...
...
TMessagesProj/src/main/java/org/telegram/messenger/FileLog.java
View file @
a484ab0d
...
@@ -181,7 +181,7 @@ public class FileLog {
...
@@ -181,7 +181,7 @@ public class FileLog {
}
}
public
static
void
cleanupLogs
()
{
public
static
void
cleanupLogs
()
{
ArrayList
<
Uri
>
uris
=
new
ArrayList
<
Uri
>();
ArrayList
<
Uri
>
uris
=
new
ArrayList
<>();
File
sdCard
=
ApplicationLoader
.
applicationContext
.
getExternalFilesDir
(
null
);
File
sdCard
=
ApplicationLoader
.
applicationContext
.
getExternalFilesDir
(
null
);
File
dir
=
new
File
(
sdCard
.
getAbsolutePath
()
+
"/logs"
);
File
dir
=
new
File
(
sdCard
.
getAbsolutePath
()
+
"/logs"
);
File
[]
files
=
dir
.
listFiles
();
File
[]
files
=
dir
.
listFiles
();
...
...
TMessagesProj/src/main/java/org/telegram/ui/Adapters/MentionsAdapter.java
View file @
a484ab0d
...
@@ -70,7 +70,7 @@ public class MentionsAdapter extends BaseFragmentAdapter {
...
@@ -70,7 +70,7 @@ public class MentionsAdapter extends BaseFragmentAdapter {
continue
;
continue
;
}
}
char
ch
=
text
.
charAt
(
a
);
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
;
found
=
true
;
usernameStartPosition
=
a
;
usernameStartPosition
=
a
;
usernameLength
=
username
.
length
()
+
1
;
usernameLength
=
username
.
length
()
+
1
;
...
...
TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java
View file @
a484ab0d
...
@@ -27,6 +27,7 @@ import org.telegram.android.Emoji;
...
@@ -27,6 +27,7 @@ import org.telegram.android.Emoji;
import
org.telegram.android.LocaleController
;
import
org.telegram.android.LocaleController
;
import
org.telegram.messenger.ApplicationLoader
;
import
org.telegram.messenger.ApplicationLoader
;
import
org.telegram.messenger.FileLoader
;
import
org.telegram.messenger.FileLoader
;
import
org.telegram.messenger.FileLog
;
import
org.telegram.messenger.TLRPC
;
import
org.telegram.messenger.TLRPC
;
import
org.telegram.android.MessagesController
;
import
org.telegram.android.MessagesController
;
import
org.telegram.messenger.R
;
import
org.telegram.messenger.R
;
...
@@ -447,17 +448,25 @@ public class ChatBaseCell extends BaseCell {
...
@@ -447,17 +448,25 @@ public class ChatBaseCell extends BaseCell {
if
(
stringFinalName
==
null
)
{
if
(
stringFinalName
==
null
)
{
stringFinalName
=
LocaleController
.
getString
(
"Loading"
,
R
.
string
.
Loading
);
stringFinalName
=
LocaleController
.
getString
(
"Loading"
,
R
.
string
.
Loading
);
}
}
replyNameLayout
=
new
StaticLayout
(
stringFinalName
,
replyNamePaint
,
maxWidth
,
Layout
.
Alignment
.
ALIGN_NORMAL
,
1.0f
,
0.0f
,
false
);
try
{
if
(
replyNameLayout
.
getLineCount
()
>
0
)
{
replyNameLayout
=
new
StaticLayout
(
stringFinalName
,
replyNamePaint
,
maxWidth
,
Layout
.
Alignment
.
ALIGN_NORMAL
,
1.0f
,
0.0f
,
false
);
replyNameWidth
=
(
int
)
Math
.
ceil
(
replyNameLayout
.
getLineWidth
(
0
))
+
AndroidUtilities
.
dp
(
12
+
(
needReplyImage
?
44
:
0
));
if
(
replyNameLayout
.
getLineCount
()
>
0
)
{
replyNameOffset
=
replyNameLayout
.
getLineLeft
(
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
);
}
}
if
(
stringFinalText
!=
null
)
{
try
{
replyTextLayout
=
new
StaticLayout
(
stringFinalText
,
replyTextPaint
,
maxWidth
,
Layout
.
Alignment
.
ALIGN_NORMAL
,
1.0f
,
0.0f
,
false
);
if
(
stringFinalText
!=
null
)
{
if
(
replyTextLayout
.
getLineCount
()
>
0
)
{
replyTextLayout
=
new
StaticLayout
(
stringFinalText
,
replyTextPaint
,
maxWidth
,
Layout
.
Alignment
.
ALIGN_NORMAL
,
1.0f
,
0.0f
,
false
);
replyTextWidth
=
(
int
)
Math
.
ceil
(
replyTextLayout
.
getLineWidth
(
0
))
+
AndroidUtilities
.
dp
(
12
+
(
needReplyImage
?
44
:
0
));
if
(
replyTextLayout
.
getLineCount
()
>
0
)
{
replyTextOffset
=
replyTextLayout
.
getLineLeft
(
0
);
replyTextWidth
=
(
int
)
Math
.
ceil
(
replyTextLayout
.
getLineWidth
(
0
))
+
AndroidUtilities
.
dp
(
12
+
(
needReplyImage
?
44
:
0
));
replyTextOffset
=
replyTextLayout
.
getLineLeft
(
0
);
}
}
}
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
}
}
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
View file @
a484ab0d
...
@@ -4120,17 +4120,20 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
...
@@ -4120,17 +4120,20 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
args
.
putInt
(
"chat_id"
,
-
lower_part
);
args
.
putInt
(
"chat_id"
,
-
lower_part
);
}
}
ChatActivity
chatActivity
=
new
ChatActivity
(
args
);
ChatActivity
chatActivity
=
new
ChatActivity
(
args
);
presentFragment
(
chatActivity
,
true
);
if
(
presentFragment
(
chatActivity
,
true
))
{
chatActivity
.
showReplyForMessageObjectOrForward
(
true
,
null
,
fmessages
,
false
);
chatActivity
.
showReplyForMessageObjectOrForward
(
true
,
null
,
fmessages
,
false
);
if
(!
AndroidUtilities
.
isTablet
())
{
if
(!
AndroidUtilities
.
isTablet
())
{
removeSelfFromStack
();
removeSelfFromStack
();
Activity
parentActivity
=
getParentActivity
();
Activity
parentActivity
=
getParentActivity
();
if
(
parentActivity
==
null
)
{
if
(
parentActivity
==
null
)
{
parentActivity
=
chatActivity
.
getParentActivity
();
parentActivity
=
chatActivity
.
getParentActivity
();
}
}
if
(
parentActivity
!=
null
)
{
if
(
parentActivity
!=
null
)
{
parentActivity
.
getWindow
().
setSoftInputMode
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_ADJUST_RESIZE
);
parentActivity
.
getWindow
().
setSoftInputMode
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_ADJUST_RESIZE
);
}
}
}
}
else
{
activity
.
finishFragment
();
}
}
}
else
{
}
else
{
activity
.
finishFragment
();
activity
.
finishFragment
();
...
...
TMessagesProj/src/main/res/values-ar/strings.xml
View file @
a484ab0d
...
@@ -664,12 +664,12 @@
...
@@ -664,12 +664,12 @@
<string
name=
"ForwardedSticker_few"
>
%1$d ملصق معاد توجيهه
</string>
<string
name=
"ForwardedSticker_few"
>
%1$d ملصق معاد توجيهه
</string>
<string
name=
"ForwardedSticker_many"
>
%1$d ملصق معاد توجيهه
</string>
<string
name=
"ForwardedSticker_many"
>
%1$d ملصق معاد توجيهه
</string>
<string
name=
"ForwardedSticker_other"
>
%1$d ملصق معاد توجيهه
</string>
<string
name=
"ForwardedSticker_other"
>
%1$d ملصق معاد توجيهه
</string>
<string
name=
"AndOther_zero"
>
and %1$d others
</string>
<string
name=
"AndOther_zero"
>
و %1$d غيرهم
</string>
<string
name=
"AndOther_one"
>
and %1$d other
</string>
<string
name=
"AndOther_one"
>
و %1$d غيره
</string>
<string
name=
"AndOther_two"
>
and %1$d others
</string>
<string
name=
"AndOther_two"
>
و %1$d غيرهم
</string>
<string
name=
"AndOther_few"
>
and %1$d others
</string>
<string
name=
"AndOther_few"
>
و %1$d غيرهم
</string>
<string
name=
"AndOther_many"
>
and %1$d others
</string>
<string
name=
"AndOther_many"
>
و %1$d غيرهم
</string>
<string
name=
"AndOther_other"
>
and %1$d others
</string>
<string
name=
"AndOther_other"
>
و %1$d غيرهم
</string>
<!--date formatters-->
<!--date formatters-->
<string
name=
"formatterMonthYear"
>
MMMM yyyy
</string>
<string
name=
"formatterMonthYear"
>
MMMM yyyy
</string>
<string
name=
"formatterMonth"
>
MMM dd
</string>
<string
name=
"formatterMonth"
>
MMM dd
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment