mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
fixed small bug in box initialization
This commit is contained in:
parent
a67a35624d
commit
14d29a4490
@ -142,7 +142,7 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
mMessageProxyModel->setSortRole(RsMessageModel::SortRole);
|
||||
ui.messageTreeWidget->setModel(mMessageProxyModel);
|
||||
|
||||
changeBox(RsMessageModel::BOX_INBOX);
|
||||
changeBox(0); // set to inbox
|
||||
|
||||
mMessageProxyModel->setFilterRole(RsMessageModel::FilterRole);
|
||||
//mMessageProxyModel->setFilterRegExp(QRegExp(QString(RsMessageModel::FilterString))) ;
|
||||
@ -782,14 +782,9 @@ void MessagesDialog::changeBox(int box_row)
|
||||
|
||||
inChange = true;
|
||||
|
||||
// ui.messageTreeWidget->clear();
|
||||
|
||||
ui.quickViewWidget->setCurrentItem(NULL);
|
||||
listMode = LIST_BOX;
|
||||
|
||||
// insertMessages();
|
||||
// insertMsgTxtAndFiles(ui.messageTreeWidget->currentItem());
|
||||
|
||||
switch(box_row)
|
||||
{
|
||||
case 0: mMessageModel->setCurrentBox(RsMessageModel::BOX_INBOX ); break;
|
||||
|
@ -146,11 +146,6 @@ public:
|
||||
|
||||
QIcon icon ;
|
||||
|
||||
if(id.isNull())
|
||||
{
|
||||
str = tr("[Retroshare]");
|
||||
icon = QIcon();
|
||||
}
|
||||
if(rsPeers->isFriend(RsPeerId(id))) // horrible trick because some widgets still use locations as IDs (e.g. messages)
|
||||
{
|
||||
str = QString::fromUtf8(rsPeers->getPeerName(RsPeerId(id)).c_str()) ;
|
||||
@ -186,7 +181,6 @@ public:
|
||||
|
||||
mLoading = true;
|
||||
++mReloadPeriod;
|
||||
std::cerr << "Re-loading" << std::endl;
|
||||
|
||||
QTimer::singleShot(1000,this,SLOT(reload()));
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ const QString RsMessageModel::FilterString("filtered");
|
||||
RsMessageModel::RsMessageModel(QObject *parent)
|
||||
: QAbstractItemModel(parent)
|
||||
{
|
||||
mFilteringEnabled=false;
|
||||
mCurrentBox = BOX_NONE;
|
||||
mQuickViewFilter = QUICK_VIEW_ALL;
|
||||
mFilterType = FILTER_TYPE_NONE;
|
||||
mFilterStrings.clear();
|
||||
}
|
||||
|
||||
void RsMessageModel::preMods()
|
||||
@ -63,15 +63,6 @@ void RsMessageModel::postMods()
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mMessages.size()-1,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
||||
}
|
||||
|
||||
// void RsGxsForumModel::setSortMode(SortMode mode)
|
||||
// {
|
||||
// preMods();
|
||||
//
|
||||
// mSortMode = mode;
|
||||
//
|
||||
// postMods();
|
||||
// }
|
||||
|
||||
int RsMessageModel::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
if(!parent.isValid())
|
||||
|
@ -181,7 +181,6 @@ private:
|
||||
QuickViewFilter mQuickViewFilter ;
|
||||
QStringList mFilterStrings;
|
||||
FilterType mFilterType;
|
||||
bool mFilteringEnabled;
|
||||
|
||||
std::vector<Rs::Msgs::MsgInfoSummary> mMessages;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user