Swiftyinsta: Get Followers completionHandler never gets called

Created on 2 Dec 2019  ·  3Comments  ·  Source: TheM4hd1/SwiftyInsta

Hi @TheM4hd1

It seems that the followers request completion handler never gets called. My code is as follows:

    func getMyFollowers() -> Observable<[User]>{
        return Observable.create { observer in
            self.handler.users.following(user: .me, with: .init(maxPagesToLoad: .max), updateHandler: nil, completionHandler: { (response, _) in
                switch response {
                case .success(let users):
                    observer.onNext(users)
                    observer.onCompleted()
                case .failure(let error):
                    observer.onError(error)
                    observer.onCompleted()
                }
            })

            return Disposables.create()
        }
    }
bug

Most helpful comment

Yep. I've caught the same issue today.
It's definitely a big bug with 2.2. I'm fixing it rn.

All 3 comments

It seems that if I set the maxPagesToLoad to 1 it works, but other than that the issue is pagination.

@sbertix The same issue appears also on

self.handler.media.by(user: .primaryKey(userId), with: .init(maxPagesToLoad: .max)

Yep. I've caught the same issue today.
It's definitely a big bug with 2.2. I'm fixing it rn.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sbertix picture sbertix  ·  27Comments

canaksoy picture canaksoy  ·  6Comments

trentona picture trentona  ·  3Comments

sbertix picture sbertix  ·  8Comments

effecttwins picture effecttwins  ·  16Comments