Commit cbfed8d2 authored by Grigory Fedorov's avatar Grigory Fedorov

ChatViewer: options menu moved from ChatViewerFragment.

Light refactoring.
parent 78d01152
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment