Fix off-by-one
app/src/main/java/eu/lepiller/nani/MainActivity.java
122 | 122 | ArrayList<Result> searchResult = r.getResults(); | |
123 | 123 | MojiDetector detector = new MojiDetector(); | |
124 | 124 | String text = r.getText(); | |
125 | - | if(searchResult != null && searchResult.size()>1 && !r.isConverted() && detector.hasLatin(text)) { | |
125 | + | if(searchResult != null && searchResult.size()>0 && !r.isConverted() && detector.hasLatin(text)) { | |
126 | 126 | MojiConverter converter = new MojiConverter(); | |
127 | 127 | final String moji = converter.convertRomajiToHiragana(r.getText()); | |
128 | 128 | feedback_text.setText(String.format(getString(R.string.feedback_didyoumean), moji)); |