-
Notifications
You must be signed in to change notification settings - Fork 1
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
차단하기 기능 구현 #75
차단하기 기능 구현 #75
Conversation
- ReportAction enum 커스텀 - title, message, contentView, 왼쪽, 오른쪽, dim action 추가 함수 구현 - UIViewController에서 경고창 표시하는 함수 구현 - Color -> Image로 변환 함수 구현 => button에 State에 따른 색상을 넣기 위함 - addAction Custom -> button 혹은 view에서 동작 구현을 위함
- 프로필 더블 클릭, 다른 화면으로 이동할 때는 pauseView를 표시해야하고 - report 버튼을 클릭할 때는 pauseView를 표시하지 않아야 해서 - TimerActiveAction 케이스를 기준으로 Timer를 재개, 멈춤 구현 - info button tap, report button tap 합성 -> infoView를 hidden 시키는 두 가지 액션 처리
- 현재는 차단하기를 했을 떄, 데이터 또는 dataSource에서 item을 삭제하지 않고, 0.5초 후에 scroll하는 방식으로 구현 - dimview를 클릭하면 타이머가 다시 시작되도록 이벤트 전달 - reject 버튼 이벤트는 애니메이션 1초여서 1초후에 다음 유저로 넘어가도록 구현
let updateScrollIndexTrigger = timeOverTrigger.withLatestFrom(currentIndexRelay.asDriver(onErrorJustReturn: 0)) { action, index in | ||
switch action { | ||
case .scroll: currentIndexRelay.accept(index + 1) | ||
case .delete: currentIndexRelay.accept(index + 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분은 셀 delete가 가능하도록 처리되면 리팩토링 하겠습니다.
targetClosure(self) | ||
} | ||
|
||
public func addAction(for event: UIControl.Event, closure: @escaping UIControlTargetClosure) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rx를 안 쓴 이유는 DSKit이 RxSwift를 의존하면 안 된다고 잘못 생각하고 있었네요..
UIView나 UIButton에 클로저를 전달해서 액션 추가를 직접 해볼 수 있어서 재밌었습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다. 애니메이션 넣으니까 훨씬 좋아보이네요.
추후에 셀 삭제 시에 모델과 셀 둘 다 delete하는 방향으로 리팩토링하겠습니다! |
Motivation ⍰
Key Changes 🔑
미리보기는 다음과 같습니다.
item delete를 해서 다음 유저로 넘어가게 하고 싶은데 삭제될 아이템의 구독이 해제되지 않거나
indexPath가 1:다 로 되는 문제가 있는데 이 부분은 피드백 주시면 감사합니다.
AlertController를 커스텀했는데, 버튼이 하나 있을 때와 두 개일 때의 separatorView를 어떻게 설정하면 좋을 지 모르겠습니다.
또한, 신고하기에서 여러 버튼이 있는데 content View에 담아서 전달하는 방식으로 생각하고 있기는한데 이 부분도 어떻게 처리하면 좋을 지 피드백 주시면 감사하겠습니다.
To Reviewers 🙏🏻
차단하기
혹은취소
혹은dimView 클릭
이 잘 동작하는 지 확인해주세요Linked Issue 🔗