X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FUIComponents%2FScrollViewEvent.cs;h=0aacaa3c523132c58cd333614754f5f7e4f3f24c;hb=e42ecade8c3418f160f6959e8ffaff2db3a01a04;hp=304bad3dd5f041da9efc6112443e26fd2f7bc0d5;hpb=027bd09397e789b3d26d379bb6b2dbbe31d064d8;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/Tizen.NUI/src/public/UIComponents/ScrollViewEvent.cs b/src/Tizen.NUI/src/public/UIComponents/ScrollViewEvent.cs index 304bad3..0aacaa3 100755 --- a/src/Tizen.NUI/src/public/UIComponents/ScrollViewEvent.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ScrollViewEvent.cs @@ -46,34 +46,28 @@ namespace Tizen.NUI { add { - lock (this) + // Restricted to only one listener + if (_scrollViewSnapStartedEventHandler == null) { - // Restricted to only one listener - if (_scrollViewSnapStartedEventHandler == null) - { - _scrollViewSnapStartedEventHandler += value; + _scrollViewSnapStartedEventHandler += value; - _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted); - ScrollViewSnapStartedSignal snapStarted = this.SnapStartedSignal(); - snapStarted?.Connect(_scrollViewSnapStartedCallbackDelegate); - snapStarted?.Dispose(); - } + _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted); + ScrollViewSnapStartedSignal snapStarted = this.SnapStartedSignal(); + snapStarted?.Connect(_scrollViewSnapStartedCallbackDelegate); + snapStarted?.Dispose(); } } remove { - lock (this) + if (_scrollViewSnapStartedEventHandler != null) { - if (_scrollViewSnapStartedEventHandler != null) - { - ScrollViewSnapStartedSignal snapStarted = this.SnapStartedSignal(); - snapStarted?.Disconnect(_scrollViewSnapStartedCallbackDelegate); - snapStarted?.Dispose(); - } - - _scrollViewSnapStartedEventHandler -= value; + ScrollViewSnapStartedSignal snapStarted = this.SnapStartedSignal(); + snapStarted?.Disconnect(_scrollViewSnapStartedCallbackDelegate); + snapStarted?.Dispose(); } + + _scrollViewSnapStartedEventHandler -= value; } }