Skip to content

Commit

Permalink
Merge pull request #238 from brotherlogic/add_out
Browse files Browse the repository at this point in the history
add_out
  • Loading branch information
brotherlogic committed Apr 6, 2020
2 parents 2b9f8f5 + d98e92e commit 778548b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions recordprinterutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ func (s *Server) move(ctx context.Context, move *pbrm.RecordMove) error {
lines = append(lines, fmt.Sprintf("After: %v", move.GetAfterContext().GetAfterInstance()))
}

// Also add in the after surrounds
if move.GetAfterContext().GetBeforeInstance() != 0 {
bef, _ := s.bridge.getRecord(ctx, move.GetAfterContext().GetBeforeInstance())
lines = append(lines, fmt.Sprintf(" %v\n", bef.GetRelease().Title))
}
lines = append(lines, fmt.Sprintf(" %v\n", record.GetRelease().Title))
if move.GetAfterContext().GetAfterInstance() != 0 {
aft, _ := s.bridge.getRecord(ctx, move.GetAfterContext().GetAfterInstance())
lines = append(lines, fmt.Sprintf(" %v\n", aft.GetRelease().Title))
}

err = s.bridge.print(ctx, lines, move, true)
s.config.LastPrint = time.Now().Unix()
if err != nil {
Expand Down

0 comments on commit 778548b

Please sign in to comment.