Skip to content

update pagingconfig usage#1103

Merged
Tlaster merged 1 commit intomasterfrom
feature/paging_config
Jul 16, 2025
Merged

update pagingconfig usage#1103
Tlaster merged 1 commit intomasterfrom
feature/paging_config

Conversation

@Tlaster
Copy link
Copy Markdown
Contributor

@Tlaster Tlaster commented Jul 16, 2025

No description provided.

@Tlaster Tlaster requested a review from Copilot July 16, 2025 04:12
@Tlaster Tlaster enabled auto-merge July 16, 2025 04:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR centralizes PagingConfig usage by introducing a shared pagingConfig constant to replace inline PagingConfig instantiations throughout the codebase. This improves consistency and makes future configuration changes easier to manage.

  • Creates platform-specific pagingConfig implementations using expect/actual declarations
  • Replaces inline PagingConfig instantiations with the shared configuration
  • Maintains existing pageSize = 20 behavior while adding platform-specific optimizations

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Paging.kt Adds expect declaration for pagingConfig and updates existing usages
Paging.android.kt Provides Android-specific PagingConfig implementation
Paging.apple.kt Provides Apple-specific PagingConfig with additional optimizations
Paging.jvm.kt Provides JVM-specific PagingConfig implementation
LocalCacheSearchPresenter.kt Replaces inline PagingConfig with shared pagingConfig
NodeInfoPresenter.kt Replaces inline PagingConfig with shared pagingConfig
TimelinePresenter.kt Replaces inline PagingConfig with shared pagingConfig
XQTDataSource.kt Replaces inline PagingConfig with shared pagingConfig

val pagerFlow =
Pager(
config = PagingConfig(pageSize = pageSize),
config = pagingConfig,
Copy link

Copilot AI Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pageSize parameter is now ignored since pagingConfig has a fixed pageSize. Consider removing the pageSize parameter from this function or documenting that it's no longer used.

Copilot uses AI. Check for mistakes.
@@ -143,7 +143,7 @@ public abstract class TimelinePresenter :
pageSize: Int = 20,
Copy link

Copilot AI Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pageSize parameter is now ignored since pagingConfig has a fixed pageSize. Consider removing the pageSize parameter from this function or documenting that it's no longer used.

Suggested change
pageSize: Int = 20,

Copilot uses AI. Check for mistakes.
val pagerFlow =
Pager(
config = PagingConfig(pageSize = pageSize),
config = pagingConfig,
Copy link

Copilot AI Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pageSize parameter is now ignored since pagingConfig has a fixed pageSize. Consider removing the pageSize parameter from this function or documenting that it's no longer used.

Copilot uses AI. Check for mistakes.
): Flow<PagingData<T>> =
Pager(
config = PagingConfig(pageSize = pageSize),
config = pagingConfig,
Copy link

Copilot AI Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pageSize parameter is now ignored since pagingConfig has a fixed pageSize. Consider removing the pageSize parameter from this function or documenting that it's no longer used.

Copilot uses AI. Check for mistakes.
if (type == NotificationFilter.All) {
return Pager(
config = PagingConfig(pageSize = pageSize),
config = pagingConfig,
Copy link

Copilot AI Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pageSize parameter is now ignored since pagingConfig has a fixed pageSize. Consider removing the pageSize parameter from functions that use this Pager or documenting that pageSize is no longer configurable.

Copilot uses AI. Check for mistakes.
@Tlaster Tlaster merged commit c289a5d into master Jul 16, 2025
5 checks passed
@Tlaster Tlaster deleted the feature/paging_config branch July 16, 2025 04:40
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