summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 0c297b2..fcc1308 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -198,6 +198,7 @@ void QtChatWindow::showEvent(QShowEvent* event) {
void QtChatWindow::setUnreadMessageCount(int count) {
unreadCount_ = count;
updateTitleWithUnreadCount();
+ emit countUpdated();
}
void QtChatWindow::setContactChatState(ChatState::ChatStateType state) {
@@ -221,7 +222,7 @@ void QtChatWindow::setName(const String& name) {
}
void QtChatWindow::updateTitleWithUnreadCount() {
- setWindowTitle(unreadCount_ > 0 ? QString("(%1) %2").arg(unreadCount_).arg(contact_) : contact_);
+ setWindowTitle(contact_);
emit titleUpdated();
}
@@ -255,6 +256,10 @@ void QtChatWindow::addMessage(const String &message, const String &senderName, b
previousMessageWasSystem_ = false;
}
+int QtChatWindow::getCount() {
+ return unreadCount_;
+}
+
void QtChatWindow::addAction(const String &message, const String &senderName, bool senderIsSelf, const boost::optional<SecurityLabel>& label, const String& avatarPath, const boost::posix_time::ptime& time) {
addMessage(" *" + message + "*", senderName, senderIsSelf, label, avatarPath, "font-style:italic ", time);
}