Add method to get and set the stay_updated setting

This commit is contained in:
Narek Zakarian 2025-08-04 18:47:11 +04:00
parent f32c013677
commit d7a45138ff
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -406,4 +406,22 @@ class SettingsModel extends AbstractDataModel {
$cards
);
}
/**
* Gets the Stay Updated setting.
*
* @return bool True if Stay Updated is enabled, false otherwise.
*/
public function get_stay_updated() : bool {
return $this->data['stay_updated'];
}
/**
* Sets the Stay Updated setting.
*
* @param bool $save Whether to save the Stay Updated.
*/
public function set_stay_updated( bool $save ) : void {
$this->data['stay_updated'] = $this->sanitizer->sanitize_bool( $save );
}
}