Clear list during fetch
This commit is contained in:
parent
ba73d08cd4
commit
f757f36312
@ -149,9 +149,9 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private void loginProcess(String email, String password) {
|
private void loginProcess(String email, String password) {
|
||||||
ValidateUser user = new ValidateUser(email, password);
|
ValidateUser user = new ValidateUser(email, password);
|
||||||
// LdapUser fakeUser = new LdapUser(email, password,"wmi","tutor",email,"Fałszywy",email);
|
//LdapUser fakeUser = new LdapUser(email, password,"wmi","tutor",email,"Fałszywy",email);
|
||||||
// disposable.add(ldapService.fakeValidate(fakeUser)
|
|
||||||
disposable.add(ldapService.validate(user)
|
disposable.add(ldapService.validate(user)
|
||||||
|
//disposable.add(ldapService.fakeValidate(fakeUser)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(this::handleResponse, this::handleError));
|
.subscribe(this::handleResponse, this::handleError));
|
||||||
|
@ -210,6 +210,7 @@ public class UsersListFragment extends Fragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<User> users) {
|
public void onSuccess(List<User> users) {
|
||||||
tutorsList.clear();
|
tutorsList.clear();
|
||||||
|
tutorsFiltered.clear();
|
||||||
tutorsList.addAll(users);
|
tutorsList.addAll(users);
|
||||||
tutorsFiltered.addAll(users);
|
tutorsFiltered.addAll(users);
|
||||||
mAdapter.notifyDataSetChanged();
|
mAdapter.notifyDataSetChanged();
|
||||||
|
@ -26,7 +26,7 @@ public class ApiClient {
|
|||||||
private static Retrofit retrofit = null;
|
private static Retrofit retrofit = null;
|
||||||
private static int REQUEST_TIMEOUT = 60;
|
private static int REQUEST_TIMEOUT = 60;
|
||||||
private static OkHttpClient okHttpClient;
|
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) {
|
public static Retrofit getClient(Context context) {
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
<string name="manual_status_error">Błąd podczas pobierania danych.</string>
|
<string name="manual_status_error">Błąd podczas pobierania danych.</string>
|
||||||
<string name="error_status_fetch">Błąd podczas pobierania statusów.</string>
|
<string name="error_status_fetch">Błąd podczas pobierania statusów.</string>
|
||||||
<string name="notification_text">Upss. Coś poszło nie tak. Pracujemy nad tym!</string>
|
<string name="notification_text">Upss. Coś poszło nie tak. Pracujemy nad tym!</string>
|
||||||
<string name="lack_duty_hours">Brak informacji o dyzurze.</string>
|
<string name="lack_duty_hours">Brak informacji o dyżurze.</string>
|
||||||
<string name="lack_note">Brak notatki.</string>
|
<string name="lack_note">Brak notatki.</string>
|
||||||
<string name="search">Wyszukiwarka</string>
|
<string name="search">Wyszukiwarka</string>
|
||||||
<string name="description_notdisturb">Nie przeszkadzać</string>
|
<string name="description_notdisturb">Nie przeszkadzać</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user