Fixed lists scrolling to top

This commit is contained in:
M66B 2021-05-01 20:38:57 +02:00
parent ec31b6ce6c
commit 344114aafe
1 changed files with 2 additions and 1 deletions

View File

@ -762,7 +762,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
this, type, found, viewType,
compact, zoom, sort, ascending, filter_duplicates,
iProperties);
adapter.setStateRestorationPolicy(RecyclerView.Adapter.StateRestorationPolicy.PREVENT);
if (viewType == AdapterMessage.ViewType.THREAD)
adapter.setStateRestorationPolicy(RecyclerView.Adapter.StateRestorationPolicy.PREVENT);
rvMessage.setAdapter(adapter);
sbThread.setOnTouchListener(new View.OnTouchListener() {