 }
 
 /// 帖子列表管理
-struct HiPDAThreadManager {
+class HiPDAThreadManager {
     /// 帖子列表
     fileprivate(set) var threads: [HiPDAThread]
     

    /// disposeBag
    private var disposeBag = DisposeBag()
    
    /// 获取第一页帖子列表
    ///
    /// - Parameter completion: 返回帖子列表获取结果
    mutating func firstPageThreads(completion: @escaping HiPDAThreadsFetchCompletion = { _ in }) {
        disposeBag = DisposeBag()
        state = .refreshing
        fetchThreads(at: 1).subscribe { [`self` = self] event in
            var mutaingSelf = self
            mutaingSelf.handleThreadsFetch(event: event, at: 1, state: .refreshing, completion: completion)
        }.disposed(by: disposeBag)
    }
    
    /// 获取下一页帖子列表
    ///
    /// - Parameter completion: 返回帖子列表获取结果
    mutating func nextPageThreads(completion: @escaping HiPDAThreadsFetchCompletion = { _ in }) {
        disposeBag = DisposeBag()
        state = .loadingMore
        fetchThreads(at: page + 1).subscribe { [`self` = self] event in
            var mutaingSelf = self
            mutaingSelf.handleThreadsFetch(event: event, at: 1, state: .loadingMore, completion: completion)
        }.disposed(by: disposeBag)
    }
    

    /// - Parameter page: 请求的帖子页码
    /// - Parameter state: 请求状态
    /// - Parameter completion: 返回帖子列表获取结果
    private func handleThreadsFetch(event: Event<HiPDAThreadsResult>, at page: Int, state: HiPDAThreadManagerState, completion: @escaping HiPDAThreadsFetchCompletion = { _ in }) {
        guard self.state == state else { return }
        self.state = .idle
        switch event {
