Skip to content

bug: 재생화면 스택 뷰 재사용 이슈 #201

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

Merged
merged 3 commits into from
Dec 4, 2023
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
4 changes: 4 additions & 0 deletions iOS/Layover/Layover/DesignSystem/LOTagStackView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ final class LOTagStackView: UIStackView {
addArrangedSubview(button)
}

func resetTagStackView() {
arrangedSubviews.forEach { $0.removeFromSuperview() }
}

private func setUI() {
self.alignment = .fill
self.distribution = .fillProportionally
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ final class PlaybackCell: UICollectionViewCell {
playbackView.descriptionView.titleLabel.text = info.title
playbackView.descriptionView.setText(info.content)
playbackView.profileLabel.text = info.profileName
playbackView.tagStackView.resetTagStackView()
info.tag.forEach { tag in
playbackView.tagStackView.addTag(tag)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ final class PlaybackViewController: BaseViewController {
let window = windowScene?.windows.first
guard let playerSliderWidth: CGFloat = windowScene?.screen.bounds.width else { return }
guard let windowHeight: CGFloat = windowScene?.screen.bounds.height else { return }
guard let tabBarHeight: CGFloat = self.tabBarController?.tabBar.frame.height else {
return
}
guard let tabBarHeight: CGFloat = self.tabBarController?.tabBar.frame.height else { return }
playerSlider.frame = CGRect(x: 0, y: (windowHeight - tabBarHeight - LOSlider.loSliderHeight / 2), width: playerSliderWidth, height: LOSlider.loSliderHeight)
window?.addSubview(playerSlider)
playerSlider.window?.windowLevel = UIWindow.Level.normal + 1
Expand All @@ -151,7 +149,7 @@ final class PlaybackViewController: BaseViewController {
try await Task.sleep(nanoseconds: 1_000_000_00)
playerSlider.isHidden = false
} catch {
os_log("Falie Waiting show Player Slider")
os_log("Fail Waiting show Player Slider")
}
}

Expand Down
3 changes: 2 additions & 1 deletion iOS/Layover/Layover/Scenes/Playback/PlaybackWorker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ final class PlaybackWorker {

func makeInfiniteScroll(posts: [Post]) -> [Post] {
var tempVideos: [Post] = posts
let tempLastVideo: Post = posts[tempVideos.count-1]
let tempFirstCellIndex: Int = posts.count == 1 ? 1 : 0
let tempLastVideo: Post = posts[tempFirstCellIndex]
let tempFirstVideo: Post = posts[1]
tempVideos.insert(tempLastVideo, at: 0)
tempVideos.append(tempFirstVideo)
Expand Down