From a96419df01b462c1ab047bdde6f2b2797a444870 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Sat, 9 Jul 2011 15:08:57 +0100
Subject: Prune the recent chats


diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp
index 5173a6f..dbba9a5 100644
--- a/Swift/Controllers/Chat/ChatsManager.cpp
+++ b/Swift/Controllers/Chat/ChatsManager.cpp
@@ -103,11 +103,15 @@ ChatsManager::~ChatsManager() {
 
 void ChatsManager::saveRecents() {
 	std::string recents;
+	int i = 1;
 	foreach (ChatListWindow::Chat chat, recentChats_) {
 		std::vector<std::string> activity;
 		boost::split(activity, chat.activity, boost::is_any_of("\t\n"));
 		std::string recent = chat.jid.toString() + "\t" + activity[0] + "\t" + (chat.isMUC ? "true" : "false") +  "\t" + chat.nick;
 		recents += recent + "\n";
+		if (i++ > 25) {
+			break;
+		}
 	}
 	profileSettings_->storeString(RECENT_CHATS, recents);
 }
-- 
cgit v0.10.2-6-g49f6