From 6725bd7b037dfd6063b1af4b930594679d2864bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Talip=20G=C3=B6ksu?= Date: Tue, 24 Jul 2018 14:16:23 +0200 Subject: [PATCH] Fix(Scroll to top of list on tap of tabbar item) --- .../Notifications/NotificationsViewController.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Classes/Notifications/NotificationsViewController.swift b/Classes/Notifications/NotificationsViewController.swift index c7353f350..3ebecbe2d 100644 --- a/Classes/Notifications/NotificationsViewController.swift +++ b/Classes/Notifications/NotificationsViewController.swift @@ -15,6 +15,7 @@ final class NotificationsViewController: BaseListViewController2, BaseListViewController2DataSource, ForegroundHandlerDelegate, FlatCacheListener, +TabNavRootViewControllerType, BaseListViewController2EmptyDataSource { private let modelController: NotificationModelController @@ -294,4 +295,13 @@ BaseListViewController2EmptyDataSource { updateUnreadState() } + // MARK: TabNavRootViewControllerType + + func didSingleTapTab() { + feed.collectionView.scrollToTop(animated: true) + } + + func didDoubleTapTab() { + didSingleTapTab() + } }