Class FriendApplicationsQuery

  • All Implemented Interfaces:
    ai.nexconn.chat.internal.query.PageableQuery

    
    public final class FriendApplicationsQuery
     implements PageableQuery<PageResult<FriendApplicationDetail>>
                        

    Friend application pagination query object.

    Implements PageableQuery Interface, Provides Pagination load Friend application Info capability. See SendBird Query mode, Via loadNextPage Load data page by page, Via hasMore Check if there is more data.

    Via ai.nexconn.chat.user.UserModule.createFriendApplicationsQuery Create instance, Not cannot be constructed directly.

    Usage Example:

    val params = FriendApplicationsQueryParams().apply {
        pageSize = 20
        applicationTypes = listOf(FriendApplicationType.RECEIVED)
        status = listOf(FriendApplicationStatus.UN_HANDLED)
    }
    val query = NCEngine.user.createFriendApplicationsQuery(params)
    
    // Load first page
    query.loadNextPage { result, error ->
        if (error == null && result != null) {
            // result.data - application list
            // result.totalCount - total count
        }
        // Continue loading when there is more data
        if (query.hasMore) {
            query.loadNextPage { ... }
        }
    }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Boolean hasMore
      private final Boolean isLoading
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description