Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/cli/java/org/commcare/util/screen/EntityScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ public boolean initReferences(SessionWrapper session) throws CommCareSessionExce
referenceMap.put(getReturnValueFromSelection(reference, needed, evalContext), reference);
}

// for now override 'here()' with the coords of Sao Paulo, eventually allow dynamic
// setting
evalContext.addFunctionHandler(new ScreenUtils.HereDummyFunc(-23.56, -46.66));

if (shouldAutoSelect()) {
if (!this.setCurrentScreenToDetail()) {
readyToSkip = true;
Expand Down
32 changes: 0 additions & 32 deletions src/cli/java/org/commcare/util/screen/ScreenUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,36 +81,4 @@ public static String getAppTitle() {
return "CommCare";
}
}

public static class HereDummyFunc implements IFunctionHandler {
private final double lat;
private final double lon;

public HereDummyFunc(double lat, double lon) {
this.lat = lat;
this.lon = lon;
}

@Override
public String getName() {
return "here";
}

@Override
public Vector getPrototypes() {
Vector<Class[]> p = new Vector<>();
p.addElement(new Class[0]);
return p;
}

@Override
public boolean rawArgs() {
return false;
}

@Override
public Object eval(Object[] args, EvaluationContext ec) {
return new GeoPointData(new double[]{lat, lon, 0, 10}).getDisplayText();
}
}
}
Loading