Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: CategoryDetailFeature 액션 수정 #148

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

stealmh
Copy link
Member

@stealmh stealmh commented Oct 18, 2024

#️⃣연관된 이슈

#129

📝작업 내용

  • 액션 컨벤션에 맞춰 수정
  • 일부 순서가 중요하지 않은 Effect 일부 수정
  • 열거형 case let 수정

스크린샷 (선택)

💬리뷰 요구사항(선택)

-- case .onAppear:
-- return .run { send in
-- let request = BasePageableRequest(page: 0, size: 30, sort: ["createdAt,desc"])
-- let response = try await categoryClient.카테고리_목록_조회(request, true).toDomain()
-- await send(.async(.카테고리_내_컨텐츠_목록_조회))
-- await send(.inner(.카테고리_목록_조회_결과(response)))

--   for await _ in self.pasteboard.changes() {
--   let url = try await pasteboard.probableWebURL()
--   await send(.delegate(.linkCopyDetected(url)), animation: .pokitSpring)
--   }
--}
++ case .뷰가_나타났을때:
++ return .merge(
++ .send(.async(.카테고리_내_컨텐츠_목록_조회_API)),
++ .send(.async(.카테고리_목록_조회_API)),
++ .send(.async(.클립보드_감지))
++ )

예시로 이와 같이 액션으로 분리할 수 있는 것들을 빼낸 후 merge를 통해 가독성을 챙기고
굳이 각기다른 순서가 중요하지 않은 3개의 API들의 await 제거 후 처리되는 순으로 작동하도록 수정하였음

@stealmh stealmh added the Refactor 🏗️ 뚝딱뚝딱 코드 및 구조 수정 label Oct 18, 2024
@stealmh stealmh requested a review from ShapeKim98 October 18, 2024 05:02
@stealmh stealmh self-assigned this Oct 18, 2024
@stealmh stealmh linked an issue Oct 18, 2024 that may be closed by this pull request
14 tasks
Copy link
Contributor

@ShapeKim98 ShapeKim98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! 활성화, 완료되었을때 같이 새로 추가된 컨벤션들도 추후에 반영하겠습니당

@@ -45,7 +45,7 @@ public extension CategoryDetailView {
if let shareURL = URL(string: content.data) {
PokitShareSheet(
items: [shareURL],
completion: { send(.링크_공유_완료) }
completion: { send(.링크_공유_완료되었을때) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completion -> 완료되었을때 확인하겠습니다

@stealmh stealmh merged commit 7a7778b into develop Oct 20, 2024
1 check passed
@stealmh stealmh deleted the refactor/#129-CategoryDetailFeature branch November 21, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor 🏗️ 뚝딱뚝딱 코드 및 구조 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

액션 컨벤션 정립
2 participants