Commit 2df20936 authored by JC Brand's avatar JC Brand

New builds. updates #269

parent d33faa53
...@@ -10796,7 +10796,7 @@ define('utils',["jquery"], function ($) { ...@@ -10796,7 +10796,7 @@ define('utils',["jquery"], function ($) {
var utils = { var utils = {
// Translation machinery // Translation machinery
// --------------------- // ---------------------
__: $.proxy(function (str) { __: function (str) {
// Translation factory // Translation factory
if (this.i18n === undefined) { if (this.i18n === undefined) {
this.i18n = locales.en; this.i18n = locales.en;
...@@ -10807,7 +10807,7 @@ define('utils',["jquery"], function ($) { ...@@ -10807,7 +10807,7 @@ define('utils',["jquery"], function ($) {
} else { } else {
return t.fetch(); return t.fetch();
} }
}, this), },
___: function (str) { ___: function (str) {
/* XXX: This is part of a hack to get gettext to scan strings to be /* XXX: This is part of a hack to get gettext to scan strings to be
...@@ -27689,7 +27689,7 @@ define("converse-templates", [ ...@@ -27689,7 +27689,7 @@ define("converse-templates", [
// Translation machinery // Translation machinery
// --------------------- // ---------------------
var __ = utils.__; var __ = $.proxy(utils.__, this);
var ___ = utils.___; var ___ = utils.___;
// Translation aware constants // Translation aware constants
// --------------------------- // ---------------------------
...@@ -28298,6 +28298,9 @@ define("converse-templates", [ ...@@ -28298,6 +28298,9 @@ define("converse-templates", [
if (!body) { if (!body) {
if (composing.length || paused.length) { if (composing.length || paused.length) {
// FIXME: use one attribute for chat states (e.g.
// chatstate) instead of saving 'paused' and
// 'composing' separately.
this.messages.add({ this.messages.add({
fullname: fullname, fullname: fullname,
sender: 'them', sender: 'them',
...@@ -30432,10 +30435,14 @@ define("converse-templates", [ ...@@ -30432,10 +30435,14 @@ define("converse-templates", [
}, },
initialize: function () { initialize: function () {
this.model.messages.on('add', this.updateUnreadMessagesCounter, this); this.model.messages.on('add', function (m) {
this.model.on('showSentOTRMessage', this.updateUnreadMessagesCounter, this); if (!(m.get('composing') || m.get('paused'))) {
this.model.on('showReceivedOTRMessage', this.updateUnreadMessagesCounter, this); this.updateUnreadMessagesCounter();
}
}, this);
this.model.on('change:minimized', this.clearUnreadMessagesCounter, this); this.model.on('change:minimized', this.clearUnreadMessagesCounter, this);
this.model.on('showReceivedOTRMessage', this.updateUnreadMessagesCounter, this);
this.model.on('showSentOTRMessage', this.updateUnreadMessagesCounter, this);
}, },
render: function () { render: function () {
This diff is collapsed.
...@@ -10796,7 +10796,7 @@ define('utils',["jquery"], function ($) { ...@@ -10796,7 +10796,7 @@ define('utils',["jquery"], function ($) {
var utils = { var utils = {
// Translation machinery // Translation machinery
// --------------------- // ---------------------
__: $.proxy(function (str) { __: function (str) {
// Translation factory // Translation factory
if (this.i18n === undefined) { if (this.i18n === undefined) {
this.i18n = locales.en; this.i18n = locales.en;
...@@ -10807,7 +10807,7 @@ define('utils',["jquery"], function ($) { ...@@ -10807,7 +10807,7 @@ define('utils',["jquery"], function ($) {
} else { } else {
return t.fetch(); return t.fetch();
} }
}, this), },
___: function (str) { ___: function (str) {
/* XXX: This is part of a hack to get gettext to scan strings to be /* XXX: This is part of a hack to get gettext to scan strings to be
...@@ -34446,7 +34446,7 @@ define("converse-templates", [ ...@@ -34446,7 +34446,7 @@ define("converse-templates", [
// Translation machinery // Translation machinery
// --------------------- // ---------------------
var __ = utils.__; var __ = $.proxy(utils.__, this);
var ___ = utils.___; var ___ = utils.___;
// Translation aware constants // Translation aware constants
// --------------------------- // ---------------------------
...@@ -35055,6 +35055,9 @@ define("converse-templates", [ ...@@ -35055,6 +35055,9 @@ define("converse-templates", [
if (!body) { if (!body) {
if (composing.length || paused.length) { if (composing.length || paused.length) {
// FIXME: use one attribute for chat states (e.g.
// chatstate) instead of saving 'paused' and
// 'composing' separately.
this.messages.add({ this.messages.add({
fullname: fullname, fullname: fullname,
sender: 'them', sender: 'them',
...@@ -37189,10 +37192,14 @@ define("converse-templates", [ ...@@ -37189,10 +37192,14 @@ define("converse-templates", [
}, },
initialize: function () { initialize: function () {
this.model.messages.on('add', this.updateUnreadMessagesCounter, this); this.model.messages.on('add', function (m) {
this.model.on('showSentOTRMessage', this.updateUnreadMessagesCounter, this); if (!(m.get('composing') || m.get('paused'))) {
this.model.on('showReceivedOTRMessage', this.updateUnreadMessagesCounter, this); this.updateUnreadMessagesCounter();
}
}, this);
this.model.on('change:minimized', this.clearUnreadMessagesCounter, this); this.model.on('change:minimized', this.clearUnreadMessagesCounter, this);
this.model.on('showReceivedOTRMessage', this.updateUnreadMessagesCounter, this);
this.model.on('showSentOTRMessage', this.updateUnreadMessagesCounter, this);
}, },
render: function () { render: function () {
This diff is collapsed.
...@@ -10796,7 +10796,7 @@ define('utils',["jquery"], function ($) { ...@@ -10796,7 +10796,7 @@ define('utils',["jquery"], function ($) {
var utils = { var utils = {
// Translation machinery // Translation machinery
// --------------------- // ---------------------
__: $.proxy(function (str) { __: function (str) {
// Translation factory // Translation factory
if (this.i18n === undefined) { if (this.i18n === undefined) {
this.i18n = locales.en; this.i18n = locales.en;
...@@ -10807,7 +10807,7 @@ define('utils',["jquery"], function ($) { ...@@ -10807,7 +10807,7 @@ define('utils',["jquery"], function ($) {
} else { } else {
return t.fetch(); return t.fetch();
} }
}, this), },
___: function (str) { ___: function (str) {
/* XXX: This is part of a hack to get gettext to scan strings to be /* XXX: This is part of a hack to get gettext to scan strings to be
...@@ -42043,7 +42043,7 @@ define("converse-templates", [ ...@@ -42043,7 +42043,7 @@ define("converse-templates", [
// Translation machinery // Translation machinery
// --------------------- // ---------------------
var __ = utils.__; var __ = $.proxy(utils.__, this);
var ___ = utils.___; var ___ = utils.___;
// Translation aware constants // Translation aware constants
// --------------------------- // ---------------------------
...@@ -42652,6 +42652,9 @@ define("converse-templates", [ ...@@ -42652,6 +42652,9 @@ define("converse-templates", [
if (!body) { if (!body) {
if (composing.length || paused.length) { if (composing.length || paused.length) {
// FIXME: use one attribute for chat states (e.g.
// chatstate) instead of saving 'paused' and
// 'composing' separately.
this.messages.add({ this.messages.add({
fullname: fullname, fullname: fullname,
sender: 'them', sender: 'them',
...@@ -44786,10 +44789,14 @@ define("converse-templates", [ ...@@ -44786,10 +44789,14 @@ define("converse-templates", [
}, },
initialize: function () { initialize: function () {
this.model.messages.on('add', this.updateUnreadMessagesCounter, this); this.model.messages.on('add', function (m) {
this.model.on('showSentOTRMessage', this.updateUnreadMessagesCounter, this); if (!(m.get('composing') || m.get('paused'))) {
this.model.on('showReceivedOTRMessage', this.updateUnreadMessagesCounter, this); this.updateUnreadMessagesCounter();
}
}, this);
this.model.on('change:minimized', this.clearUnreadMessagesCounter, this); this.model.on('change:minimized', this.clearUnreadMessagesCounter, this);
this.model.on('showReceivedOTRMessage', this.updateUnreadMessagesCounter, this);
this.model.on('showSentOTRMessage', this.updateUnreadMessagesCounter, this);
}, },
render: function () { render: function () {
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment