Update DownloaderFragment.java

This commit is contained in:
Tom 2023-06-26 21:01:06 +08:00 committed by GitHub
parent bab3d14d2c
commit ddbae646f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,11 +198,13 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment<DownloaderAdapte
SearchEngine.INSTANCE.addMapListener(mSearchListener);
getRecyclerView().addOnScrollListener(mScrollListener);
if (mAdapter != null)
if (mAdapter == null)
{
mAdapter.refreshData();
mAdapter.attach();
mAdapter = createAdapter();
}
mAdapter.refreshData();
mAdapter.attach();
mBottomPanel = new BottomPanel(this, view);
mToolbarController = new DownloaderToolbarController(view, requireActivity(), this);
@ -229,7 +231,6 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment<DownloaderAdapte
if (getRecyclerView() != null) {
getRecyclerView().removeOnScrollListener(mScrollListener);
}
mFab = null;
}
@Override