mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Remove static sharedCoordinator from UIList and ensure a new Coordinator is created for every instance
This commit is contained in:
parent
5e267dc2de
commit
927ef5fbbc
1 changed files with 5 additions and 10 deletions
|
|
@ -100,8 +100,6 @@ class FloatingButton: UIButton {
|
|||
|
||||
struct UIList: UIViewRepresentable {
|
||||
|
||||
private static var sharedCoordinator: Coordinator?
|
||||
|
||||
@StateObject private var viewModel = ChatViewModel()
|
||||
@StateObject private var paginationState = PaginationState()
|
||||
|
||||
|
|
@ -346,14 +344,11 @@ struct UIList: UIViewRepresentable {
|
|||
// MARK: - Coordinator
|
||||
|
||||
func makeCoordinator() -> Coordinator {
|
||||
if UIList.sharedCoordinator == nil {
|
||||
UIList.sharedCoordinator = Coordinator(
|
||||
parent: self,
|
||||
geometryProxy: geometryProxy,
|
||||
sections: sections
|
||||
)
|
||||
}
|
||||
return UIList.sharedCoordinator!
|
||||
Coordinator(
|
||||
parent: self,
|
||||
geometryProxy: geometryProxy,
|
||||
sections: sections
|
||||
)
|
||||
}
|
||||
|
||||
class Coordinator: NSObject, UITableViewDataSource, UITableViewDelegate {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue