refs #5010
This commit is contained in:
parent
84c64551a8
commit
a447d8cb70
|
@ -105,10 +105,8 @@ public class MainActivity<RouteLoaded> extends AppCompatActivity {
|
|||
@Override
|
||||
protected void onRestart() {
|
||||
|
||||
getRoutes(null);
|
||||
getPending();
|
||||
getPengingExpeditions();
|
||||
|
||||
super.onRestart();
|
||||
}
|
||||
|
||||
|
@ -392,8 +390,9 @@ public class MainActivity<RouteLoaded> extends AppCompatActivity {
|
|||
// startActivity(new Intent(this,InfoActivity.class));
|
||||
Utils.startPicking(this, "info");
|
||||
}
|
||||
public void goToFound(View v){
|
||||
startActivity(new Intent(this,ExpeditionScanActivity.class));
|
||||
|
||||
public void goToFound(View v) {
|
||||
startActivity(new Intent(this, ExpeditionScanActivity.class));
|
||||
}
|
||||
/* public void goToLoaders(int pos){
|
||||
Intent i = new Intent(this,LoadersActivity.class);
|
||||
|
@ -422,36 +421,36 @@ public class MainActivity<RouteLoaded> extends AppCompatActivity {
|
|||
@Override
|
||||
public void onResponse(Call<Void> call, Response<Void> response) {
|
||||
Utils.progressBar.getDialog().dismiss();
|
||||
if(response.isSuccessful()){
|
||||
if (response.isSuccessful()) {
|
||||
|
||||
// if (response.body().equals("OK")){
|
||||
ArrayList<SignDataUpload> listAux = new ArrayList<>();
|
||||
// if (response.body().equals("OK")){
|
||||
ArrayList<SignDataUpload> listAux = new ArrayList<>();
|
||||
|
||||
listaPendientes.remove(data);
|
||||
LocalStorage.udpatePendingSigns(that,listaPendientes);
|
||||
getPending();
|
||||
listaPendientes.remove(data);
|
||||
LocalStorage.udpatePendingSigns(that, listaPendientes);
|
||||
getPending();
|
||||
|
||||
|
||||
/* }else{
|
||||
Utils.showErrorDialog(that,that.getResources().getString(R.string.error_conexion));
|
||||
}*/
|
||||
|
||||
}else{
|
||||
} else {
|
||||
//Log.i("ERROR","error al guardar");
|
||||
//Utils.showErrorDialog(that,that.getResources().getString(R.string.error_conexion));
|
||||
Utils.showErrorDialog(that,response.message());
|
||||
Utils.showErrorDialog(that, response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<Void> call, Throwable t) {
|
||||
Utils.progressBar.getDialog().dismiss();
|
||||
Utils.showErrorDialog(that,t.getMessage());
|
||||
Utils.showErrorDialog(that, t.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void confirmSavePos(View v){
|
||||
public void confirmSavePos(View v) {
|
||||
if (listaPendientes.size() > 0) {
|
||||
Utils.progressBar.show(this, getResources().getString(R.string.please_wait));
|
||||
final SignDataUpload data = listaPendientes.get(0);
|
||||
|
@ -470,20 +469,20 @@ public class MainActivity<RouteLoaded> extends AppCompatActivity {
|
|||
|
||||
if (response.isSuccessful()) {
|
||||
|
||||
listaPendientes.remove(data);
|
||||
LocalStorage.udpatePendingSigns(that, listaPendientes);
|
||||
confirmSavePos(null);
|
||||
listaPendientes.remove(data);
|
||||
LocalStorage.udpatePendingSigns(that, listaPendientes);
|
||||
confirmSavePos(null);
|
||||
|
||||
} else {
|
||||
Utils.showErrorDialog(that,response.message());
|
||||
}
|
||||
} else {
|
||||
Utils.showErrorDialog(that, response.message());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<Void> call, Throwable t) {
|
||||
Utils.progressBar.getDialog().dismiss();
|
||||
Utils.showErrorDialog(that,t.getMessage());
|
||||
Utils.showErrorDialog(that, t.getMessage());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue