From: David ‘Bombe’ Roden Date: Wed, 29 May 2013 19:35:26 +0000 (+0200) Subject: Return the correct metadata. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=561637105a339b696676a04e982df5a9b0eed410;p=sonitus.git Return the correct metadata. --- diff --git a/src/main/java/net/pterodactylus/sonitus/data/filter/PredicateFilter.java b/src/main/java/net/pterodactylus/sonitus/data/filter/PredicateFilter.java index 4000a5b..b400dc7 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/filter/PredicateFilter.java +++ b/src/main/java/net/pterodactylus/sonitus/data/filter/PredicateFilter.java @@ -83,6 +83,14 @@ public class PredicateFilter extends DummyFilter { } @Override + public Metadata metadata() { + if (metadataMatches.get()) { + return filter.metadata(); + } + return super.metadata(); + } + + @Override public void metadataUpdated(Metadata metadata) { metadataMatches.set(metadataPredicate.apply(metadata)); if (metadataMatches.get()) {