From bb0b1b5bba9061e6a01cb4e1a42b261cc833a731 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 1 Mar 2013 07:21:44 +0100 Subject: [PATCH] Store the latest comic state. --- .../java/net/pterodactylus/rhynodge/triggers/NewComicTrigger.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/rhynodge/triggers/NewComicTrigger.java b/src/main/java/net/pterodactylus/rhynodge/triggers/NewComicTrigger.java index 1b64c5b..fa3347c 100644 --- a/src/main/java/net/pterodactylus/rhynodge/triggers/NewComicTrigger.java +++ b/src/main/java/net/pterodactylus/rhynodge/triggers/NewComicTrigger.java @@ -45,6 +45,9 @@ public class NewComicTrigger implements Trigger { /** The new comics. */ private final List newComics = Lists.newArrayList(); + /** The latest comic state. */ + private ComicState mergedComicState; + @Override public State mergeStates(State previousState, State currentState) { checkArgument(previousState instanceof ComicState, "previous state must be a comic state"); @@ -54,7 +57,7 @@ public class NewComicTrigger implements Trigger { ComicState currentComicState = (ComicState) currentState; /* copy old state into new state. */ - ComicState mergedComicState = new ComicState(); + mergedComicState = new ComicState(); for (Comic comic : previousComicState) { mergedComicState.add(comic); } -- 2.7.4