diff --git a/interface/src/ui/PreferencesDialog.cpp b/interface/src/ui/PreferencesDialog.cpp index 69e67453e8..adeb0d1dcd 100644 --- a/interface/src/ui/PreferencesDialog.cpp +++ b/interface/src/ui/PreferencesDialog.cpp @@ -1,6 +1,7 @@ // // Re-created Bradley Austin Davis on 2016/01/22 // Copyright 2016 High Fidelity, Inc. +// Copyright 2022 Overte e.V. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -246,6 +247,16 @@ void setupPreferences() { preference->setStep(1); preferences->addPreference(preference); } + + { + auto getter = []()->bool { + if (!DependencyManager::get()->_snapshotNotifications.isSet()){ + DependencyManager::get()->_snapshotNotifications.set(true); + } + return DependencyManager::get()->_snapshotNotifications.get(); }; + auto setter = [](bool value) { DependencyManager::get()->_snapshotNotifications.set(value); }; + preferences->addPreference(new CheckPreference(SNAPSHOTS, "Display snapshot notifications", getter, setter)); + } { auto getter = []()->bool { return !Menu::getInstance()->isOptionChecked(MenuOption::DisableActivityLogger); }; diff --git a/interface/src/ui/Snapshot.h b/interface/src/ui/Snapshot.h index 9cff0a6f8b..f6c57b0e42 100644 --- a/interface/src/ui/Snapshot.h +++ b/interface/src/ui/Snapshot.h @@ -4,6 +4,7 @@ // // Created by Stojce Slavkovski on 1/26/14. // Copyright 2014 High Fidelity, Inc. +// Copyright 2022 Overte e.V. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -63,6 +64,7 @@ public: SnapshotMetaData* parseSnapshotData(QString snapshotPath); Setting::Handle _snapshotsLocation{ "snapshotsLocation" }; + Setting::Handle _snapshotNotifications{ "snapshotNotifications", true }; void uploadSnapshot(const QString& filename, const QUrl& href = QUrl("")); signals: