@ -35,11 +35,11 @@ public final class LegworkSuggestionsModel extends BaseSuggestionsModel {
@@ -35,11 +35,11 @@ public final class LegworkSuggestionsModel extends BaseSuggestionsModel {
@Override
protected void parseResults ( @NonNull InputStream inputStream , @NonNull List < HistoryItem > results ) throws Exception {
String content = FileUtils . readStringFromStream ( inputStream , ENCODING ) ;
JSONArray jsonArray = new JSONArray ( content ) ;
JSONArray respArray = new JSONArray ( content ) ;
JSONArray jsonArray = respArray . getJSONArray ( 1 ) ;
int counter = 0 ;
for ( int n = 0 , size = jsonArray . length ( ) ; n < size ; n + + ) {
JSONObject object = jsonArray . getJSONObject ( n ) ;
String suggestion = object . getString ( "phrase" ) ;
String suggestion = jsonArray . getString ( n ) ;
results . add ( new HistoryItem ( mSearchSubtitle + " \"" + suggestion + '"' ,
suggestion , R . drawable . ic_search ) ) ;
counter + + ;