         }
     }
 
-    func removePage(atIndex index: Int) {
+    func removePage(atIndex index: Int, completion: @escaping () -> Void) {
 
         // If removing last item, go back, otherwise, go forward
 


    @objc fileprivate func deleteItem() {

        itemsDelegate?.removeGalleryItem(at: currentIndex)
        removePage(atIndex: currentIndex)
    }

    //ThumbnailsimageBlock

        if newIndex < 0 { close(); return }

        let vc = self.pagingDataSource.createItemController(newIndex)
        setViewControllers([vc], direction: direction, animated: true)
        {
            _ in
            completion()
        }
    }

    open func reload(atIndex index: Int) {
