From 69f6bd0ea9b0f31120b7f8b4f6040a9d765e5086 Mon Sep 17 00:00:00 2001 From: electron128 Date: Thu, 31 Dec 2015 14:02:51 +0100 Subject: [PATCH] insert the newest channel posts first and the oldest last (modified patch from Eugene Tooms) --- retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp index e6ddc8b8a..0041976a3 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp @@ -398,7 +398,7 @@ void GxsChannelPostsWidget::insertChannelPosts(std::vector &po return; } - std::vector::const_iterator it; + std::vector::const_reverse_iterator it; int count = posts.size(); int pos = 0; @@ -407,7 +407,7 @@ void GxsChannelPostsWidget::insertChannelPosts(std::vector &po ui->feedWidget->setSortingEnabled(false); } - for (it = posts.begin(); it != posts.end(); ++it) + for (it = posts.rbegin(); it != posts.rend(); ++it) { if (thread && thread->stopped()) { break;