Delete PreloadedWebView and WebViewProvider. Create WebViewConfiguration for shared web view configuration code.

This commit is contained in:
Brent Simmons
2025-01-15 21:55:09 -08:00
parent 7322301be3
commit 1db92f75a4
9 changed files with 128 additions and 262 deletions

View File

@@ -10,6 +10,7 @@ import UIKit
import RSCore
import Account
import Articles
import WebKit
class TimelineViewController: UITableViewController, UndoableCommandRunner {
@@ -34,10 +35,10 @@ class TimelineViewController: UITableViewController, UndoableCommandRunner {
private let keyboardManager = KeyboardManager(type: .timeline)
override var keyCommands: [UIKeyCommand]? {
// If the first responder is the WKWebView (PreloadedWebView) we don't want to supply any keyboard
// If the first responder is the WKWebView we don't want to supply any keyboard
// commands that the system is looking for by going up the responder chain. They will interfere with
// the WKWebViews built in hardware keyboard shortcuts, specifically the up and down arrow keys.
guard let current = UIResponder.currentFirstResponder, !(current is PreloadedWebView) else { return nil }
guard let current = UIResponder.currentFirstResponder, !(current is WKWebView) else { return nil }
return keyboardManager.keyCommands
}