summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadVPN/LogStreamerViewController.swift7
1 files changed, 7 insertions, 0 deletions
diff --git a/ios/MullvadVPN/LogStreamerViewController.swift b/ios/MullvadVPN/LogStreamerViewController.swift
index d033a8fc70..fc360781e8 100644
--- a/ios/MullvadVPN/LogStreamerViewController.swift
+++ b/ios/MullvadVPN/LogStreamerViewController.swift
@@ -69,6 +69,13 @@ class LogStreamerViewController: UIViewController, UITextViewDelegate {
// Disable autoscroll if user scrolled up
if translation.y > 0 {
autoScroll = false
+ } else if translation.y < 0 {
+ // Enable autoscroll if user scrolled to the bottom of the view
+ let maxScrollY = scrollView.contentSize.height - scrollView.frame.height
+
+ if targetContentOffset.pointee.y >= maxScrollY {
+ autoScroll = true
+ }
}
}