You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
684 B
1 lines
684 B
define(["jquery","core/custom_interaction_events","core/pubsub","core_message/message_drawer_events"],function(a,b,c,d){var e={COUNT_CONTAINER:'[data-region="count-container"]'},f=function(){c.publish(d.TOGGLE_VISIBILITY)},g=function(a){return function(){var b=a.find(e.COUNT_CONTAINER),c=parseInt(b.text(),10);isNaN(c)?b.addClass("hidden"):!c||c<2?b.addClass("hidden"):(c-=1,b.text(c))}},h=function(a){b.define(a,[b.events.activate]),a.on(b.events.activate,function(a,b){f(),b.originalEvent.preventDefault()}),c.subscribe(d.CONVERSATION_READ,g(a)),c.subscribe(d.CONTACT_REQUEST_ACCEPTED,g(a)),c.subscribe(d.CONTACT_REQUEST_DECLINED,g(a))},i=function(b){b=a(b),h(b)};return{init:i}});
|