summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-04-22 18:37:42 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-04-22 18:37:42 (GMT)
commite66d257f786f034a7372780c7933312fe8b66dff (patch)
treec85f1f22a6ea1c29e24bd87e62db51c4f461da12 /Swift/Controllers/ChatMessageSummarizer.h
parent1a8df7d98e58adde9bd0611b5689507780393856 (diff)
downloadswift-e66d257f786f034a7372780c7933312fe8b66dff.zip
swift-e66d257f786f034a7372780c7933312fe8b66dff.tar.bz2
Merge unread tab titles legibly.
Release-Notes: Chat tabs with unread messages from several chats will now be a little more descriptive. Resolves: #485
Diffstat (limited to 'Swift/Controllers/ChatMessageSummarizer.h')
-rw-r--r--Swift/Controllers/ChatMessageSummarizer.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Swift/Controllers/ChatMessageSummarizer.h b/Swift/Controllers/ChatMessageSummarizer.h
new file mode 100644
index 0000000..d4ff188
--- /dev/null
+++ b/Swift/Controllers/ChatMessageSummarizer.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2011 Kevin Smith
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <vector>
+#include <utility>
+#include <string>
+
+namespace Swift {
+typedef std::pair<std::string, int> UnreadPair;
+
+ class ChatMessageSummarizer {
+ public:
+ std::string getSummary(const std::string& current, const std::vector<UnreadPair>& unreads);
+ };
+}