From f757f36312479a8fb5d9a53a99a5901e6ca44506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mieszko=20Wrzeszczy=C5=84ski?= Date: Mon, 10 Dec 2018 21:11:42 +0100 Subject: [PATCH] Clear list during fetch --- .../java/com/uam/wmi/findmytutor/activity/LoginActivity.java | 4 ++-- .../com/uam/wmi/findmytutor/activity/UsersListFragment.java | 1 + .../main/java/com/uam/wmi/findmytutor/network/ApiClient.java | 2 +- app/src/main/res/values-pl/strings.xml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java index 91cf913..189f28a 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java @@ -149,9 +149,9 @@ public class LoginActivity extends AppCompatActivity { private void loginProcess(String email, String password) { ValidateUser user = new ValidateUser(email, password); -// LdapUser fakeUser = new LdapUser(email, password,"wmi","tutor",email,"Fałszywy",email); -// disposable.add(ldapService.fakeValidate(fakeUser) + //LdapUser fakeUser = new LdapUser(email, password,"wmi","tutor",email,"Fałszywy",email); disposable.add(ldapService.validate(user) + //disposable.add(ldapService.fakeValidate(fakeUser) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::handleResponse, this::handleError)); diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/UsersListFragment.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/UsersListFragment.java index 4430e89..c6e68fd 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/UsersListFragment.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/UsersListFragment.java @@ -210,6 +210,7 @@ public class UsersListFragment extends Fragment { @Override public void onSuccess(List users) { tutorsList.clear(); + tutorsFiltered.clear(); tutorsList.addAll(users); tutorsFiltered.addAll(users); mAdapter.notifyDataSetChanged(); diff --git a/app/src/main/java/com/uam/wmi/findmytutor/network/ApiClient.java b/app/src/main/java/com/uam/wmi/findmytutor/network/ApiClient.java index ad2003d..1835496 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/network/ApiClient.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/network/ApiClient.java @@ -26,7 +26,7 @@ public class ApiClient { private static Retrofit retrofit = null; private static int REQUEST_TIMEOUT = 60; private static OkHttpClient okHttpClient; - private static final String BASE_URL = "https://s416084.projektstudencki.pl/develop/"; + private static final String BASE_URL = "https://s416084.projektstudencki.pl/master/"; public static Retrofit getClient(Context context) { diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index db10ac8..ae14e60 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -160,7 +160,7 @@ Błąd podczas pobierania danych. Błąd podczas pobierania statusów. Upss. Coś poszło nie tak. Pracujemy nad tym! - Brak informacji o dyzurze. + Brak informacji o dyżurze. Brak notatki. Wyszukiwarka Nie przeszkadzać