Prevent notes polling when there are not notes

This commit is contained in:
Jacob Vosmaer 2014-09-29 17:32:56 +02:00
parent 9654cbb592
commit 693cee89f9
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ v 7.4.0
- Sort search autocomplete projects by stars count so most popular go first
- Do not delete tmp/repositories itself during clean-up, only its contents
- Support for backup uploads to remote storage
- Prevent notes polling when there are not notes
v 7.3.1
- Fix ref parsing in Gitlab::GitAccess

View File

@ -6,6 +6,7 @@ class Notes
@notes_url = gon.relative_url_root + @notes_url if gon.relative_url_root?
@note_ids = note_ids
@last_fetched_at = last_fetched_at
@noteable_url = document.URL
@initRefresh()
@setupMainTargetNoteForm()
@cleanBinding()
@ -95,7 +96,8 @@ class Notes
, 15000
refresh: ->
@getContent() unless document.hidden
unless document.hidden or (@noteable_url != document.URL)
@getContent()
getContent: ->
$.ajax