From 5d04df0c490406ea937a41413e029dee79ccb175 Mon Sep 17 00:00:00 2001 From: heejoo Date: Sat, 9 Mar 2024 23:21:30 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20#360=20-=20didSet=20=EC=95=88=EC=9D=98?= =?UTF-8?q?=20=EB=82=B4=EC=9A=A9=20=ED=95=A8=EC=88=98=EB=A1=9C=20=EB=B9=BC?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/Around/View/AroundView.swift | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Around/View/AroundView.swift b/YELLO-iOS/YELLO-iOS/Presentation/Around/View/AroundView.swift index 48480c0f..b88c6360 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Around/View/AroundView.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Around/View/AroundView.swift @@ -28,34 +28,7 @@ final class AroundView: BaseView { var scrollCount = 0 var isUserSenderVote = false { didSet { - if isUserSenderVote { - filterButtonLabel.text = StringLiterals.Around.myYello - filterButtonStackView.spacing = 0 - filterButtonStackView.snp.updateConstraints { - $0.leading.equalToSuperview().inset(8.adjustedWidth) - } - aroundEmptyView.emptyDescriptionLabel.setTextWithLineHeight( - text: StringLiterals.Recommending.Empty.timeLineMyTitle, - lineHeight: 24) - } else { - filterButtonLabel.text = StringLiterals.Around.allYello - filterButtonStackView.spacing = 6.adjustedWidth - filterButtonStackView.snp.updateConstraints { - $0.leading.equalToSuperview().inset(20.adjustedWidth) - } - aroundEmptyView.emptyDescriptionLabel.setTextWithLineHeight( - text: StringLiterals.Recommending.Empty.timeLineAllTitle, - lineHeight: 24) - } - - self.aroundPage = -1 - self.aroundCount = -1 - self.isFinishPaging = false - self.fetchingMore = false - self.aroundTableView.reloadData() - self.aroundModelDummy = [] - self.around() - self.updateView() + updateAroundView() } } @@ -221,10 +194,6 @@ final class AroundView: BaseView { } } - private func setAroundViewMode() { - - } - // MARK: Custom Function /// 친구가 없을 때 초대 뷰를 띄우는 로직 func updateView() { @@ -236,6 +205,37 @@ final class AroundView: BaseView { } } + private func updateAroundView() { + if isUserSenderVote { + filterButtonLabel.text = StringLiterals.Around.myYello + filterButtonStackView.spacing = 0 + filterButtonStackView.snp.updateConstraints { + $0.leading.equalToSuperview().inset(8.adjustedWidth) + } + aroundEmptyView.emptyDescriptionLabel.setTextWithLineHeight( + text: StringLiterals.Recommending.Empty.timeLineMyTitle, + lineHeight: 24) + } else { + filterButtonLabel.text = StringLiterals.Around.allYello + filterButtonStackView.spacing = 6.adjustedWidth + filterButtonStackView.snp.updateConstraints { + $0.leading.equalToSuperview().inset(20.adjustedWidth) + } + aroundEmptyView.emptyDescriptionLabel.setTextWithLineHeight( + text: StringLiterals.Recommending.Empty.timeLineAllTitle, + lineHeight: 24) + } + + self.aroundPage = -1 + self.aroundCount = -1 + self.isFinishPaging = false + self.fetchingMore = false + self.aroundTableView.reloadData() + self.aroundModelDummy = [] + self.around() + self.updateView() + } + // MARK: Objc Function @objc func refreshTable(refresh: UIRefreshControl) { self.isRefreshing = true