Skip to content

Commit

Permalink
fix thread sync missing arguments with def args
Browse files Browse the repository at this point in the history
  • Loading branch information
RamblinWreck77 authored Feb 7, 2019
1 parent ff51204 commit 6d90e61
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Sources/Pageboy/PageboyViewController+Management.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,24 @@ internal extension PageboyViewController {
completion: TransitionOperation.Completion?) {

if Thread.isMainThread {
_updateViewControllers(to: viewControllers, animated: animated, async: async, force: force, completion: completion)
_updateViewControllers(to: viewControllers,
from: fromIndex,
to: toIndex,
direction: direction,
animated: animated,
async: async, force:
force,
completion: completion)
} else {
DispatchQueue.main.sync {
_updateViewControllers(to: viewControllers, animated: animated, async: async, force: force, completion: completion)
_updateViewControllers(to: viewControllers,
from: fromIndex,
to: toIndex,
direction: direction,
animated: animated,
async: async,
force: force,
completion: completion)
}
}
}
Expand Down

0 comments on commit 6d90e61

Please sign in to comment.