jumpTo method

FeedEntry jumpTo(
  1. FeedEntry entry
)

Applies entry (favourite, share code, theme of the day): drops any forward history and pushes it, so back returns to where the user was.

Implementation

FeedEntry jumpTo(FeedEntry entry) {
  if (entry != current) {
    _history
      ..removeRange(_cursor + 1, _history.length)
      ..add(entry);
    _cursor++;
    _trim();
  }
  _notify();
  return current;
}