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.setLayoutManager(layoutManager);
|
||||
list.addOnScrollListener(scrollListener);
|
||||
list.setItemAnimator(null);
|
||||
|
||||
loadMoreView = inflater.inflate(R.layout.load_more_header, container, false);
|
||||
loadMoreView.setOnClickListener(new OnClickListener() {
|
||||
@ -171,7 +172,6 @@ public class ConversationFragment extends Fragment
|
||||
if (this.recipients != null && this.threadId != -1) {
|
||||
list.setAdapter(new ConversationAdapter(getActivity(), masterSecret, locale, selectionClickListener, null, this.recipients));
|
||||
getLoaderManager().restartLoader(0, Bundle.EMPTY, this);
|
||||
list.getItemAnimator().setMoveDuration(120);
|
||||
}
|
||||
}
|
||||
|
||||
@ -236,14 +236,8 @@ public class ConversationFragment extends Fragment
|
||||
}
|
||||
|
||||
public void scrollToBottom() {
|
||||
list.getItemAnimator().isRunning(new ItemAnimatorFinishedListener() {
|
||||
@Override
|
||||
public void onAnimationsFinished() {
|
||||
list.stopScroll();
|
||||
list.smoothScrollToPosition(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void handleCopyMessage(final Set<MessageRecord> messageRecords) {
|
||||
List<MessageRecord> messageList = new LinkedList<>(messageRecords);
|
||||
|
Loading…
Reference in New Issue
Block a user