mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 08:17:16 +00:00
Clear window scroll position from state restoration when no article is selected. Fixes a bug where restoring to no article, followed by clicking an article, would auto-scroll the web view when it shouldn’t.
This commit is contained in:
1 parent
0f5046bbb6
commit
e2c41220ff
1 file changed
+3
-1
@@ -40,7 +40,9 @@ final class DetailWebViewController: NSViewController {
|
||||
}
|
||||
|
||||
var windowState: DetailWindowState {
|
||||
DetailWindowState(isShowingExtractedArticle: isShowingExtractedArticle, windowScrollY: windowScrollY ?? 0)
|
||||
// Without an article there’s no scroll position worth saving.
|
||||
let scrollY = article == nil ? 0 : (windowScrollY ?? 0)
|
||||
return DetailWindowState(isShowingExtractedArticle: isShowingExtractedArticle, windowScrollY: scrollY)
|
||||
}
|
||||
|
||||
var article: Article? {
|
||||
|
||||
Reference in new issue
Block a user