BottomSheetController icon indicating copy to clipboard operation
BottomSheetController copied to clipboard

completion block does nothing

Open Gargo opened this issue 2 years ago • 0 comments

completion is not called here:

func close(completion: (() -> Void)? = nil) {
        sheetHeight = sheet.frame.height
        closeSheet(animated: true) { _ in
            self.dismiss(animated: true)
        }
    }

what about to rewrite it so:

var completion: (() -> Void)? = nil
func close() {
        sheetHeight = sheet.frame.height
        closeSheet(animated: true) { _ in
            self.dismiss(animated: true, completion: self.completion)
        }
    }
...//add completion param to all `dissmiss` calls

Gargo avatar Apr 06 '23 12:04 Gargo