Skip to content

Commit a2c8dc2

Browse files
committed
Fix deeplink crash
1 parent 9a25b87 commit a2c8dc2

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

ForPDA/Sources/Modules/ArticlePages/ArticlePagesVC.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,10 @@ extension ArticlePagesVC: ArticlePagesVCProtocol {
118118
}
119119

120120
func reconfigureHeader(model: ArticleHeaderViewModel) {
121-
headerView.configure(model: model)
122-
configureNavigationTitle(model.title)
121+
Task { @MainActor in
122+
headerView.configure(model: model)
123+
configureNavigationTitle(model.title)
124+
}
123125
}
124126
}
125127

@@ -302,10 +304,12 @@ extension ArticlePagesVC: ArticlePageControllerDelegate {
302304
extension ArticlePagesVC {
303305

304306
private func configureNavigationTitle(_ deeplinkTitle: String? = nil) {
305-
let label = MarqueeLabel(frame: .zero, rate: 30, fadeLength: 0)
306-
label.text = deeplinkTitle != nil ? deeplinkTitle : presenter.article.info?.title
307-
label.fadeLength = 30
308-
navigationItem.titleView = label
307+
Task { @MainActor in
308+
let label = MarqueeLabel(frame: .zero, rate: 30, fadeLength: 0)
309+
label.text = deeplinkTitle != nil ? deeplinkTitle : presenter.article.info?.title
310+
label.fadeLength = 30
311+
navigationItem.titleView = label
312+
}
309313
}
310314

311315
private func configureMenu() {

0 commit comments

Comments
 (0)