mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 04:23:13 +00:00
Merge pull request #765 from stepie22/date-separator-fixes
Date separator fixes
This commit is contained in:
commit
9e249a1d2f
2 changed files with 9 additions and 4 deletions
|
@ -420,9 +420,12 @@ $(function() {
|
|||
|
||||
// Remove the date-change marker we put at the top, because it may
|
||||
// not actually be a date change now
|
||||
var firstChild = $(chan).children().eq(0);
|
||||
if (firstChild.attr("class") === "date-marker") {
|
||||
firstChild.remove();
|
||||
var children = $(chan).children();
|
||||
if (children.eq(0).hasClass("date-marker")) { // Check top most child
|
||||
children.eq(0).remove();
|
||||
} else if (children.eq(0).hasClass("unread-marker") && children.eq(1).hasClass("date-marker")) {
|
||||
// Otherwise the date-marker would get 'stuck' because of the new-message marker
|
||||
children.eq(1).remove();
|
||||
}
|
||||
|
||||
// get the scrollable wrapper around messages
|
||||
|
|
|
@ -32,6 +32,7 @@ module.exports = function(irc, network) {
|
|||
var msg = new Msg({
|
||||
self: data.nick === irc.user.nick,
|
||||
type: Msg.Type.TOGGLE,
|
||||
time: data.time, // msg handles it if it isn't defined
|
||||
});
|
||||
chan.pushMessage(client, msg);
|
||||
|
||||
|
@ -49,7 +50,8 @@ function parse(msg, url, res, client) {
|
|||
head: "",
|
||||
body: "",
|
||||
thumb: "",
|
||||
link: url
|
||||
link: url,
|
||||
time: msg.time,
|
||||
};
|
||||
|
||||
switch (res.type) {
|
||||
|
|
Loading…
Reference in a new issue