Skip to content

Commit

Permalink
Merge pull request #277 from Xen4n/master
Browse files Browse the repository at this point in the history
Fix empty hashtag as search result for '@' query for Pleroma
  • Loading branch information
LucasGGamerM authored Oct 6, 2023
2 parents 6096857 + 07dfd74 commit 872760d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ protected void doLoadData(int offset, int count){
.setCallback(new SimpleCallback<>(this){
@Override
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())
.map(sr->{
SearchResultViewModel vm=new SearchResultViewModel(sr, accountID, false);
Expand Down

0 comments on commit 872760d

Please sign in to comment.