fix: fix toolbar oopsie

This commit is contained in:
LucasGGamerM 2023-09-29 19:15:53 -03:00
parent 03cb0b3c47
commit e8631e432a
1 changed files with 5 additions and 3 deletions

View File

@ -40,11 +40,13 @@ public abstract class MastodonRecyclerFragment<T> extends BaseRecyclerFragment<T
@CallSuper @CallSuper
public void onViewCreated(View view, Bundle savedInstanceState){ public void onViewCreated(View view, Bundle savedInstanceState){
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
if(wantsElevationOnScrollEffect()) if (getParentFragment() instanceof HasElevationOnScrollListener elevator)
list.addOnScrollListener(elevator.getElevationOnScrollListener());
else if(wantsElevationOnScrollEffect())
list.addOnScrollListener(elevationOnScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, getViewsForElevationEffect())); list.addOnScrollListener(elevationOnScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, getViewsForElevationEffect()));
if(refreshLayout!=null){ if(refreshLayout!=null)
setRefreshLayoutColors(refreshLayout); setRefreshLayoutColors(refreshLayout);
}
} }
@Override @Override