~singpolyma/cheogram-android

af74c3604cbcb0e67af56980f14e81eef9ad388d — Daniel Gultsch 4 years ago 02351dc
fixed R8 weirdness
M proguard-rules.pro => proguard-rules.pro +3 -0
@@ 21,6 21,9 @@
-dontwarn java.lang.**
-dontwarn javax.lang.**

-keepclassmembers class eu.siacs.conversations.http.services.** {
  !transient <fields>;
}

# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
# EnclosingMethod is required to use InnerClasses.

M src/main/java/eu/siacs/conversations/http/services/MuclumbusService.java => src/main/java/eu/siacs/conversations/http/services/MuclumbusService.java +1 -2
@@ 4,7 4,6 @@ import com.google.common.base.Objects;

import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;

import eu.siacs.conversations.services.AvatarService;


@@ 83,7 82,7 @@ public interface MuclumbusService {

    class SearchRequest {

        public Set<String> keywords;
        public final Set<String> keywords;

        public SearchRequest(String keyword) {
            this.keywords = Collections.singleton(keyword);

M src/main/java/eu/siacs/conversations/services/ChannelDiscoveryService.java => src/main/java/eu/siacs/conversations/services/ChannelDiscoveryService.java +4 -3
@@ 38,7 38,8 @@ 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());


@@ 57,7 58,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);


@@ 98,7 98,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