fix: make app compile again

This commit is contained in:
LucasGGamerM 2023-09-28 13:52:04 -03:00
parent d2de62ee55
commit 7fdea9710f
3 changed files with 6 additions and 4 deletions

View File

@ -315,7 +315,7 @@ public class AccountSessionManager{
} }
private void updateSessionLocalInfo(AccountSession session){ public void updateSessionLocalInfo(AccountSession session){
new GetOwnAccount() new GetOwnAccount()
.setCallback(new Callback<>(){ .setCallback(new Callback<>(){
@Override @Override

View File

@ -4,6 +4,7 @@ import android.app.Activity;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.view.View;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import org.joinmastodon.android.GlobalUserPreferences; import org.joinmastodon.android.GlobalUserPreferences;
@ -35,6 +36,7 @@ import java.util.stream.Collectors;
import me.grishka.appkit.Nav; import me.grishka.appkit.Nav;
import me.grishka.appkit.api.Callback; import me.grishka.appkit.api.Callback;
import me.grishka.appkit.api.ErrorResponse; import me.grishka.appkit.api.ErrorResponse;
import me.grishka.appkit.utils.V;
public class SearchFragment extends BaseStatusListFragment<SearchResult>{ public class SearchFragment extends BaseStatusListFragment<SearchResult>{
private String currentQuery; private String currentQuery;

View File

@ -1227,7 +1227,7 @@ public class UiUtils {
return Optional.empty(); return Optional.empty();
} }
return Optional.of(new GetSearchResults(query.getQuery(), type, true).setCallback(new Callback<>() { return Optional.of(new GetSearchResults(query.getQuery(), type, true, null, 0, 0).setCallback(new Callback<>() {
@Override @Override
public void onSuccess(SearchResults results) { public void onSuccess(SearchResults results) {
Optional<T> result = extractResult.apply(results); Optional<T> result = extractResult.apply(results);
@ -1324,7 +1324,7 @@ public class UiUtils {
} }
public static MastodonAPIRequest<SearchResults> lookupAccountHandle(Context context, String accountID, Pair<String, Optional<String>> queryHandle, BiConsumer<Class<? extends Fragment>, Bundle> go) { public static MastodonAPIRequest<SearchResults> lookupAccountHandle(Context context, String accountID, Pair<String, Optional<String>> queryHandle, BiConsumer<Class<? extends Fragment>, Bundle> go) {
String fullHandle = ("@" + queryHandle.first) + (queryHandle.second.map(domain -> "@" + domain).orElse("")); String fullHandle = ("@" + queryHandle.first) + (queryHandle.second.map(domain -> "@" + domain).orElse(""));
return new GetSearchResults(fullHandle, GetSearchResults.Type.ACCOUNTS, true) return new GetSearchResults(fullHandle, GetSearchResults.Type.ACCOUNTS, true, null, 0, 0)
.setCallback(new Callback<>() { .setCallback(new Callback<>() {
@Override @Override
public void onSuccess(SearchResults results) { public void onSuccess(SearchResults results) {
@ -1387,7 +1387,7 @@ public class UiUtils {
}) })
.execNoAuth(uri.getHost())); .execNoAuth(uri.getHost()));
} else if (looksLikeMastodonUrl(url)) { } else if (looksLikeMastodonUrl(url)) {
return Optional.of(new GetSearchResults(url, null, true) return Optional.of(new GetSearchResults(url, null, true, null, 0, 0)
.setCallback(new Callback<>() { .setCallback(new Callback<>() {
@Override @Override
public void onSuccess(SearchResults results) { public void onSuccess(SearchResults results) {