From 482322c34478b1b929d0e849e51264d0d61dae66 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Mon, 22 Jun 2015 21:52:46 -0700 Subject: [PATCH] fixes #312 --- base/pub/talk/src/js/.main.js | 0 .../js/components/MessagesComponent.coffee | 3 +- base/pub/talk/src/js/main.js | 63 ++++++++++--------- 3 files changed, 36 insertions(+), 30 deletions(-) delete mode 100644 base/pub/talk/src/js/.main.js diff --git a/base/pub/talk/src/js/.main.js b/base/pub/talk/src/js/.main.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/base/pub/talk/src/js/components/MessagesComponent.coffee b/base/pub/talk/src/js/components/MessagesComponent.coffee index 8da63e7845..f9878d6ace 100644 --- a/base/pub/talk/src/js/components/MessagesComponent.coffee +++ b/base/pub/talk/src/js/components/MessagesComponent.coffee @@ -177,13 +177,14 @@ module.exports = recl _messages = @sortedMessages @state.messages @last = _messages[_messages.length-1] + if @last?.ship && @last.ship is window.urb.user then @lastSeen = @last @length = _messages.length setTimeout => @checkMore() if length < @pageSize , 1 - lastIndex = if @lastSeen then _messages.indexOf(@lastSeen) else null + lastIndex = if @lastSeen then _messages.indexOf(@lastSeen)+1 else null lastSaid = null messages = _messages.map (_message,k) => diff --git a/base/pub/talk/src/js/main.js b/base/pub/talk/src/js/main.js index 11412995a6..844a4a0ca3 100644 --- a/base/pub/talk/src/js/main.js +++ b/base/pub/talk/src/js/main.js @@ -1,4 +1,4 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o