@@ -158,6 +158,8 @@ final class OrderListViewController: UIViewController {
158158 //
159159 // We can remove this once we've replaced XLPagerTabStrip.
160160 tableView. reloadData ( )
161+
162+ restartPlaceholderAnimation ( )
161163 }
162164
163165 /// Returns a function that creates cells for `dataSource`.
@@ -410,7 +412,7 @@ private extension OrderListViewController {
410412 // let's reset the state before using it again
411413 ghostableTableView. removeGhostContent ( )
412414 ghostableTableView. displayGhostContent ( options: options,
413- style: . wooDefaultGhostStyle )
415+ style: Constants . ghostStyle )
414416 ghostableTableView. startGhostAnimation ( )
415417 ghostableTableView. isHidden = false
416418 }
@@ -423,6 +425,14 @@ private extension OrderListViewController {
423425 ghostableTableView. removeGhostContent ( )
424426 }
425427
428+ /// After returning to the screen, `restartGhostAnimation` is required to resume ghost animation.
429+ func restartPlaceholderAnimation( ) {
430+ guard ghostableTableView. isHidden == false else {
431+ return
432+ }
433+ ghostableTableView. restartGhostAnimation ( style: Constants . ghostStyle)
434+ }
435+
426436 /// Shows the EmptyStateViewController
427437 ///
428438 func displayEmptyViewController( ) {
@@ -675,4 +685,8 @@ private extension OrderListViewController {
675685 case results
676686 case empty
677687 }
688+
689+ enum Constants {
690+ static let ghostStyle : GhostStyle = . wooDefaultGhostStyle
691+ }
678692}
0 commit comments