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
a2edd876
Commit
a2edd876
authored
Feb 11, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ChatViewerAdapter: chats order fixed.
parent
d9a6560a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
ChatViewerAdapter.java
...java/com/xabber/android/ui/adapter/ChatViewerAdapter.java
+11
-3
No files found.
app/src/main/java/com/xabber/android/ui/adapter/ChatViewerAdapter.java
View file @
a2edd876
...
...
@@ -150,11 +150,19 @@ public class ChatViewerAdapter extends FragmentStatePagerAdapter {
private
int
getRealPagePosition
(
int
virtualPosition
)
{
return
abs
(
virtualPosition
-
OFFSET
)
%
getRealCount
();
int
realCount
=
getRealCount
();
int
pageNumber
=
abs
(
virtualPosition
-
OFFSET
)
%
realCount
;
if
(
virtualPosition
>=
OFFSET
)
{
return
pageNumber
;
}
else
{
return
pageNumber
==
0
?
0
:
realCount
-
pageNumber
;
}
}
private
int
getChatIndexFromRealPosition
(
int
virtu
alPosition
)
{
return
virtu
alPosition
-
1
;
private
int
getChatIndexFromRealPosition
(
int
re
alPosition
)
{
return
re
alPosition
-
1
;
}
@Override
...
...
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