Commit 9836ef65 by german

Arreglado issue #232 en la parte del PCB

parent bd3b65b6
......@@ -34,7 +34,7 @@ public class VocabularyTalk implements Emitter.Listener {
final String param_picto="picto";
final String param_stu_picto="stu_picto";
final String param_picto_id="id";
final String param_stupicto_scene="scene";
final String param_stupicto_scene="id_scene";
final String param_picto_cat="id_cat";
final String action_update="update";
final String action_update_category="update_category";
......@@ -48,12 +48,12 @@ public class VocabularyTalk implements Emitter.Listener {
Log.i(LOG_TAG, "raw Received message " +msg.toString());
String action = msg.getString(param_action).toLowerCase();
JSONObject stu_picto= msg.getJSONObject(param_attributes).getJSONObject(param_stu_picto);
int stupicto_id=stu_picto.getInt(param_picto_id);
JSONObject attributes = msg.getJSONObject(param_attributes);
JSONObject attrs_stu_picto = stu_picto.optJSONObject(param_attributes);
JSONObject picto_stupicto = stu_picto.optJSONObject(param_picto);
int picto_id = picto_stupicto.getInt(param_picto_id);
int picto_cat = attrs_stu_picto!=null ? attrs_stu_picto.optInt(param_picto_cat, Picto.NO_CATEGORY) : 0;
if(PCBcontext.getPcbdb().getCurrentUser().get_active_scene() == stu_picto.getInt(param_stupicto_scene)) {
if(PCBcontext.getPcbdb().getCurrentUser().get_active_scene() == attributes.getInt(param_stupicto_scene)) {
PCBcontext.getNetService().nextSynchro(new Date().getTime() + PCBcontext.getNetService().getSynchroTimingLength() * 2); //nos saltamos una sincronización para evitar que llegue antes que los websockets
for (iVocabularyListener listener : this.listeners)
listener.change(action.equals(action_update) ? iVocabularyListener.action.update
......
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