Restore scroll position (don't forget it)

This commit is contained in:
Martin Fietz 2015-11-23 21:28:15 +01:00
parent 59e0615a40
commit 24d0efad1e
1 changed files with 0 additions and 5 deletions

View File

@ -211,11 +211,6 @@ public class QueueFragment extends Fragment {
float offset = prefs.getFloat(PREF_SCROLL_OFFSET, 0.0f);
if (position > 0 || offset > 0) {
layoutManager.scrollToPositionWithOffset(position, (int) offset);
// restore once, then forget
SharedPreferences.Editor editor = prefs.edit();
editor.putInt(PREF_SCROLL_POSITION, 0);
editor.putFloat(PREF_SCROLL_OFFSET, 0.0f);
editor.commit();
}
}