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
6e63dee5
Commit
6e63dee5
authored
Mar 04, 2014
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed incorrect messages drawing
parent
3316f25e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
10 deletions
+14
-10
AndroidManifest.xml
TMessagesProj/src/main/AndroidManifest.xml
+1
-1
ContactsController.java
.../main/java/org/telegram/messenger/ContactsController.java
+1
-2
MessagesStorage.java
...src/main/java/org/telegram/messenger/MessagesStorage.java
+1
-1
ChatMessageCell.java
.../src/main/java/org/telegram/ui/Cells/ChatMessageCell.java
+2
-2
intro_layout.xml
TMessagesProj/src/main/res/layout/intro_layout.xml
+9
-4
No files found.
TMessagesProj/src/main/AndroidManifest.xml
View file @
6e63dee5
<?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"
package=
"org.telegram.messenger"
package=
"org.telegram.messenger"
android:versionCode=
"17
7
"
android:versionCode=
"17
9
"
android:versionName=
"1.3.26"
>
android:versionName=
"1.3.26"
>
<supports-screens
android:anyDensity=
"true"
<supports-screens
android:anyDensity=
"true"
...
...
TMessagesProj/src/main/java/org/telegram/messenger/ContactsController.java
View file @
6e63dee5
...
@@ -369,7 +369,7 @@ public class ContactsController {
...
@@ -369,7 +369,7 @@ public class ContactsController {
@Override
@Override
public
void
run
()
{
public
void
run
()
{
boolean
disableDeletion
=
false
;
boolean
disableDeletion
=
true
;
//disable contacts deletion, because phone numbers can't be compared due to different numbers format
if
(
schedule
)
{
if
(
schedule
)
{
try
{
try
{
AccountManager
am
=
AccountManager
.
get
(
ApplicationLoader
.
applicationContext
);
AccountManager
am
=
AccountManager
.
get
(
ApplicationLoader
.
applicationContext
);
...
@@ -385,7 +385,6 @@ public class ContactsController {
...
@@ -385,7 +385,6 @@ public class ContactsController {
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
FileLog
.
e
(
"tmessages"
,
e
);
disableDeletion
=
true
;
}
}
}
}
...
...
TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java
View file @
6e63dee5
...
@@ -69,7 +69,7 @@ public class MessagesStorage {
...
@@ -69,7 +69,7 @@ public class MessagesStorage {
}
}
try
{
try
{
database
=
new
SQLiteDatabase
(
cacheFile
.
getPath
());
database
=
new
SQLiteDatabase
(
cacheFile
.
getPath
());
database
.
execute
(
"PRAGMA secure_delete = ON"
);
database
.
execute
Fast
(
"PRAGMA secure_delete = ON"
).
stepThis
().
dispose
(
);
if
(
createTable
)
{
if
(
createTable
)
{
database
.
executeFast
(
"CREATE TABLE users(uid INTEGER PRIMARY KEY, name TEXT, status INTEGER, data BLOB)"
).
stepThis
().
dispose
();
database
.
executeFast
(
"CREATE TABLE users(uid INTEGER PRIMARY KEY, name TEXT, status INTEGER, data BLOB)"
).
stepThis
().
dispose
();
database
.
executeFast
(
"CREATE TABLE messages(mid INTEGER PRIMARY KEY, uid INTEGER, read_state INTEGER, send_state INTEGER, date INTEGER, data BLOB, out INTEGER, ttl INTEGER)"
).
stepThis
().
dispose
();
database
.
executeFast
(
"CREATE TABLE messages(mid INTEGER PRIMARY KEY, uid INTEGER, read_state INTEGER, send_state INTEGER, date INTEGER, data BLOB, out INTEGER, ttl INTEGER)"
).
stepThis
().
dispose
();
...
...
TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java
View file @
6e63dee5
...
@@ -187,11 +187,11 @@ public class ChatMessageCell extends ChatBaseCell {
...
@@ -187,11 +187,11 @@ public class ChatMessageCell extends ChatBaseCell {
@Override
@Override
protected
void
onDraw
(
Canvas
canvas
)
{
protected
void
onDraw
(
Canvas
canvas
)
{
super
.
onDraw
(
canvas
);
super
.
onDraw
(
canvas
);
if
(
currentMessageObject
==
null
||
currentMessageObject
.
textLayoutBlocks
==
null
||
currentMessageObject
.
textLayoutBlocks
.
isEmpty
())
{
if
(
currentMessageObject
==
null
||
currentMessageObject
.
textLayoutBlocks
==
null
||
currentMessageObject
.
textLayoutBlocks
.
isEmpty
()
||
firstVisibleBlockNum
<
0
)
{
return
;
return
;
}
}
for
(
int
a
=
Math
.
max
(
0
,
(
visibleY
-
textY
)
/
currentMessageObject
.
blockHeight
);
a
<
currentMessageObject
.
textLayoutBlocks
.
size
()
;
a
++)
{
for
(
int
a
=
firstVisibleBlockNum
;
a
<=
lastVisibleBlockNum
;
a
++)
{
MessageObject
.
TextLayoutBlock
block
=
currentMessageObject
.
textLayoutBlocks
.
get
(
a
);
MessageObject
.
TextLayoutBlock
block
=
currentMessageObject
.
textLayoutBlocks
.
get
(
a
);
float
y
=
textY
+
block
.
textYOffset
;
float
y
=
textY
+
block
.
textYOffset
;
if
(
intersect
(
y
,
y
+
currentMessageObject
.
blockHeight
,
visibleY
,
visibleY
+
visibleHeight
))
{
if
(
intersect
(
y
,
y
+
currentMessageObject
.
blockHeight
,
visibleY
,
visibleY
+
visibleHeight
))
{
...
...
TMessagesProj/src/main/res/layout/intro_layout.xml
View file @
6e63dee5
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
android:layout_height=
"fill_parent"
android:layout_height=
"fill_parent"
android:id=
"@+id/intro_view_pager"
/>
android:id=
"@+id/intro_view_pager"
/>
<TextView
android:layout_width=
"
192dp
"
<TextView
android:layout_width=
"
wrap_content
"
android:layout_height=
"
44dp
"
android:layout_height=
"
wrap_content
"
android:layout_marginTop=
"336dp"
android:layout_marginTop=
"336dp"
android:background=
"@drawable/regbtn_states"
android:background=
"@drawable/regbtn_states"
android:text=
"@string/StartMessaging"
android:text=
"@string/StartMessaging"
...
@@ -44,8 +44,13 @@
...
@@ -44,8 +44,13 @@
android:textSize=
"18dp"
android:textSize=
"18dp"
android:textColor=
"#ffffff"
android:textColor=
"#ffffff"
android:gravity=
"center"
android:gravity=
"center"
android:id=
"@+id/start_messaging_button"
android:paddingLeft=
"20dp"
android:paddingBottom=
"2dp"
/>
android:paddingRight=
"20dp"
android:paddingTop=
"10dp"
android:paddingBottom=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:id=
"@+id/start_messaging_button"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
...
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