Trying to implement highlighting of new messages
Hello,
I am trying to implement a functionality similar to the Pidgin Markerline plugin in SamePlace. In Pidgin, there's a line which moves below all messages every time the chat pane loses focus. This way when you come back to the chat pane, you can see clearly which messages have arrived since you last had them in sight.
In order to implement this, there must be a way to indicate you're no longer watching this message pane. In SamePlace, I'm striving to achieve that when:
a) the message loses focus, e.g. a chat with another user is selected
b) the message is closed
c) the contact pane is hidden or compact
So far a) has been really easy- I added one line appending a horizontal separator in the window blur event handler of the chat area. This works when a different message pane is selected.
The tough nut to crack is b). In this case, the expected behavior would be the same if the line is added when the chat pane is closed or opened, because the first new message would open the pane. This would mean there are no messages between closing and reopening the message tab. But I can't seem to find a way to append a line *after* all messages, because they are added after the init function completes.
c) is optional.
How could I proceed with b)? Should I try to mess with the xmpp-incoming queue? Doesn't seem viable to me as well, since it's also empty at the time init finishes, if my observations are correct.
Thanks,
Vassil
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SamePlace Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Vassil Dichev for more information if necessary.