diff options
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/http/services/MuclumbusService.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/de/pixart/messenger/http/services/MuclumbusService.java b/src/main/java/de/pixart/messenger/http/services/MuclumbusService.java index b849b664d..6ea1adad5 100644 --- a/src/main/java/de/pixart/messenger/http/services/MuclumbusService.java +++ b/src/main/java/de/pixart/messenger/http/services/MuclumbusService.java @@ -81,7 +81,7 @@ public interface MuclumbusService { } class SearchRequest { - public Set<String> keywords; + public final Set<String> keywords; public SearchRequest(String keyword) { this.keywords = Collections.singleton(keyword); diff --git a/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java b/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java index 2e376360a..a9b4c6504 100644 --- a/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java +++ b/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java @@ -41,7 +41,7 @@ public class ChannelDiscoveryService { } void initializeMuclumbusService() { - OkHttpClient.Builder builder = new OkHttpClient.Builder(); + final OkHttpClient.Builder builder = new OkHttpClient.Builder(); if (service.useTorToConnect()) { try { builder.proxy(HttpConnectionManager.getProxy()); @@ -61,7 +61,6 @@ public class ChannelDiscoveryService { void discover(String query, OnChannelSearchResultsFound onChannelSearchResultsFound) { final boolean all = query == null || query.trim().isEmpty(); - Log.d(Config.LOGTAG, "discover channels. query=" + query); List<MuclumbusService.Room> result = cache.getIfPresent(all ? "" : query); if (result != null) { onChannelSearchResultsFound.onChannelSearchResultsFound(result); @@ -102,8 +101,8 @@ public class ChannelDiscoveryService { } private void discoverChannels(final String query, OnChannelSearchResultsFound listener) { - Call<MuclumbusService.SearchResult> searchResultCall = muclumbusService.search(new MuclumbusService.SearchRequest(query)); - + MuclumbusService.SearchRequest searchRequest = new MuclumbusService.SearchRequest(query); + Call<MuclumbusService.SearchResult> searchResultCall = muclumbusService.search(searchRequest); searchResultCall.enqueue(new Callback<MuclumbusService.SearchResult>() { @Override public void onResponse(@NonNull Call<MuclumbusService.SearchResult> call, @NonNull Response<MuclumbusService.SearchResult> response) { |