groups tree tooltips and info panels - add last post date info

This commit is contained in:
unknown 2017-01-10 01:18:35 +03:00
parent 8365ac2647
commit a954b19d8e
4 changed files with 42 additions and 8 deletions

View file

@ -36,6 +36,7 @@
#include "gui/common/ElidedLabel.h"
#include "gui/settings/rsharesettings.h"
#include "util/QtVersion.h"
#include "util/DateTime.h"
#include <stdint.h>
@ -477,10 +478,11 @@ void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<
tooltip += "\n" + tr("You have been granted as publisher (you can post here!)");
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
{
tooltip += "\n" + QString::number(itemInfo.max_visible_posts) + " messages available" ;
// if(itemInfo.max_visible_posts) // wtf? this=0 when there are some posts definitely exist - lastpost is recent
tooltip += "\n" + tr("Last Post") + ": " + DateTime::formatLongDateTime(itemInfo.lastpost) ;
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
tooltip += "\n" + tr("Subscribe to download and read messages") ;
}
item->setToolTip(COLUMN_NAME, tooltip);
item->setToolTip(COLUMN_UNREAD, tooltip);