|
@@ -11,6 +11,11 @@ var
|
|
|
**/
|
|
**/
|
|
|
SELECTED_ROOM = null,
|
|
SELECTED_ROOM = null,
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @type {number}
|
|
|
|
|
+ **/
|
|
|
|
|
+ SELECTED_ROOM_UNREAD =-1,
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @type {SimpleChatSystem|null}
|
|
* @type {SimpleChatSystem|null}
|
|
|
**/
|
|
**/
|
|
@@ -173,6 +178,7 @@ function selectRoom(room) {
|
|
|
document.body.classList.remove(R.klass.noRoomSelected);
|
|
document.body.classList.remove(R.klass.noRoomSelected);
|
|
|
SELECTED_ROOM = room;
|
|
SELECTED_ROOM = room;
|
|
|
SELECTED_CONTEXT = /** @type {SimpleChatSystem} */ (DATA.context.getChannelContext(room.id));
|
|
SELECTED_CONTEXT = /** @type {SimpleChatSystem} */ (DATA.context.getChannelContext(room.id));
|
|
|
|
|
+ SELECTED_ROOM_UNREAD = room.lastRead;
|
|
|
if (isNative())
|
|
if (isNative())
|
|
|
__native.setCurrentChannel(room.id);
|
|
__native.setCurrentChannel(room.id);
|
|
|
onRoomSelected();
|
|
onRoomSelected();
|
|
@@ -299,6 +305,7 @@ function sendMsg(chan, msg, pendingObj, replyTo) {
|
|
|
};
|
|
};
|
|
|
url += "&attachments=" +HttpRequestWrapper.encode(JSON.stringify([attachment]));
|
|
url += "&attachments=" +HttpRequestWrapper.encode(JSON.stringify([attachment]));
|
|
|
}
|
|
}
|
|
|
|
|
+ SELECTED_ROOM_UNREAD = -1;
|
|
|
HttpRequestWrapper(HttpRequestMethod.POST, url).setResponseType(HttpRequestResponseType.JSON).callbackSuccess(function(code, text, resp) {
|
|
HttpRequestWrapper(HttpRequestMethod.POST, url).setResponseType(HttpRequestResponseType.JSON).callbackSuccess(function(code, text, resp) {
|
|
|
if (resp && resp["pendingId"] !== undefined) {
|
|
if (resp && resp["pendingId"] !== undefined) {
|
|
|
pendingObj.pendingId = resp["pendingId"];
|
|
pendingObj.pendingId = resp["pendingId"];
|