Some improvements

This commit is contained in:
Thomas 2024-01-15 16:59:22 +01:00
parent e20fdafaa5
commit 892bb521e5
3 changed files with 5 additions and 2 deletions

View file

@ -133,6 +133,9 @@ public class SearchResultTabActivity extends BaseBarActivity {
inflater.inflate(R.menu.menu_search, menu);
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
if(searchView == null) {
return true;
}
if (search != null) {
searchView.setQuery(search, false);
}

View file

@ -170,7 +170,7 @@ public class FragmentMastodonTag extends Fragment {
Collections.sort(tags, (obj1, obj2) -> Integer.compare(obj2.getWeight(), obj1.getWeight()));
boolean isInCollection = false;
for (Tag tag : tags) {
if (tag.name.compareToIgnoreCase(search) == 0) {
if (tag.name.trim().compareToIgnoreCase(search.trim()) == 0) {
isInCollection = true;
break;
}

View file

@ -26,7 +26,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabGravity="fill"
app:tabMode="scrollable" />
app:tabMode="auto" />
<androidx.viewpager.widget.ViewPager
android:id="@+id/search_viewpager"