Add option to hide viewer count. Closes #1939

This commit is contained in:
Gabe Kangas
2022-06-26 00:46:55 -07:00
parent 97db93e0d7
commit b08393295f
11 changed files with 209 additions and 125 deletions

View File

@@ -65,6 +65,7 @@ const (
browserPushPrivateKeyKey = "browser_push_private_key"
twitterConfigurationKey = "twitter_configuration"
hasConfiguredInitialNotificationsKey = "has_configured_initial_notifications"
hideViewerCountKey = "hide_viewer_count"
)
// GetExtraPageBodyContent will return the user-supplied body content.
@@ -908,3 +909,14 @@ func GetHasPerformedInitialNotificationsConfig() bool {
configured, _ := _datastore.GetBool(hasConfiguredInitialNotificationsKey)
return configured
}
// GetHideViewerCount will return if the viewer count shold be hidden.
func GetHideViewerCount() bool {
hide, _ := _datastore.GetBool(hideViewerCountKey)
return hide
}
// SetHideViewerCount will set if the viewer count should be hidden.
func SetHideViewerCount(hide bool) error {
return _datastore.SetBool(hideViewerCountKey, hide)
}