Fix empty hashtag as search result for '@' query for Pleroma
This commit is contained in:
@@ -127,7 +127,11 @@ public class SearchQueryFragment extends MastodonRecyclerFragment<SearchResultVi
|
|||||||
.setCallback(new SimpleCallback<>(this){
|
.setCallback(new SimpleCallback<>(this){
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(SearchResults result){
|
public void onSuccess(SearchResults result){
|
||||||
onDataLoaded(Stream.of(result.hashtags.stream().map(SearchResult::new), result.accounts.stream().map(SearchResult::new))
|
onDataLoaded(Stream
|
||||||
|
.of(
|
||||||
|
result.hashtags.stream().filter(hashtag -> !hashtag.name.isEmpty()).map(SearchResult::new),
|
||||||
|
result.accounts.stream().map(SearchResult::new)
|
||||||
|
)
|
||||||
.flatMap(Function.identity())
|
.flatMap(Function.identity())
|
||||||
.map(sr->{
|
.map(sr->{
|
||||||
SearchResultViewModel vm=new SearchResultViewModel(sr, accountID, false);
|
SearchResultViewModel vm=new SearchResultViewModel(sr, accountID, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user