From 771fb63396df9e6b0ac646a3ab4a6148ad8ba833 Mon Sep 17 00:00:00 2001 From: Kelly-Chui Date: Tue, 14 Jan 2025 15:15:42 +0900 Subject: [PATCH] =?UTF-8?q?[refactor]=20#12=20MateListViewController?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=B9=B4=EC=9A=B4=ED=84=B0=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 기존에 연결 종료 기준을 담당하는 Counter 변수를 제거했습니다. Co-Authored-By: YOON JI SEONG <113659520+green-yoon87@users.noreply.github.com> --- .../MateList/View/MateListViewController.swift | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/SniffMeet/SniffMeet/Source/Mate/MateList/View/MateListViewController.swift b/SniffMeet/SniffMeet/Source/Mate/MateList/View/MateListViewController.swift index bbba848..5bd22bd 100644 --- a/SniffMeet/SniffMeet/Source/Mate/MateList/View/MateListViewController.swift +++ b/SniffMeet/SniffMeet/Source/Mate/MateList/View/MateListViewController.swift @@ -20,7 +20,6 @@ final class MateListViewController: BaseViewController, MateListViewable { private let addMateButton = AddMateButton(title: "새 메이트를 연결하세요") private var mpcManager: MPCManager? private var niManager: NIManager? - private var count: Int = 0 var dogProfile: DogProfileDTO? override func viewWillAppear(_ animated: Bool) { @@ -101,25 +100,10 @@ final class MateListViewController: BaseViewController, MateListViewable { latest: false) .sink { [weak self] _ in self?.mpcManager?.isAvailableToBeConnected = true - self?.count = 1 self?.addMateButton.buttonState = .connecting } .store(in: &cancellables) - mpcManager?.$paired - .receive(on: RunLoop.main) - .sink { [weak self] isPaired in - if 1...3 ~= self?.count ?? 0 { - if !isPaired { - self?.addMateButton.buttonState = .failure - self?.presenter?.showAlertDisconnected() - } - self?.addMateButton.buttonState = .connecting - } - self?.count += 1 - } - .store(in: &cancellables) - mpcManager?.receivedDataPublisher .receive(on: RunLoop.main) .sink { [weak self] profile in