Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tab not closing for Phone layout (only SwiftUI mode) - delegate is nil for some reason #85

Open
kyzmitch opened this issue Nov 19, 2024 · 0 comments
Labels
bug iOS iOS client sources

Comments

@kyzmitch
Copy link
Owner

TabPreviewCell 

@objc func close() {
        print("tab preview cell \(#function)")
        guard let closedIndex = tabIndex else {
            return
        }
        Task { [weak self] in
            await self?.delegate?.tabCellDidClose(at: closedIndex)
        }
    }

delegate is nil even before Task, and the owner of the cell which is TabsPreviewsViewController is not deallocated, can't fix it quickly.
After it fails to be closed if you try to close another tab it could crash with index out of bounds error.

@kyzmitch kyzmitch added bug iOS iOS client sources labels Nov 19, 2024
@kyzmitch kyzmitch changed the title tab not closing in SwiftUI mode for Phone layout - delegate is nil for some reason tab not closing for Phone layout - delegate is nil for some reason Nov 19, 2024
@kyzmitch kyzmitch changed the title tab not closing for Phone layout - delegate is nil for some reason tab not closing for Phone layout (only SwiftUI mode) - delegate is nil for some reason Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug iOS iOS client sources
Projects
None yet
Development

No branches or pull requests

1 participant