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

๐Ÿ”€ :: (#1330) FAQ numberOfLines๊ฐ€ ์ ์šฉ๋˜์ง€ ์•Š๋Š” ์ด์Šˆ ํ•ด๊ฒฐ #1331

Merged
merged 6 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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 @@ -5,7 +5,15 @@ import RxRelay
import RxSwift
import Utility

public final class QnaContentViewModel: ViewModelType {
@available(
*,
deprecated,
renamed: "FAQContentViewModel",
message: "QnaContentViewModel is deprecated, use FAQContentViewModel instead."
)
typealias QnaContentViewModel = FAQContentViewModel

public final class FAQContentViewModel: ViewModelType {
var disposeBag = DisposeBag()
var dataSource: [FaqEntity]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import DesignSystem
import FaqDomainInterface
import UIKit

@available(
*,
deprecated,
renamed: "FAQTableViewCell",
message: "QuestionTableViewCell is deprecated, use FAQTableViewCell instead."
)
typealias QuestionTableViewCell = FAQTableViewCell

class FAQTableViewCell: UITableViewCell {
@IBOutlet weak var categoryLabel: UILabel!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var expandImageView: UIImageView!

override func awakeFromNib() {
super.awakeFromNib()
if Thread.isMainThread {
MainActor.assumeIsolated {
categoryLabel.font = DesignSystemFontFamily.Pretendard.light.font(size: 12)
categoryLabel.setTextWithAttributes(kernValue: -0.5)
titleLabel.font = DesignSystemFontFamily.Pretendard.medium.font(size: 16)
titleLabel.setTextWithAttributes(kernValue: -0.5, lineSpacing: 5)
}
} else {
Task { @MainActor in
categoryLabel.font = DesignSystemFontFamily.Pretendard.light.font(size: 12)
categoryLabel.setTextWithAttributes(kernValue: -0.5)
titleLabel.font = DesignSystemFontFamily.Pretendard.medium.font(size: 16)
titleLabel.setTextWithAttributes(kernValue: -0.5, lineSpacing: 5)
}
}
}
}

public extension QuestionTableViewCell {
func update(model: FaqEntity) {
categoryLabel.text = model.category
titleLabel.text = model.question
expandImageView.image = model.isOpen ? DesignSystemAsset.Navigation.fold.image : DesignSystemAsset.Navigation
.close.image
}
}

This file was deleted.

Loading