Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'fix-excluded' into 'master'
[nemo-qml-plugin-calendar] Remove deprecated exclude setting and update notebook visibility. Fixes JB#50237

See merge request mer-core/nemo-qml-plugin-calendar!60
  • Loading branch information
pvuorela committed Jun 17, 2020
2 parents 48a5fdc + 2ef9f53 commit 884f815
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/calendarworker.cpp
Expand Up @@ -907,9 +907,15 @@ void CalendarWorker::loadNotebooks()
&& !mkNotebook->isShared()
&& mkNotebook->pluginName().isEmpty();

notebook.excluded = !mkNotebook->isVisible()
// To keep backward compatibility:
|| settings.value("exclude/" + notebook.uid, false).toBool();
notebook.excluded = !mkNotebook->isVisible();
// To keep backward compatibility:
if (settings.value("exclude/" + notebook.uid, false).toBool()) {
mkNotebook->setIsVisible(false);
if (notebook.excluded || mStorage->updateNotebook(mkNotebook)) {
settings.remove("exclude/" + notebook.uid);
}
notebook.excluded = true;
}

notebook.color = settings.value("colors/" + notebook.uid, QString()).toString();
if (notebook.color.isEmpty())
Expand Down

0 comments on commit 884f815

Please sign in to comment.