mirror of https://github.com/halo-dev/halo
fix: inconsistent order of post for theme-side (#2742)
#### What type of PR is this? /kind improvement /area core /milestone 2.0.0-rc.1 #### What this PR does / why we need it: 修复主题端文章列表排序不固定问题 #### Which issue(s) this PR fixes: Fixes #2734 #### Special notes for your reviewer: /cc @halo-dev/sig-halo #### Does this PR introduce a user-facing change? ```release-note 修复主题端文章列表排序不固定问题 ```pull/2752/head
parent
180548161a
commit
b0c461b5f6
|
@ -36,6 +36,6 @@ public class ContributorFinderImpl implements ContributorFinder {
|
|||
return Flux.empty();
|
||||
}
|
||||
return Flux.fromIterable(names)
|
||||
.flatMap(this::getContributor);
|
||||
.concatMap(this::getContributor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ public class PostFinderImpl implements PostFinder {
|
|||
@Override
|
||||
public Flux<ListedPostVo> listAll() {
|
||||
return client.list(Post.class, FIXED_PREDICATE, defaultComparator())
|
||||
.flatMap(this::getListedPostVo);
|
||||
.concatMap(this::getListedPostVo);
|
||||
}
|
||||
|
||||
static Pair<String, String> postPreviousNextPair(List<String> postNames,
|
||||
|
@ -292,7 +292,7 @@ public class PostFinderImpl implements PostFinder {
|
|||
return client.list(Post.class, predicate,
|
||||
comparator, pageNullSafe(page), sizeNullSafe(size))
|
||||
.flatMap(list -> Flux.fromStream(list.get())
|
||||
.flatMap(post -> getListedPostVo(post)
|
||||
.concatMap(post -> getListedPostVo(post)
|
||||
.map(postVo -> {
|
||||
populateStats(postVo);
|
||||
return postVo;
|
||||
|
|
|
@ -96,7 +96,7 @@ public class SinglePageFinderImpl implements SinglePageFinder {
|
|||
populateStats(pageVo);
|
||||
return pageVo;
|
||||
})
|
||||
.flatMap(this::populateContributors)
|
||||
.concatMap(this::populateContributors)
|
||||
.collectList()
|
||||
.map(pageVos -> new ListResult<>(list.getPage(), list.getSize(), list.getTotal(),
|
||||
pageVos)
|
||||
|
|
|
@ -40,7 +40,7 @@ public class TagFinderImpl implements TagFinder {
|
|||
@Override
|
||||
public Flux<TagVo> getByNames(List<String> names) {
|
||||
return Flux.fromIterable(names)
|
||||
.flatMap(this::getByName);
|
||||
.concatMap(this::getByName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue