diff options
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 40f4dd95..882984f3 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -489,6 +489,11 @@ bool Settings::getFirstStart() const return getOptional<bool>(m_Settings, "first_start").value_or(true); } +void Settings::setFirstStart(bool b) +{ + m_Settings.setValue("first_start", b); +} + std::optional<QColor> Settings::getPreviousSeparatorColor() const { const auto c = getOptional<QColor>(m_Settings, "previousSeparatorColor"); @@ -689,6 +694,19 @@ bool Settings::endorsementIntegration() const return m_Settings.value("Settings/endorsement_integration", true).toBool(); } +EndorsementState Settings::endorsementState() const +{ + const auto v = getOptional<QString>(m_Settings, "endorse_state"); + + if (!v) { + return EndorsementState::NoDecision; + } else if (*v == "Abstained") { + return EndorsementState::Refused; + } else { + return EndorsementState::Accepted; + } +} + bool Settings::hideAPICounter() const { return m_Settings.value("Settings/hide_api_counter", false).toBool(); |
