Skip to content

ミュートユーザーリストのページネーション機能を実装#780

Draft
Copilot wants to merge 2 commits intodevelopfrom
copilot/fix-777
Draft

ミュートユーザーリストのページネーション機能を実装#780
Copilot wants to merge 2 commits intodevelopfrom
copilot/fix-777

Conversation

Copy link
Contributor

Copilot AI commented Jul 7, 2025

ミュートユーザーリストで「さらに読み込む」ボタンが表示されない問題を修正しました。

問題

従来の実装では、ミュートユーザーページで単純な ListView.builder を使用しており、すべてのミュートユーザーを一度に読み込んでいました。そのため、大量のミュートユーザーがいる場合でも「さらに読み込む」ボタンが表示されず、ページネーション機能がありませんでした。

解決方法

PushableListView コンポーネントを使用してページネーション機能を実装しました:

// 修正前: 単純なListView.builder
ListView.builder(
  itemCount: value.length,
  itemBuilder: (context, index) => /* ... */,
)

// 修正後: ページネーション対応のPushableListView
PushableListView<Muting>(
  initializeFuture: () async {
    final response = await ref
        .read(misskeyPostContextProvider)
        .mute
        .list(const MuteListRequest());
    return response.toList();
  },
  nextFuture: (lastItem, _) async {
    final response = await ref
        .read(misskeyPostContextProvider)
        .mute
        .list(MuteListRequest(untilId: lastItem.id));
    return response.toList();
  },
  itemBuilder: (context, muting) => /* ... */,
)

技術的詳細

  • APIサポート確認: Misskeyの公式ソースコードにより、mute/listエンドポイントが limit および untilId パラメータをサポートしていることを確認
  • 一貫した実装: 他のページ(FederationUsers、ExploreUsers等)と同じ PushableListView パターンを採用
  • 既存機能維持: ミュート解除機能は変更せず、下位互換性を保持

変更されたファイル

  • lib/view/several_account_settings_page/muted_users_page/muted_users_page.dart
  • lib/state_notifier/muted_users_page/muted_users_notifier.dart
  • test/view/muted_users_page/muted_users_page_test.dart

期待される効果

  • ✅ 「さらに読み込む」ボタンが表示される
  • ✅ 大量のミュートユーザーでも初期読み込み時間が改善される
  • ✅ スクロール位置を保持しながら効率的な追加読み込みが可能
  • ✅ 自動読み込み設定に対応(設定に応じてスクロール時の自動読み込み)

Fixes #777.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://storage.googleapis.com/flutter_infra_release/flutter/dd93de6fb1776398bf586cbd477deade1391c7e4/dart-sdk-linux-x64.zip
    • Triggering command: curl --retry 3 --continue-at - --location --output /tmp/flutter/bin/cache/dart-sdk-linux-x64.zip REDACTED (http block)
  • https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: shiosyakeyakini-info <2309943+shiosyakeyakini-info@users.noreply.github.com>
Copilot AI changed the title [WIP] ミュートユーザーリストの続きが読み込めない ミュートユーザーリストのページネーション機能を実装 Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ミュートユーザーリストの続きが読み込めない

2 participants