mirror of
https://github.com/zulip/zulip.git
synced 2026-06-30 21:11:04 +08:00
This commit refactors the code for realm message retention setting to make it more similar to code for other time-limit realm settings. There are still separate functions for the message retention setting but they are similar to that of other time-limit settings and can probably help us to deduplicate the code in future. This refactor also helps us in reusing some code for stream message retention setting for changes in #23013. This commit also fixes a bug where save-discard widget not being hidden when resetting the setting to original value. This can only be reproduced when the original setting value is "retain_forever". Following changes have been done in this commit - - Added data-setting-widget-type attribute which is set to "message-retention-setting" similar to "time-limit" value for message edit and delete limit settings. - Added get_message_retention_setting_value function similar to get_time_limit_setting_value function which is used by get_input_element_value. - Removed "message-retention" block from get_complete_data_for_subsection and the message retention setting is now added to request data in populate_data_for_request itself using data-setting-widget-type attribute. - Updated id and class of elements to support the above changes. |
||
|---|---|---|
| .. | ||
| assets | ||
| audio/notification_sounds | ||
| generated | ||
| html | ||
| images | ||
| js | ||
| shared | ||
| styles | ||
| templates | ||
| third | ||
| .gitignore | ||