From 7e780e752d718b72c863d255b49093e998820f0b Mon Sep 17 00:00:00 2001 From: Bruno Muniz Azevedo Filho <bruno@elixxir.io> Date: Thu, 15 Dec 2022 00:59:23 -0300 Subject: [PATCH] Fix nickname popup when requesting user --- .../Controllers/SearchLeftController.swift | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Sources/SearchFeature/Controllers/SearchLeftController.swift b/Sources/SearchFeature/Controllers/SearchLeftController.swift index 86a70d11..c3f7dd0a 100644 --- a/Sources/SearchFeature/Controllers/SearchLeftController.swift +++ b/Sources/SearchFeature/Controllers/SearchLeftController.swift @@ -280,7 +280,6 @@ final class SearchLeftController: UIViewController { items.append(drawerSaveButton) - let drawer = DrawerController(items) var nickname: String? var allowsSave = true @@ -307,14 +306,19 @@ final class SearchLeftController: UIViewController { .receive(on: DispatchQueue.main) .sink { [unowned self] in guard allowsSave else { return } - - drawer.dismiss(animated: true) { + navigator.perform(DismissModal(from: self)) { [weak self] in + guard let self else { return } self.viewModel.didSet(nickname: nickname ?? contact.username!, for: contact) + self.drawerCancellables.removeAll() } } .store(in: &drawerCancellables) - //coordinator.toNicknameDrawer(drawer, from: self) + navigator.perform(PresentDrawer( + items: items, + isDismissable: true, + from: self + )) } private func presentRequestDrawer(forContact contact: Contact) { -- GitLab