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
cbfed8d2
Commit
cbfed8d2
authored
Feb 17, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ChatViewer: options menu moved from ChatViewerFragment.
Light refactoring.
parent
78d01152
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
299 additions
and
292 deletions
+299
-292
AbstractChat.java
...in/java/com/xabber/android/data/message/AbstractChat.java
+2
-3
ChatViewer.java
app/src/main/java/com/xabber/android/ui/ChatViewer.java
+287
-21
ChatViewerFragment.java
...c/main/java/com/xabber/android/ui/ChatViewerFragment.java
+10
-257
ChatViewerAdapter.java
...java/com/xabber/android/ui/adapter/ChatViewerAdapter.java
+0
-11
No files found.
app/src/main/java/com/xabber/android/data/message/AbstractChat.java
View file @
cbfed8d2
...
...
@@ -646,9 +646,8 @@ public abstract class AbstractChat extends BaseEntity {
int
count
=
PRELOADED_MESSAGES
+
NotificationManager
.
getInstance
()
.
getNotificationMessageCount
(
account
,
user
);
Iterator
<
MessageItem
>
iterator
=
messages
.
iterator
();
while
(
iterator
.
hasNext
())
if
(
iterator
.
next
().
isIncoming
())
{
for
(
MessageItem
message
:
messages
)
if
(
message
.
isIncoming
())
{
count
-=
1
;
if
(
count
<=
0
)
return
0
;
...
...
app/src/main/java/com/xabber/android/ui/ChatViewer.java
View file @
cbfed8d2
This diff is collapsed.
Click to expand it.
app/src/main/java/com/xabber/android/ui/ChatViewerFragment.java
View file @
cbfed8d2
This diff is collapsed.
Click to expand it.
app/src/main/java/com/xabber/android/ui/adapter/ChatViewerAdapter.java
View file @
cbfed8d2
...
...
@@ -29,8 +29,6 @@ public class ChatViewerAdapter extends FragmentStatePagerAdapter {
private
FinishUpdateListener
finishUpdateListener
;
private
Fragment
currentFragment
;
private
static
final
int
TOTAL_COUNT
=
200
;
private
static
final
int
OFFSET
=
TOTAL_COUNT
/
2
;
...
...
@@ -165,15 +163,6 @@ public class ChatViewerAdapter extends FragmentStatePagerAdapter {
return
realPosition
-
1
;
}
@Override
public
void
startUpdate
(
ViewGroup
container
)
{
if
(
currentFragment
instanceof
ChatViewerFragment
)
{
((
ChatViewerFragment
)
currentFragment
).
saveInputState
();
}
super
.
startUpdate
(
container
);
}
@Override
public
void
finishUpdate
(
ViewGroup
container
)
{
super
.
finishUpdate
(
container
);
...
...
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