Skip to content

Commit

Permalink
Update ServiceOpenPreviousView.java
Browse files Browse the repository at this point in the history
  • Loading branch information
portlek committed Sep 30, 2024
1 parent ec44ca1 commit 8b0a22a
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ public void accept(@NotNull final PipelineContextView.Open ctx) {
for (final Viewer viewer : ctx.context().viewers()) {
final MetadataAccess metadata = viewer.metadata();
final ContextualViewer oldContext = metadata.get(MetadataKeyHolder.CONTEXTUAL_VIEWER);
if (oldContext != null) {
Deque<ContextRender> previousViews = metadata.get(MetadataKeyHolder.PREVIOUS_VIEWS);
if (previousViews == null) {
previousViews = new LinkedList<>();
metadata.setFixed(MetadataKeyHolder.PREVIOUS_VIEWS, previousViews);
}
previousViews.add(oldContext.context());
if (oldContext == null) {
continue;
}
Deque<ContextRender> previousViews = metadata.get(MetadataKeyHolder.PREVIOUS_VIEWS);
if (previousViews == null) {
previousViews = new LinkedList<>();
metadata.setFixed(MetadataKeyHolder.PREVIOUS_VIEWS, previousViews);
}
previousViews.add(oldContext.context());
}
}

Expand Down

0 comments on commit 8b0a22a

Please sign in to comment.