remove unused method parameters

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-03-07 13:20:23 +01:00
parent 5ad6da86f1
commit 0fe562d415
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 17 additions and 17 deletions

View file

@ -71,6 +71,7 @@ import com.nextcloud.talk.utils.preferences.AppPreferences;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode; import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import org.parceler.Parcels; import org.parceler.Parcels;
import java.io.IOException; import java.io.IOException;
@ -255,7 +256,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
adapter = new FlexibleAdapter<>(contactItems, getActivity(), false); adapter = new FlexibleAdapter<>(contactItems, getActivity(), false);
if (currentUser != null) { if (currentUser != null) {
fetchData(true); fetchData();
} }
} }
@ -459,7 +460,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
} }
} }
private void fetchData(boolean startFromScratch) { private void fetchData() {
dispose(null); dispose(null);
alreadyFetching = true; alreadyFetching = true;
@ -506,12 +507,12 @@ public class ContactsController extends BaseController implements SearchView.OnQ
.retry(3) .retry(3)
.subscribe(new Observer<ResponseBody>() { .subscribe(new Observer<ResponseBody>() {
@Override @Override
public void onSubscribe(Disposable d) { public void onSubscribe(@NotNull Disposable d) {
contactsQueryDisposable = d; contactsQueryDisposable = d;
} }
@Override @Override
public void onNext(ResponseBody responseBody) { public void onNext(@NotNull ResponseBody responseBody) {
if (responseBody != null) { if (responseBody != null) {
Participant participant; Participant participant;
@ -636,7 +637,8 @@ public class ContactsController extends BaseController implements SearchView.OnQ
} }
if (o1 instanceof ContactItem && o2 instanceof ContactItem) { if (o1 instanceof ContactItem && o2 instanceof ContactItem) {
if ("groups".equals(((ContactItem) o1).getModel().getSource()) && "groups".equals(((ContactItem) o2).getModel().getSource())) { if ("groups".equals(((ContactItem) o1).getModel().getSource()) &&
"groups".equals(((ContactItem) o2).getModel().getSource())) {
return firstName.compareToIgnoreCase(secondName); return firstName.compareToIgnoreCase(secondName);
} else if ("groups".equals(((ContactItem) o1).getModel().getSource())) { } else if ("groups".equals(((ContactItem) o1).getModel().getSource())) {
return -1; return -1;
@ -661,7 +663,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
} }
@Override @Override
public void onError(Throwable e) { public void onError(@NotNull Throwable e) {
if (swipeRefreshLayout != null) { if (swipeRefreshLayout != null) {
swipeRefreshLayout.setRefreshing(false); swipeRefreshLayout.setRefreshing(false);
} }
@ -679,7 +681,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
disengageProgressBar(); disengageProgressBar();
} }
}); });
} }
private void prepareViews() { private void prepareViews() {
@ -688,7 +689,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
recyclerView.setHasFixedSize(true); recyclerView.setHasFixedSize(true);
recyclerView.setAdapter(adapter); recyclerView.setAdapter(adapter);
swipeRefreshLayout.setOnRefreshListener(() -> fetchData(true)); swipeRefreshLayout.setOnRefreshListener(this::fetchData);
swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary); swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
swipeRefreshLayout.setProgressBackgroundColorSchemeResource(R.color.refresh_spinner_background); swipeRefreshLayout.setProgressBackgroundColorSchemeResource(R.color.refresh_spinner_background);
@ -759,7 +760,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
public boolean onQueryTextChange(String newText) { public boolean onQueryTextChange(String newText) {
if (!newText.equals("") && adapter.hasNewFilter(newText)) { if (!newText.equals("") && adapter.hasNewFilter(newText)) {
adapter.setFilter(newText); adapter.setFilter(newText);
fetchData(true); fetchData();
} else if (newText.equals("")) { } else if (newText.equals("")) {
adapter.setFilter(""); adapter.setFilter("");
adapter.updateDataSet(contactItems); adapter.updateDataSet(contactItems);

View file

@ -374,7 +374,7 @@ public class OperationsMenuController extends BaseController {
@io.reactivex.annotations.NonNull RoomOverall roomOverall @io.reactivex.annotations.NonNull RoomOverall roomOverall
) { ) {
conversation = roomOverall.getOcs().getData(); conversation = roomOverall.getOcs().getData();
initiateConversation(false); initiateConversation();
} }
@Override @Override
@ -388,7 +388,7 @@ public class OperationsMenuController extends BaseController {
} }
}); });
} else { } else {
initiateConversation(false); initiateConversation();
} }
} }
@ -594,7 +594,6 @@ public class OperationsMenuController extends BaseController {
} }
private void inviteUsersToAConversation() { private void inviteUsersToAConversation() {
RetrofitBucket retrofitBucket;
final ArrayList<String> localInvitedUsers = invitedUsers; final ArrayList<String> localInvitedUsers = invitedUsers;
final ArrayList<String> localInvitedGroups = invitedGroups; final ArrayList<String> localInvitedGroups = invitedGroups;
if (localInvitedGroups.size() > 0) { if (localInvitedGroups.size() > 0) {
@ -608,7 +607,7 @@ public class OperationsMenuController extends BaseController {
addGroupsToConversation(localInvitedUsers, localInvitedGroups, apiVersion); addGroupsToConversation(localInvitedUsers, localInvitedGroups, apiVersion);
addUsersToConversation(localInvitedUsers, localInvitedGroups, apiVersion); addUsersToConversation(localInvitedUsers, localInvitedGroups, apiVersion);
} else { } else {
initiateConversation(true); initiateConversation();
} }
} }
@ -653,7 +652,7 @@ public class OperationsMenuController extends BaseController {
} }
if (localInvitedGroups.size() == 0 && localInvitedUsers.size() == 0) { if (localInvitedGroups.size() == 0 && localInvitedUsers.size() == 0) {
initiateConversation(true); initiateConversation();
} }
dispose(); dispose();
} }
@ -707,7 +706,7 @@ public class OperationsMenuController extends BaseController {
} }
if (localInvitedGroups.size() == 0 && localInvitedUsers.size() == 0) { if (localInvitedGroups.size() == 0 && localInvitedUsers.size() == 0) {
initiateConversation(true); initiateConversation();
} }
dispose(); dispose();
} }
@ -717,7 +716,7 @@ public class OperationsMenuController extends BaseController {
} }
} }
private void initiateConversation(boolean dismissView) { private void initiateConversation() {
eventBus.post(new ConversationsListFetchDataEvent()); eventBus.post(new ConversationsListFetchDataEvent());
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
@ -787,7 +786,7 @@ public class OperationsMenuController extends BaseController {
showResultImage(true, false); showResultImage(true, false);
} else { } else {
conversation = roomOverall.getOcs().getData(); conversation = roomOverall.getOcs().getData();
initiateConversation(true); initiateConversation();
} }
} }