added weak self

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-02-14 13:56:09 -06:00
parent 2bc62fb268
commit db0afbb15d

View File

@ -49,7 +49,6 @@ open class Tilelet: VDS.Tilelet, VDSMoleculeViewProtocol{
badgeModel = viewModel.badge
descriptiveIconModel = viewModel.descriptiveIcon
directionalIconModel = viewModel.directionalIcon
//setup action
if let action = viewModel.action {
//add the subscriber
@ -87,7 +86,8 @@ open class Tilelet: VDS.Tilelet, VDSMoleculeViewProtocol{
open override func layoutSubviews() {
super.layoutSubviews()
// Accounts for any collection size changes
DispatchQueue.main.async {
DispatchQueue.main.async { [weak self] in
guard let self else { return }
self.delegateObject?.moleculeDelegate?.moleculeLayoutUpdated(self)
}
}