mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Eliminate item animations in ConversationFragment
Experience feels faster this way too // FREEBIE
This commit is contained in:
parent
d599c058c6
commit
5804213152
@ -109,6 +109,7 @@ public class ConversationFragment extends Fragment
|
|||||||
list.setHasFixedSize(false);
|
list.setHasFixedSize(false);
|
||||||
list.setLayoutManager(layoutManager);
|
list.setLayoutManager(layoutManager);
|
||||||
list.addOnScrollListener(scrollListener);
|
list.addOnScrollListener(scrollListener);
|
||||||
|
list.setItemAnimator(null);
|
||||||
|
|
||||||
loadMoreView = inflater.inflate(R.layout.load_more_header, container, false);
|
loadMoreView = inflater.inflate(R.layout.load_more_header, container, false);
|
||||||
loadMoreView.setOnClickListener(new OnClickListener() {
|
loadMoreView.setOnClickListener(new OnClickListener() {
|
||||||
@ -171,7 +172,6 @@ public class ConversationFragment extends Fragment
|
|||||||
if (this.recipients != null && this.threadId != -1) {
|
if (this.recipients != null && this.threadId != -1) {
|
||||||
list.setAdapter(new ConversationAdapter(getActivity(), masterSecret, locale, selectionClickListener, null, this.recipients));
|
list.setAdapter(new ConversationAdapter(getActivity(), masterSecret, locale, selectionClickListener, null, this.recipients));
|
||||||
getLoaderManager().restartLoader(0, Bundle.EMPTY, this);
|
getLoaderManager().restartLoader(0, Bundle.EMPTY, this);
|
||||||
list.getItemAnimator().setMoveDuration(120);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,13 +236,7 @@ public class ConversationFragment extends Fragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void scrollToBottom() {
|
public void scrollToBottom() {
|
||||||
list.getItemAnimator().isRunning(new ItemAnimatorFinishedListener() {
|
list.smoothScrollToPosition(0);
|
||||||
@Override
|
|
||||||
public void onAnimationsFinished() {
|
|
||||||
list.stopScroll();
|
|
||||||
list.smoothScrollToPosition(0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleCopyMessage(final Set<MessageRecord> messageRecords) {
|
private void handleCopyMessage(final Set<MessageRecord> messageRecords) {
|
||||||
|
Loading…
Reference in New Issue
Block a user