working on issue #470

parent 42488c29
...@@ -147,7 +147,6 @@ public class Vocabulary implements Iterable<Picto> { ...@@ -147,7 +147,6 @@ public class Vocabulary implements Iterable<Picto> {
@Override @Override
public void result(JSONArray result) { public void result(JSONArray result) {
if (result != null) { if (result != null) {
final String jpicto = "picto"; final String jpicto = "picto";
final String jid = "id"; final String jid = "id";
......
...@@ -251,7 +251,7 @@ public class SerialActivity extends Activity { ...@@ -251,7 +251,7 @@ public class SerialActivity extends Activity {
@Override @Override
public void error(Exception e) { public void error(Exception e) {
progressDialog.dismiss(); progressDialog.dismiss();
GUITools.show_alert(PCBcontext.getContext(), R.string.serverError, e.getMessage()); GUITools.show_alert(SerialActivity.this, R.string.serverError, e.getMessage());
Log.e(this.getClass().getCanonicalName(), "Server error:"+ e.getLocalizedMessage()); Log.e(this.getClass().getCanonicalName(), "Server error:"+ e.getLocalizedMessage());
} }
}); });
......
...@@ -129,6 +129,7 @@ public class NetService implements Runnable { ...@@ -129,6 +129,7 @@ public class NetService implements Runnable {
public void result(JSONObject result) { public void result(JSONObject result) {
if (!updated) { if (!updated) {
updated = true;
// Comprobar si hay usuario offline, para hacer login transparente // Comprobar si hay usuario offline, para hacer login transparente
if (PCBcontext.is_user_offline()){ if (PCBcontext.is_user_offline()){
login(); login();
...@@ -137,7 +138,6 @@ public class NetService implements Runnable { ...@@ -137,7 +138,6 @@ public class NetService implements Runnable {
PCBcontext.getRoom().reconnect(); PCBcontext.getRoom().reconnect();
PCBcontext.getVocabulary().synchronize(); PCBcontext.getVocabulary().synchronize();
PCBcontext.getActionLog().batch(); PCBcontext.getActionLog().batch();
updated = true;
} }
} }
Log.i(this.getClass().getName(), "PCB status checked. Updated? " + updated); Log.i(this.getClass().getName(), "PCB status checked. Updated? " + updated);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment