Remember scroll position for internal settings.

This commit is contained in:
Cody Henthorne
2022-10-26 13:47:28 -04:00
committed by Alex Hart
parent a0c48bed6e
commit 490e29f758
2 changed files with 35 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ public final class InternalValues extends SignalStoreValues {
public static final String SHAKE_TO_REPORT = "internal.shake_to_report";
public static final String DISABLE_STORAGE_SERVICE = "internal.disable_storage_service";
public static final String FORCE_WEBSOCKET_MODE = "internal.force_websocket_mode";
public static final String LAST_SCROLL_POSITION = "internal.last_scroll_position";
InternalValues(KeyValueStore store) {
super(store);
@@ -176,4 +177,12 @@ public final class InternalValues extends SignalStoreValues {
return false;
}
}
public void setLastScrollPosition(int position) {
putInteger(LAST_SCROLL_POSITION, position);
}
public int getLastScrollPosition() {
return getInteger(LAST_SCROLL_POSITION, 0);
}
}