Some improvements

Media3
Thomas 10 months ago
parent e20fdafaa5
commit 892bb521e5

@ -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);
}

@ -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;
}

@ -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"

Loading…
Cancel
Save