Created
February 7, 2022 22:56
-
-
Save victorbrndls/edce0f20b261c1617b728fc893749c6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int addQueryListener(QueryListener queryListener) { | |
Query query = queryListener.getQuery(); | |
QueryListenersInfo queryInfo = queries.get(query); | |
boolean firstListen = queryInfo == null; | |
if (firstListen) { | |
// QueryListenersInfo is only created if no identical query is registered | |
queryInfo = new QueryListenersInfo(); | |
queries.put(query, queryInfo); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment