Fix payments banner causing weird conversation list animations.
This commit is contained in:
parent
dce8fde195
commit
18bb876d1b
2 changed files with 11 additions and 15 deletions
|
@ -315,6 +315,7 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
|||
|
||||
updateReminders();
|
||||
EventBus.getDefault().register(this);
|
||||
itemAnimator.disable();
|
||||
|
||||
if (Util.isDefaultSmsProvider(requireContext())) {
|
||||
InsightsLauncher.showInsightsModal(requireContext(), requireFragmentManager());
|
||||
|
@ -355,6 +356,7 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
|||
super.onStart();
|
||||
ConversationFragment.prepare(requireContext());
|
||||
ApplicationDependencies.getAppForegroundObserver().addListener(appForegroundObserver);
|
||||
itemAnimator.disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -695,30 +697,18 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
|||
}
|
||||
|
||||
private void animatePaymentUnreadStatusIn() {
|
||||
animatePaymentUnreadStatus(ConstraintSet.VISIBLE);
|
||||
paymentNotificationView.get().setVisibility(View.VISIBLE);
|
||||
unreadPaymentsDot.animate().alpha(1);
|
||||
}
|
||||
|
||||
private void animatePaymentUnreadStatusOut() {
|
||||
if (paymentNotificationView.resolved()) {
|
||||
animatePaymentUnreadStatus(ConstraintSet.GONE);
|
||||
paymentNotificationView.get().setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
unreadPaymentsDot.animate().alpha(0);
|
||||
}
|
||||
|
||||
private void animatePaymentUnreadStatus(int constraintSetVisibility) {
|
||||
paymentNotificationView.get();
|
||||
|
||||
TransitionManager.beginDelayedTransition(constraintLayout);
|
||||
|
||||
ConstraintSet currentLayout = new ConstraintSet();
|
||||
currentLayout.clone(constraintLayout);
|
||||
|
||||
currentLayout.setVisibility(R.id.payments_notification, constraintSetVisibility);
|
||||
currentLayout.applyTo(constraintLayout);
|
||||
}
|
||||
|
||||
private void onSearchResultChanged(@Nullable SearchResult result) {
|
||||
result = result != null ? result : SearchResult.EMPTY;
|
||||
searchAdapter.updateResults(result);
|
||||
|
|
|
@ -27,8 +27,14 @@ public class ConversationListItemAnimator extends DefaultItemAnimator {
|
|||
shouldDisable = false;
|
||||
}
|
||||
|
||||
@MainThread
|
||||
public void disable() {
|
||||
setMoveDuration(0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* We need to reasonable ensure that the animation has started before we disable things here, so we add a slight delay.
|
||||
* We need to reasonably ensure that the animation has started before we disable things here, so we add a slight delay.
|
||||
*/
|
||||
@MainThread
|
||||
public void postDisable(Handler handler) {
|
||||
|
|
Loading…
Add table
Reference in a new issue