mirror of https://github.com/M66B/FairEmail.git
Save recyclerview state
This commit is contained in:
parent
d08c9b34bb
commit
38352c1760
|
@ -1437,6 +1437,11 @@ public class FragmentMessages extends FragmentBase {
|
||||||
for (String name : values.keySet())
|
for (String name : values.keySet())
|
||||||
outState.putLongArray(name, Helper.toLongArray(values.get(name)));
|
outState.putLongArray(name, Helper.toLongArray(values.get(name)));
|
||||||
|
|
||||||
|
if (rvMessage != null) {
|
||||||
|
Parcelable rv = rvMessage.getLayoutManager().onSaveInstanceState();
|
||||||
|
outState.putParcelable("rv", rv);
|
||||||
|
}
|
||||||
|
|
||||||
if (selectionTracker != null)
|
if (selectionTracker != null)
|
||||||
selectionTracker.onSaveInstanceState(outState);
|
selectionTracker.onSaveInstanceState(outState);
|
||||||
}
|
}
|
||||||
|
@ -1456,6 +1461,11 @@ public class FragmentMessages extends FragmentBase {
|
||||||
values.get(name).add(value);
|
values.get(name).add(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rvMessage != null) {
|
||||||
|
Parcelable rv = savedInstanceState.getBundle("rv");
|
||||||
|
rvMessage.getLayoutManager().onRestoreInstanceState(rv);
|
||||||
|
}
|
||||||
|
|
||||||
if (selectionTracker != null)
|
if (selectionTracker != null)
|
||||||
selectionTracker.onRestoreInstanceState(savedInstanceState);
|
selectionTracker.onRestoreInstanceState(savedInstanceState);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue