Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "moderation mode" setting persist #2035

Merged
merged 3 commits into from
Oct 10, 2020

Conversation

dnsge
Copy link
Contributor

@dnsge dnsge commented Oct 5, 2020

Pull request checklist:

CHANGELOG.md was updated, if applicable
(fixes bug in unversioned change)

Description

Fixes a small bug introduced in #1964. "Moderation mode" would be written to the settings file but wouldn't be loaded.

Closes #2032

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@fourtf
Copy link
Member

fourtf commented Oct 9, 2020

Where in the code does it get loaded?

@dnsge
Copy link
Contributor Author

dnsge commented Oct 10, 2020

The moderationMode value is read from the split descriptor in these two places:

split->setModerationMode(splitNode.moderationMode_);

split->setModerationMode(splitNode.moderationMode_);

The issue was that splitNode.moderationMode_ wasn't being read from the JSON file and instead defaulted to false.

// Whether "Moderation Mode" (the sword icon) is enabled in this split or not
bool moderationMode_{false};

@pajlada pajlada merged commit b376055 into Chatterino:master Oct 10, 2020
@dnsge dnsge deleted the bugfix/moderation-mode-persist branch October 11, 2020 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moderation Mode not saying enabled after relaunch
3 participants