Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

다른 화면에서 돌아오면 팔로잉 목록에 Selection 테두라가 사라지는 문제 #180 #181

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ extension MainViewController {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: MainCollectionViewCell.identifier, for: indexPath) as! MainCollectionViewCell
cell.setUpCell(list)

if list.userId == self.viewModel?.currentUserId {
self.collectionView.selectItem(at: IndexPath(item: indexPath.item, section: 0), animated: false, scrollPosition: .init())
}

return cell
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ extension MainViewModel {

// Navigation Items
input.didFoldBarButton.subscribe(onNext: { _ in
PublishRelay<Void>.just(Void()).bind(to: self.foldCollection).disposed(by: self.disposeBag)
self.foldCollection.accept(())
}).disposed(by: disposeBag)

input.didAlarmBarButton.subscribe(onNext: { [weak self] _ in
Expand All @@ -150,17 +150,15 @@ extension MainViewModel {
}).disposed(by: disposeBag)

input.didTapTodayButton.subscribe(onNext: { _ in
BehaviorRelay<Date>.just(Date()).bind(to: self.calendarDate).disposed(by: self.disposeBag)
self.calendarDate.accept(Date())
}).disposed(by: disposeBag)

input.didTapNextWeekButton.subscribe(onNext: { _ in
PublishRelay<Bool>.just(true).bind(to: self.scrollWeek).disposed(by: self.disposeBag)

self.scrollWeek.accept(true)
}).disposed(by: disposeBag)

input.didTapPrevWeekButton.subscribe(onNext: { _ in
PublishRelay<Bool>.just(false).bind(to: self.scrollWeek).disposed(by: self.disposeBag)

self.scrollWeek.accept(false)
}).disposed(by: disposeBag)

input.didTapFloatingButton.subscribe(onNext: { _ in
Expand Down