forked from mirrors/misskey
fix: user-tagページでユーザーが重複して読み込まれるのを修正 (#17163)
* fix: user-tagをページネーションに対応させる * update changelog
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
- Enhance: 「もうすぐ誕生日のユーザー」ウィジェットで、誕生日が至近のユーザーも表示できるように
|
- Enhance: 「もうすぐ誕生日のユーザー」ウィジェットで、誕生日が至近のユーザーも表示できるように
|
||||||
(Cherry-picked from https://github.com/MisskeyIO/misskey)
|
(Cherry-picked from https://github.com/MisskeyIO/misskey)
|
||||||
- 「今日誕生日のユーザー」は「もうすぐ誕生日のユーザー」に名称変更されました
|
- 「今日誕生日のユーザー」は「もうすぐ誕生日のユーザー」に名称変更されました
|
||||||
|
- Fix: ユーザーハッシュタグページでユーザーの読み込みが重複する問題を修正
|
||||||
- 依存関係の更新
|
- 依存関係の更新
|
||||||
|
|
||||||
### Client
|
### Client
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export const paramDef = {
|
|||||||
properties: {
|
properties: {
|
||||||
tag: { type: 'string' },
|
tag: { type: 'string' },
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||||
|
offset: { type: 'integer', default: 0 },
|
||||||
sort: { type: 'string', enum: ['+follower', '-follower', '+createdAt', '-createdAt', '+updatedAt', '-updatedAt'] },
|
sort: { type: 'string', enum: ['+follower', '-follower', '+createdAt', '-createdAt', '+updatedAt', '-updatedAt'] },
|
||||||
state: { type: 'string', enum: ['all', 'alive'], default: 'all' },
|
state: { type: 'string', enum: ['all', 'alive'], default: 'all' },
|
||||||
origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'local' },
|
origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'local' },
|
||||||
@@ -74,7 +75,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||||||
case '-updatedAt': query.orderBy('user.updatedAt', 'ASC'); break;
|
case '-updatedAt': query.orderBy('user.updatedAt', 'ASC'); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const users = await query.limit(ps.limit).getMany();
|
const users = await query
|
||||||
|
.limit(ps.limit)
|
||||||
|
.offset(ps.offset)
|
||||||
|
.getMany();
|
||||||
|
|
||||||
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
|
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ const props = defineProps<{
|
|||||||
|
|
||||||
const paginator = markRaw(new Paginator('hashtags/users', {
|
const paginator = markRaw(new Paginator('hashtags/users', {
|
||||||
limit: 30,
|
limit: 30,
|
||||||
|
offsetMode: true,
|
||||||
computedParams: computed(() => ({
|
computedParams: computed(() => ({
|
||||||
tag: props.tag,
|
tag: props.tag,
|
||||||
origin: 'combined',
|
origin: 'combined',
|
||||||
|
|||||||
@@ -24020,6 +24020,8 @@ export interface operations {
|
|||||||
tag: string;
|
tag: string;
|
||||||
/** @default 10 */
|
/** @default 10 */
|
||||||
limit?: number;
|
limit?: number;
|
||||||
|
/** @default 0 */
|
||||||
|
offset?: number;
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
sort: '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt';
|
sort: '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt';
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user