Skip to content

Commit

Permalink
[CHORE] 변수 은닉화 (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
MMMIIIN committed Feb 18, 2024
1 parent 1497c6c commit dd6c61b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
12 changes: 10 additions & 2 deletions Manito/Manito/Screens/Detail-Wait/UIComponent/CalendarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ final class CalendarView: UIView {
// MARK: - property

private var selectStartDate: Date = Date()
var startDateText: String = ""
var endDateText: String = ""
private var startDateText: String = ""
private var endDateText: String = ""
var isFirstTap: Bool = false

let startDateTapPublisher: PassthroughSubject<String, Never> = PassthroughSubject()
Expand Down Expand Up @@ -197,6 +197,14 @@ final class CalendarView: UIView {
return self.endDateText
}

func setStartDateText(_ text: String) {
self.startDateText = text
}

func setEndDateText(_ text: String) {
self.endDateText = text
}

private func showAlertOverDateSelect() {
self.viewController?.makeAlert(title: TextLiteral.Common.Calendar.maxAlertTitle.localized(),
message: TextLiteral.Common.Calendar.maxDateContent.localized())
Expand Down
9 changes: 5 additions & 4 deletions Manito/Manito/Screens/Detail-Wait/View/DetailEditView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,12 @@ final class DetailEditView: UIView, BaseViewType {
guard let startDate = startDateString.toDefaultDate else { return }
if startDate.isPast {
let fiveDaysInterval: TimeInterval = .oneDayInterval * 4
self.calendarView.startDateText = Date().toFullString
self.calendarView.endDateText = (Date() + fiveDaysInterval).toFullString

self.calendarView.setStartDateText(Date().toFullString)
self.calendarView.setEndDateText((Date() + fiveDaysInterval).toFullString)
} else {
self.calendarView.startDateText = startDateString
self.calendarView.endDateText = endDateString
self.calendarView.setStartDateText(startDateString)
self.calendarView.setEndDateText(endDateString)
}
self.calendarView.setupDateRange()
}
Expand Down

0 comments on commit dd6c61b

Please sign in to comment.