|
|
|
@ -761,6 +761,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
this, type, found, viewType,
|
|
|
|
|
compact, zoom, sort, ascending, filter_duplicates,
|
|
|
|
|
iProperties);
|
|
|
|
|
adapter.setStateRestorationPolicy(RecyclerView.Adapter.StateRestorationPolicy.PREVENT);
|
|
|
|
|
rvMessage.setAdapter(adapter);
|
|
|
|
|
|
|
|
|
|
sbThread.setOnTouchListener(new View.OnTouchListener() {
|
|
|
|
@ -1773,6 +1774,29 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void ready(long id) {
|
|
|
|
|
iProperties.setValue("ready", id, true);
|
|
|
|
|
|
|
|
|
|
if (!values.containsKey("expanded"))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
for (long expanded : values.get("expanded"))
|
|
|
|
|
if (!iProperties.getValue("ready", expanded))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
getMainHandler().post(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
try {
|
|
|
|
|
adapter.setStateRestorationPolicy(RecyclerView.Adapter.StateRestorationPolicy.ALLOW);
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void move(long id, String type) {
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
@ -3672,11 +3696,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
if (rvMessage != null) {
|
|
|
|
|
Parcelable rv = rvMessage.getLayoutManager().onSaveInstanceState();
|
|
|
|
|
outState.putParcelable("fair:rv", rv);
|
|
|
|
|
|
|
|
|
|
LinearLayoutManager llm = (LinearLayoutManager) rvMessage.getLayoutManager();
|
|
|
|
|
outState.putInt("fair:scroll", llm.findFirstVisibleItemPosition());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
values.remove("ready");
|
|
|
|
|
|
|
|
|
|
if (selectionTracker != null)
|
|
|
|
|
selectionTracker.onSaveInstanceState(outState);
|
|
|
|
|
|
|
|
|
@ -3704,8 +3727,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
rvMessage.getLayoutManager().onRestoreInstanceState(rv);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
adapter.gotoPos(savedInstanceState.getInt("fair:scroll"));
|
|
|
|
|
|
|
|
|
|
if (selectionTracker != null)
|
|
|
|
|
selectionTracker.onRestoreInstanceState(savedInstanceState);
|
|
|
|
|
}
|
|
|
|
|