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
f3411ee0
Commit
f3411ee0
authored
Feb 10, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ChatViewer: all fragments completely updated on new message. Incoming message animation removed.
parent
3932760b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
19 deletions
+17
-19
ChatViewer.java
app/src/main/java/com/xabber/android/ui/ChatViewer.java
+12
-19
ChatViewerAdapter.java
...java/com/xabber/android/ui/adapter/ChatViewerAdapter.java
+5
-0
No files found.
app/src/main/java/com/xabber/android/ui/ChatViewer.java
View file @
f3411ee0
...
...
@@ -65,11 +65,6 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
private
String
extraText
=
null
;
private
boolean
isIncoming
=
false
;
private
String
incomingAccount
;
private
String
incomingUser
;
ChatViewerAdapter
chatViewerAdapter
;
ViewPager
viewPager
;
...
...
@@ -250,13 +245,19 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
@Override
public
void
onChatChanged
(
final
String
account
,
final
String
user
,
final
boolean
incoming
)
{
chatViewerAdapter
.
onChange
();
if
(
incoming
)
{
isIncoming
=
true
;
incomingAccount
=
account
;
incomingUser
=
user
;
String
currentAccount
=
null
;
String
currentUser
=
null
;
AbstractChat
chatByPageNumber
=
chatViewerAdapter
.
getChatByPageNumber
(
viewPager
.
getCurrentItem
());
if
(
chatByPageNumber
!=
null
)
{
currentAccount
=
chatByPageNumber
.
getAccount
();
currentUser
=
chatByPageNumber
.
getUser
();
}
chatViewerAdapter
.
onChange
();
selectPage
(
currentAccount
,
currentUser
,
false
);
}
@Override
...
...
@@ -302,6 +303,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
if
(
selectedChat
==
null
)
{
setTitle
(
getString
(
R
.
string
.
chat_list
));
MessageManager
.
getInstance
().
removeVisibleChat
();
return
;
}
...
...
@@ -365,15 +367,6 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
updateRegisteredChats
();
updateRegisteredRecentChatsFragments
();
if
(
isIncoming
)
{
for
(
ChatViewerFragment
chat
:
registeredChats
)
{
if
(
chat
.
isEqual
(
incomingAccount
,
incomingUser
))
{
chat
.
updateChat
(
true
);
}
}
isIncoming
=
false
;
}
Fragment
currentFragment
=
chatViewerAdapter
.
getCurrentFragment
();
if
(
currentFragment
instanceof
ChatViewerFragment
)
{
((
ChatViewerFragment
)
currentFragment
).
setInputFocus
();
...
...
app/src/main/java/com/xabber/android/ui/adapter/ChatViewerAdapter.java
View file @
f3411ee0
...
...
@@ -171,4 +171,9 @@ public class ChatViewerAdapter extends FragmentStatePagerAdapter implements Upda
public
ArrayList
<
AbstractChat
>
getActiveChats
()
{
return
activeChats
;
}
@Override
public
int
getItemPosition
(
Object
object
)
{
return
POSITION_NONE
;
}
}
\ No newline at end of file
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