feat: commit for sync
This commit is contained in:
parent
386d2a0577
commit
ae7a743d41
@ -1,22 +0,0 @@
|
||||
package ru.myitschool.work.domain;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import ru.myitschool.work.domain.entities.HistoryEntity;
|
||||
import ru.myitschool.work.domain.entities.Status;
|
||||
import ru.myitschool.work.domain.entities.UserEntity;
|
||||
|
||||
public interface UserRepository {
|
||||
//void getAllUsers(@NonNull Consumer<Status<List<UserEntity>>> callback);
|
||||
|
||||
//void getUser(@NonNull Integer id, @NonNull Consumer<Status<UserEntity>> callback);
|
||||
void getAllUserHistory(@NonNull String username, @NonNull Consumer<Status<List<HistoryEntity>>> callback);
|
||||
//void getVolunteerCenterById(@NonNull Integer id, @NonNull Consumer<Status<HistoryEntity>> callback);
|
||||
//void isExist(@NonNull String username, @NonNull Consumer<Status<Void>> callback);
|
||||
//void register(@NonNull String id, @NonNull Consumer<Status<FullUserEntity>> callback);
|
||||
|
||||
void login(@NonNull String username, @NonNull String password, @NonNull Consumer<Status<Void>> callback);
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package ru.myitschool.work.ui.admin;
|
||||
|
||||
public class AdminFragment {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package ru.myitschool.work.ui.admin;
|
||||
|
||||
public class AdminViewModel {
|
||||
}
|
@ -58,13 +58,13 @@ public class HistoryAdapter extends RecyclerView.Adapter<HistoryAdapter.ViewHold
|
||||
public void bind(HistoryEntity item) {
|
||||
binding.time.setText(item.getTime().toString().substring(0, 10) + " "
|
||||
+ item.getTime().toString().substring(11, 16));
|
||||
binding.nameReader.setText(item.getNameReader());
|
||||
if (item.getType() == 1){
|
||||
binding.nameReader.setText(item.getType());
|
||||
/*if (item.getType() == 1){
|
||||
binding.type.setText("QR-code");
|
||||
}
|
||||
else{
|
||||
binding.type.setText("Карта");
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
@ -40,7 +40,7 @@ public class InformationViewModel extends ViewModel {
|
||||
|
||||
public void load() {
|
||||
mutableStateAllUserHistoryLiveData.setValue(new InformationViewModel.State(null, null, false));
|
||||
getHistById(username);
|
||||
getHistById();
|
||||
/*getAllUserHistoryUseCase.execute(username, status -> {
|
||||
mutableStateHistoryLiveData.postValue(fromStatus(status));
|
||||
});*/
|
||||
|
@ -48,8 +48,8 @@ public class ProfileViewModel extends ViewModel {
|
||||
return;
|
||||
}
|
||||
//userCheckCompleted = true;
|
||||
if (status.getStatusCode() == 200) {
|
||||
if (status.getValue().g != null) {
|
||||
/*if (status.getStatusCode() == 200) {
|
||||
if (status.getValue() != null) {
|
||||
GetAllUserHistoryUseCase.execute(status.getValue().getStatus(), status2 -> {
|
||||
Log.d("taggis", status.getStatusCode() + " " + status.getErrors());
|
||||
if (status.getStatusCode() == 200 && status.getErrors() == null) {
|
||||
@ -71,7 +71,7 @@ public class ProfileViewModel extends ViewModel {
|
||||
false
|
||||
));
|
||||
}
|
||||
}
|
||||
}*/
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user