remember expand state of "Labels" node
This commit is contained in:
parent
97f6c2c1ba
commit
81530935b7
3 changed files with 8 additions and 4 deletions
|
@ -17,7 +17,7 @@ SqliteDriver::SqliteDriver(bool in_memory, QObject* parent)
|
|||
m_inMemoryDatabaseInitialized(false) {}
|
||||
|
||||
QString SqliteDriver::location() const {
|
||||
return m_databaseFilePath;
|
||||
return QDir::toNativeSeparators(m_databaseFilePath);
|
||||
}
|
||||
|
||||
DatabaseDriver::DriverType SqliteDriver::driverType() const {
|
||||
|
|
|
@ -96,7 +96,9 @@ void FeedsView::saveAllExpandStates() {
|
|||
|
||||
void FeedsView::saveExpandStates(RootItem* item) {
|
||||
Settings* settings = qApp->settings();
|
||||
QList<RootItem*> items = item->getSubTree(RootItem::Kind::Category | RootItem::Kind::ServiceRoot);
|
||||
QList<RootItem*> items = item->getSubTree(RootItem::Kind::Category |
|
||||
RootItem::Kind::ServiceRoot |
|
||||
RootItem::Kind::Labels);
|
||||
|
||||
// Iterate all categories and save their expand statuses.
|
||||
for (const RootItem* it : items) {
|
||||
|
@ -114,7 +116,9 @@ void FeedsView::loadAllExpandStates() {
|
|||
const Settings* settings = qApp->settings();
|
||||
QList<RootItem*> expandable_items;
|
||||
|
||||
expandable_items.append(sourceModel()->rootItem()->getSubTree(RootItem::Kind::Category | RootItem::Kind::ServiceRoot));
|
||||
expandable_items.append(sourceModel()->rootItem()->getSubTree(RootItem::Kind::Category |
|
||||
RootItem::Kind::ServiceRoot |
|
||||
RootItem::Kind::Labels));
|
||||
|
||||
// Iterate all categories and save their expand statuses.
|
||||
for (const RootItem* item : expandable_items) {
|
||||
|
|
|
@ -176,7 +176,7 @@ void GmailServiceRoot::start(bool freshly_activated) {
|
|||
auto chi = childItems();
|
||||
|
||||
for (RootItem* feed : qAsConst(chi)) {
|
||||
if (feed->customId() == QL1S("INBOX")) {
|
||||
if (feed->customId() == QL1S(GMAIL_SYSTEM_LABEL_INBOX)) {
|
||||
feed->setKeepOnTop(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue