255:a3e0d54eef57
Anton Shestakov <av6@dwimlabs.net>, Sun, 04 Dec 2016 13:58:13 +0800
contacts: only count unread for the exact jid

previous change 232:0fe8137e0f76

coffee/progress.coffee

Permissions: -rw-r--r--

Other formats: Feeds:
class window.Tram.ProgressApp extends Backbone.View
initialize: ->
@listenTo(@model, 'change:progress', @updateProgress)
@render()
updateProgress: ->
switch @model.get('progress')
when 0
setTimeout =>
if @model.get('progress') is 0
@model.set('progress', 10)
, 600
when 100
setTimeout =>
if @model.get('progress') is 100
@model.unset('progress')
, 600
render: ->
@rivet = rivets.bind(@el, model: @model, view: @)
@
remove: ->
@rivet.unbind()
super