Skip to content

Commit b87055a

Browse files
committed
removed unnecessary http call
1 parent d436e87 commit b87055a

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

core/src/main/java/io/snabble/sdk/ProductApi.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -122,28 +122,7 @@ public void findByCode(final String code, final OnProductAvailableListener produ
122122

123123
url = url.replace("{code}", code);
124124

125-
// TODO remove when backend has implemented ean8->ean13 lookups
126-
get(url, new OnProductAvailableListener() {
127-
@Override
128-
public void onProductAvailable(Product product, boolean wasOnlineProduct) {
129-
success(productAvailableListener, product);
130-
}
131-
132-
@Override
133-
public void onProductNotFound() {
134-
if (code.length() >= 8 && code.length() < 13) {
135-
String newCode = StringUtils.repeat('0', 13 - code.length()) + code;
136-
findByCode(newCode, productAvailableListener);
137-
} else {
138-
notFound(productAvailableListener);
139-
}
140-
}
141-
142-
@Override
143-
public void onError() {
144-
error(productAvailableListener);
145-
}
146-
});
125+
get(url, productAvailableListener);
147126
}
148127

149128
public void findByWeighItemId(String weighItemId, final OnProductAvailableListener productAvailableListener) {

0 commit comments

Comments
 (0)