From d591ce638e7ffdbe9091315a0283987b41fec1bf Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Tue, 20 Sep 2022 21:19:28 +0200 Subject: [PATCH] Fix crash when scrolling chat list Fixes: #6749 --- Riot/Modules/Home/AllChats/AllChatsViewController.swift | 2 +- changelog.d/6749.bugfix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/6749.bugfix diff --git a/Riot/Modules/Home/AllChats/AllChatsViewController.swift b/Riot/Modules/Home/AllChats/AllChatsViewController.swift index d1feec95a5..291ea8322b 100644 --- a/Riot/Modules/Home/AllChats/AllChatsViewController.swift +++ b/Riot/Modules/Home/AllChats/AllChatsViewController.swift @@ -352,7 +352,7 @@ class AllChatsViewController: HomeViewController { private var initialScrollPosition: Double = 0 private func scrollPosition(of scrollView: UIScrollView) -> Double { - return scrollView.contentOffset.y + scrollView.adjustedContentInset.top + scrollView.adjustedContentInset.bottom + return scrollView.contentOffset.y + scrollView.adjustedContentInset.top } override func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { diff --git a/changelog.d/6749.bugfix b/changelog.d/6749.bugfix new file mode 100644 index 0000000000..e84ee6f0c5 --- /dev/null +++ b/changelog.d/6749.bugfix @@ -0,0 +1 @@ +Fix crash when scrolling chat list