From cf9bea3ea5e79df854d07ed2e9b483246c15f28d Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 20 Feb 2015 13:16:16 +0100 Subject: [PATCH] Call super in deactivate/activate in main/recent route The problem that I identified earlier as a Safari bug turned out to be a bug in main/recent route. Not calling super in deactivate resulted in code to remove observer not being executed at all. --- app/routes/main-tab.coffee | 3 --- app/routes/main/recent.coffee | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/routes/main-tab.coffee b/app/routes/main-tab.coffee index 7c454bd5..d35a328a 100644 --- a/app/routes/main-tab.coffee +++ b/app/routes/main-tab.coffee @@ -17,9 +17,6 @@ Route = TravisRoute.extend deactivate: -> @controllerFor('repos').removeObserver('firstObject', this, 'currentRepoDidChange') - resetController: -> - @controllerFor('repos').removeObserver('firstObject', this, 'currentRepoDidChange') - currentRepoDidChange: -> if repo = @controllerFor('repos').get('firstObject') @controllerFor('repo').set('repo', repo) diff --git a/app/routes/main/recent.coffee b/app/routes/main/recent.coffee index 8f1739ce..4c00c403 100644 --- a/app/routes/main/recent.coffee +++ b/app/routes/main/recent.coffee @@ -5,9 +5,11 @@ Route = MainTabRoute.extend reposTabName: 'recent' activate: -> + @_super.apply(this, arguments) @store.set('isRecentTabOpen', true) deactivate: -> + @_super.apply(this, arguments) @store.set('isRecentTabOpen', false) `export default Route`