* @param componentTimestamp
* @return -1 for back, 1 for forward, 0 for nothing/reload
*/
private int findInHistory(UserRequest ureq) {
for (int i = historyPos-1; i>=0; i--) {
HistoryEntry he = history.get(i);
if (he.isSame(ureq)) {
// found "left" to the current position = left in time = back
historyPos = i; // make ready for future comparisons
return -1;
}
}
// not found -> check forward
int size = history.size();
for (int i = historyPos+1; i<size; i++) {
HistoryEntry he = history.get(i);
if (he.isSame(ureq)) {
// found "right" to the current position = right in time = forward
historyPos = i; // make ready for future comparisons
return 1;
}
}