Save refreshing state

This commit is contained in:
M66B 2019-03-04 21:19:17 +00:00
parent e7f40d1b2f
commit 434824a9fc
1 changed files with 4 additions and 0 deletions

View File

@ -1438,6 +1438,8 @@ public class FragmentMessages extends FragmentBase {
for (String name : values.keySet())
outState.putLongArray("fair:name:" + name, Helper.toLongArray(values.get(name)));
outState.putBoolean("fair:refreshing", swipeRefresh.isRefreshing());
if (rvMessage != null) {
Parcelable rv = rvMessage.getLayoutManager().onSaveInstanceState();
outState.putParcelable("fair:rv", rv);
@ -1462,6 +1464,8 @@ public class FragmentMessages extends FragmentBase {
values.get(name).add(value);
}
swipeRefresh.setRefreshing(savedInstanceState.getBoolean("fair:refreshing"));
if (rvMessage != null) {
Parcelable rv = savedInstanceState.getBundle("fair:rv");
rvMessage.getLayoutManager().onRestoreInstanceState(rv);