Skip to content

Commit

Permalink
[fix] #111 피드백 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
ShapeKim98 committed Sep 8, 2024
1 parent 1fab911 commit 055b1de
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions Projects/DSKit/Sources/Components/PokitShareSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import SwiftUI

public struct PokitShareSheet: UIViewControllerRepresentable {
private var items: [Any]
private var completion: ((_ completed: Bool) -> Void)?
private var completion: (() -> Void)?

public init(
items: [Any],
completion: ((_: Bool) -> Void)?
completion: (() -> Void)?
) {
self.items = items
self.completion = completion
Expand All @@ -24,8 +24,8 @@ public struct PokitShareSheet: UIViewControllerRepresentable {
activityItems: items,
applicationActivities: nil
)
controller.completionWithItemsHandler = { _, completed, _, _ in
completion?(completed)
controller.completionWithItemsHandler = { _, _, _, _ in
completion?()
}
return controller
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public struct CategoryDetailFeature {
case dismiss
case onAppear
case pagenation
case 링크_공유_완료(completed: Bool)
case 링크_공유_완료
}

public enum InnerAction: Equatable {
Expand Down Expand Up @@ -219,7 +219,7 @@ private extension CategoryDetailFeature {
}
case .pagenation:
return .run { send in await send(.async(.pagenation_네트워크)) }
case .링크_공유_완료(completed: let completed):
case .링크_공유_완료:
state.shareSheetItem = nil
return .none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public extension CategoryDetailView {
if let shareURL = URL(string: content.data) {
PokitShareSheet(
items: [shareURL],
completion: { send(.링크_공유_완료(completed: $0)) }
completion: { send(.링크_공유_완료) }
)
.presentationDetents([.medium, .large])
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public struct ContentDetailFeature {
case favoriteButtonTapped
case alertCancelButtonTapped

case 링크_공유_완료(completed: Bool)
case 링크_공유_완료
}

public enum InnerAction: Equatable {
Expand Down Expand Up @@ -176,7 +176,7 @@ private extension ContentDetailFeature {
await send(.async(.즐겨찾기(id: content.id)))
}
}
case .링크_공유_완료(completed: let completed):
case .링크_공유_완료:
state.showShareSheet = false
return .none
case .alertCancelButtonTapped:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public extension ContentDetailView {
let shareURL = URL(string: content.data) {
PokitShareSheet(
items: [shareURL],
completion: { send(.링크_공유_완료(completed: $0)) }
completion: { send(.링크_공유_완료) }
)
.presentationDetents([.medium, .large])
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public struct ContentListFeature {
case contentListViewOnAppeared
case pagenation

case 링크_공유_완료(completed: Bool)
case 링크_공유_완료
}

public enum InnerAction: Equatable {
Expand Down Expand Up @@ -193,7 +193,7 @@ private extension ContentListFeature {

case .pagenation:
return .run { send in await send(.async(.pagenation_네트워크)) }
case .링크_공유_완료(completed: let completed):
case .링크_공유_완료:
state.shareSheetItem = nil
return .none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public extension ContentListView {
if let shareURL = URL(string: content.data) {
PokitShareSheet(
items: [shareURL],
completion: { send(.링크_공유_완료(completed: $0)) }
completion: { send(.링크_공유_완료) }
)
.presentationDetents([.medium, .large])
}
Expand Down
4 changes: 2 additions & 2 deletions Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public struct PokitRootFeature {
case categoryTapped(BaseCategoryItem)
case contentItemTapped(BaseContentItem)

case 링크_공유_완료(completed: Bool)
case 링크_공유_완료

case pokitRootViewOnAppeared

Expand Down Expand Up @@ -244,7 +244,7 @@ private extension PokitRootFeature {
return .send(.async(.미분류_카테고리_컨텐츠_페이징_조회))
default: return .none
}
case .링크_공유_완료(completed: let completed):
case .링크_공유_완료:
state.shareSheetItem = nil
return .none
}
Expand Down
2 changes: 1 addition & 1 deletion Projects/Feature/FeaturePokit/Sources/PokitRootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public extension PokitRootView {
if let shareURL = URL(string: content.data) {
PokitShareSheet(
items: [shareURL],
completion: { send(.링크_공유_완료(completed: $0)) }
completion: { send(.링크_공유_완료) }
)
.presentationDetents([.medium, .large])
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public struct RemindFeature {
)
case deleteAlertConfirmTapped(content: BaseContentItem)

case 링크_공유_완료(completed: Bool)
case 링크_공유_완료

case remindViewOnAppeared
}
Expand Down Expand Up @@ -175,7 +175,7 @@ private extension RemindFeature {
await send(.async(.읽지않음_컨텐츠_조회), animation: .pokitDissolve)
await send(.async(.즐겨찾기_링크모음_조회), animation: .pokitDissolve)
}
case .링크_공유_완료(completed: let completed):
case .링크_공유_완료:
state.shareSheetItem = nil
return .none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public extension RemindView {
if let shareURL = URL(string: content.data) {
PokitShareSheet(
items: [shareURL],
completion: { send(.링크_공유_완료(completed: $0)) }
completion: { send(.링크_공유_완료) }
)
.presentationDetents([.medium, .large])
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public struct PokitSearchFeature {
/// - TextInput OnSubmitted
case searchTextInputOnSubmitted

case 링크_공유_완료(completed: Bool)
case 링크_공유_완료

case onAppear
case 로딩_isPresented
Expand Down Expand Up @@ -331,7 +331,7 @@ private extension PokitSearchFeature {
case .unreadChipTapped:
state.domain.condition.isRead = false
return .send(.inner(.페이징_초기화))
case .링크_공유_완료(completed: let completed):
case .링크_공유_완료:
state.shareSheetItem = nil
return .none
case .로딩_isPresented:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public extension PokitSearchView {
if let shareURL = URL(string: content.data) {
PokitShareSheet(
items: [shareURL],
completion: { send(.링크_공유_완료(completed: $0)) }
completion: { send(.링크_공유_완료) }
)
.presentationDetents([.medium, .large])
}
Expand Down

0 comments on commit 055b1de

Please sign in to comment.