Commit 89be537c by Kunj

UOFLMA-131: Fixed - Issue in order of multiple choice in Start time and end time list.

parent 2b24aeef
...@@ -106,6 +106,15 @@ public class VariableChoiceApiManager { ...@@ -106,6 +106,15 @@ public class VariableChoiceApiManager {
for (int i = 0; i < variableChoiceJsonArray.length(); i++) { for (int i = 0; i < variableChoiceJsonArray.length(); i++) {
JSONObject variableChoiceJsonObject = variableChoiceJsonArray.getJSONObject(i); JSONObject variableChoiceJsonObject = variableChoiceJsonArray.getJSONObject(i);
VariableChoice variableChoice = gson.fromJson(variableChoiceJsonObject.toString(), VariableChoice.class); VariableChoice variableChoice = gson.fromJson(variableChoiceJsonObject.toString(), VariableChoice.class);
String order = variableChoiceJsonObject.getString("order");
if(order!=null && !order.isEmpty() && order.contains(",")) {
order = order.replace(",", "");
try {
variableChoice.setOrder(Integer.parseInt(order));
} catch (NumberFormatException e) {
CatalogueLog.e("VariableChoiceApiManager: parse order: exception: "+e);
}
}
variableChoiceItemList.add(variableChoice); variableChoiceItemList.add(variableChoice);
} }
listener.onDoneApiCall(variableChoiceItemList); listener.onDoneApiCall(variableChoiceItemList);
......
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