mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Android - Search - Code style fixes
This commit is contained in:
parent
843aa9e261
commit
d4a6e845cd
2 changed files with 10 additions and 8 deletions
|
@ -120,7 +120,7 @@ public class HomeActivity extends AppCompatActivity implements NavigationView.On
|
|||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
mDomainAdapter.loadDomains(editable.toString());
|
||||
if(editable.length()>0) {
|
||||
if (editable.length() > 0) {
|
||||
mSearchIconView.setVisibility(View.GONE);
|
||||
mClearSearch.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
|
|
|
@ -109,15 +109,17 @@ public class UserStoryDomainProvider implements DomainProvider {
|
|||
}
|
||||
|
||||
private boolean matches(UserStory story) {
|
||||
if (mWords.length<=0) return true;
|
||||
|
||||
boolean res = true;
|
||||
for (String word: mWords) {
|
||||
res = res && story.searchText().contains(word);
|
||||
if (!res) break;
|
||||
if (mWords.length <= 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return res;
|
||||
for (String word : mWords) {
|
||||
if (!story.searchText().contains(word)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void addToSuggestions(UserStory story) {
|
||||
|
|
Loading…
Reference in a new issue