From 1b815c7126242166143fa6ff053b9cb01ebbc4e6 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Thu, 24 Jul 2014 12:16:28 +0400 Subject: [PATCH] Added myLoadThumb cleanup --- app/js/directives.js | 17 +++++++++-------- app/partials/chat_modal.html | 3 ++- app/partials/dialog.html | 1 + app/partials/head.html | 1 + app/partials/im.html | 3 ++- app/partials/settings_modal.html | 1 + 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/app/js/directives.js b/app/js/directives.js index 9e9a9f7d..158a9f1f 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -1013,13 +1013,14 @@ angular.module('myApp.directives', ['myApp.filters']) }); }) - var cleanup = angular.noop; - // function () { - // setTimeout(function () { - // $scope.$destroy() - // stopWatching(); - // }, 0); - // }; + var cleanup = attrs.watch + ? angular.noop + : function () { + setTimeout(function () { + $scope.$destroy() + stopWatching(); + }, 0); + }; } }) @@ -1550,7 +1551,7 @@ angular.module('myApp.directives', ['myApp.filters']) }) - + .directive('myUserLink', function ($window, $timeout, $rootScope, AppUsersManager) { return { diff --git a/app/partials/chat_modal.html b/app/partials/chat_modal.html index 8c984dff..d82a1ade 100644 --- a/app/partials/chat_modal.html +++ b/app/partials/chat_modal.html @@ -10,6 +10,7 @@ @@ -101,4 +102,4 @@ - \ No newline at end of file + diff --git a/app/partials/dialog.html b/app/partials/dialog.html index 8f17d7ab..208e1a2c 100644 --- a/app/partials/dialog.html +++ b/app/partials/dialog.html @@ -17,6 +17,7 @@ diff --git a/app/partials/head.html b/app/partials/head.html index 2fb28108..4be619eb 100644 --- a/app/partials/head.html +++ b/app/partials/head.html @@ -5,6 +5,7 @@ diff --git a/app/partials/im.html b/app/partials/im.html index 1fc43112..871d37f0 100644 --- a/app/partials/im.html +++ b/app/partials/im.html @@ -206,6 +206,7 @@ @@ -214,6 +215,7 @@ @@ -263,4 +265,3 @@
- diff --git a/app/partials/settings_modal.html b/app/partials/settings_modal.html index c1f6dec4..1b6a7eb4 100644 --- a/app/partials/settings_modal.html +++ b/app/partials/settings_modal.html @@ -10,6 +10,7 @@