working on issue #470

parent 42488c29
......@@ -147,7 +147,6 @@ public class Vocabulary implements Iterable<Picto> {
@Override
public void result(JSONArray result) {
if (result != null) {
final String jpicto = "picto";
final String jid = "id";
......
......@@ -251,7 +251,7 @@ public class SerialActivity extends Activity {
@Override
public void error(Exception e) {
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());
}
});
......
......@@ -129,6 +129,7 @@ public class NetService implements Runnable {
public void result(JSONObject result) {
if (!updated) {
updated = true;
// Comprobar si hay usuario offline, para hacer login transparente
if (PCBcontext.is_user_offline()){
login();
......@@ -137,7 +138,6 @@ public class NetService implements Runnable {
PCBcontext.getRoom().reconnect();
PCBcontext.getVocabulary().synchronize();
PCBcontext.getActionLog().batch();
updated = true;
}
}
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