]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commit
macOS: Log view: Fix autoscroll to end of log
authorRoopesh Chander <roop@roopc.net>
Mon, 1 Apr 2019 17:06:16 +0000 (22:36 +0530)
committerRoopesh Chander <roop@roopc.net>
Mon, 1 Apr 2019 17:37:48 +0000 (23:07 +0530)
commit00432338725f9a2529a6c3f493010d5938f7a863
tree86c109ec14f7ceb29693238f9c2202b72affc2cf
parenta74dd24578ea76d12543298662d400404a2048ce
macOS: Log view: Fix autoscroll to end of log

Looks like the tableview doesn't know how much to scroll to get to the
end when we use usesAutomaticRowHeights. So we wait for the tableview
to realize its frame has changed and then scroll to the bottom of the
frame explicitly.

Also, we keep track of whether the scroll view is scrolled to the end or
not every time scrolling happens, not just when we add log entries to
the table.

Signed-off-by: Roopesh Chander <roop@roopc.net>
WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift