Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-android
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
xabber-android
Commits
9f0d7c53
Commit
9f0d7c53
authored
May 20, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/1.0.10'
parents
21294b02
581cd0cd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
30 deletions
+26
-30
build.gradle
app/build.gradle
+2
-2
AbstractChat.java
...in/java/com/xabber/android/data/message/AbstractChat.java
+20
-26
ChatMessageAdapter.java
...ava/com/xabber/android/ui/adapter/ChatMessageAdapter.java
+3
-1
contact_list_drawer_account_item.xml
app/src/main/res/layout/contact_list_drawer_account_item.xml
+1
-1
No files found.
app/build.gradle
View file @
9f0d7c53
...
@@ -7,8 +7,8 @@ android {
...
@@ -7,8 +7,8 @@ android {
defaultConfig
{
defaultConfig
{
minSdkVersion
14
minSdkVersion
14
targetSdkVersion
22
targetSdkVersion
22
versionCode
18
1
versionCode
18
2
versionName
'1.0.
9
'
versionName
'1.0.
10
'
}
}
compileOptions
{
compileOptions
{
...
...
app/src/main/java/com/xabber/android/data/message/AbstractChat.java
View file @
9f0d7c53
...
@@ -62,56 +62,45 @@ public abstract class AbstractChat extends BaseEntity {
...
@@ -62,56 +62,45 @@ public abstract class AbstractChat extends BaseEntity {
* Number of messages from history to be shown for context purpose.
* Number of messages from history to be shown for context purpose.
*/
*/
private
static
final
int
PRELOADED_MESSAGES
=
3
;
private
static
final
int
PRELOADED_MESSAGES
=
3
;
/**
/**
* Current thread id.
* Ids of messages not loaded in to the memory.
* <p/>
* MUST BE ACCESSED FROM BACKGROUND THREAD ONLY.
*/
*/
private
String
threadId
;
protected
final
Collection
<
Long
>
historyIds
;
/**
* Sorted list of messages in this chat.
*/
protected
final
List
<
MessageItem
>
messages
;
/**
* List of messages to be sent.
*/
protected
final
Collection
<
MessageItem
>
sendQuery
;
/**
/**
* Whether chat is open and should be displayed as active chat.
* Whether chat is open and should be displayed as active chat.
*/
*/
protected
boolean
active
;
protected
boolean
active
;
/**
/**
* Whether changes in status should be record.
* Whether changes in status should be record.
*/
*/
protected
boolean
trackStatus
;
protected
boolean
trackStatus
;
/**
/**
* Whether user never received notifications from this chat.
* Whether user never received notifications from this chat.
*/
*/
protected
boolean
firstNotification
;
protected
boolean
firstNotification
;
/**
/**
* Last incoming message's text.
* Last incoming message's text.
*/
*/
protected
String
lastText
;
protected
String
lastText
;
/**
/**
* Last message's time.
* Last message's time.
*/
*/
protected
Date
lastTime
;
protected
Date
lastTime
;
protected
Date
creationTime
=
new
Date
();
/**
* Ids of messages not loaded in to the memory.
* <p/>
* MUST BE ACCESSED FROM BACKGROUND THREAD ONLY.
*/
protected
final
Collection
<
Long
>
historyIds
;
/**
* Sorted list of messages in this chat.
*/
protected
final
List
<
MessageItem
>
messages
;
/**
/**
*
List of messages to be sent
.
*
Current thread id
.
*/
*/
protected
final
Collection
<
MessageItem
>
sendQuery
;
private
String
threadId
;
protected
Date
creationTime
=
new
Date
();
private
boolean
isLastMessageIncoming
;
private
boolean
isLastMessageIncoming
;
protected
AbstractChat
(
final
String
account
,
final
String
user
)
{
protected
AbstractChat
(
final
String
account
,
final
String
user
)
{
...
@@ -396,6 +385,11 @@ public abstract class AbstractChat extends BaseEntity {
...
@@ -396,6 +385,11 @@ public abstract class AbstractChat extends BaseEntity {
.
getInstance
().
getSecurityLevel
(
account
,
user
)
!=
SecurityLevel
.
plain
)))
.
getInstance
().
getSecurityLevel
(
account
,
user
)
!=
SecurityLevel
.
plain
)))
save
=
false
;
save
=
false
;
Date
timestamp
=
new
Date
();
Date
timestamp
=
new
Date
();
if
(
text
.
trim
().
isEmpty
())
{
notify
=
false
;
}
if
(
notify
||
!
incoming
)
if
(
notify
||
!
incoming
)
openChat
();
openChat
();
if
(!
incoming
)
if
(!
incoming
)
...
...
app/src/main/java/com/xabber/android/ui/adapter/ChatMessageAdapter.java
View file @
9f0d7c53
...
@@ -113,8 +113,10 @@ public class ChatMessageAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
...
@@ -113,8 +113,10 @@ public class ChatMessageAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
case
VIEW_TYPE_ACTION_MESSAGE:
case
VIEW_TYPE_ACTION_MESSAGE:
ChatAction
action
=
messageItem
.
getAction
();
ChatAction
action
=
messageItem
.
getAction
();
String
time
=
StringUtils
.
getSmartTimeText
(
context
,
messageItem
.
getTimestamp
());
String
time
=
StringUtils
.
getSmartTimeText
(
context
,
messageItem
.
getTimestamp
());
String
name
=
RosterManager
.
getInstance
().
getBestContact
(
account
,
messageItem
.
getChat
().
getUser
()).
getName
();
((
BasicMessage
)
holder
).
messageText
.
setText
(
time
+
": "
((
BasicMessage
)
holder
).
messageText
.
setText
(
time
+
": "
+
action
.
getText
(
context
,
messageItem
.
getResource
(),
messageItem
.
getSpannable
().
toString
()));
+
action
.
getText
(
context
,
name
,
messageItem
.
getSpannable
().
toString
()));
break
;
break
;
case
VIEW_TYPE_INCOMING_MESSAGE:
case
VIEW_TYPE_INCOMING_MESSAGE:
...
...
app/src/main/res/layout/contact_list_drawer_account_item.xml
View file @
9f0d7c53
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
android:singleLine=
"true"
android:singleLine=
"true"
android:text=
"example@example.com"
android:text=
"example@example.com"
android:textColor=
"@color/grey_500"
android:textColor=
"@color/grey_500"
android:textSize=
"1
4
sp"
/>
android:textSize=
"1
2
sp"
/>
<TextView
<TextView
android:id=
"@+id/status"
android:id=
"@+id/status"
...
...
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