settings: Fix sort order display settings.

This fixes the mis-alphabetized `fluid_layout_width` at few places in
the codebase, along with that it also fixes sorting order of
`property_types` dictionary in models.py and few model fields of
`UserProfile` model class.
This commit is contained in:
Pragati Agrawal 2019-06-13 18:51:20 +05:30 committed by Tim Abbott
parent 216267e279
commit 15ff8fb73f
3 changed files with 12 additions and 12 deletions

View File

@ -379,6 +379,7 @@ exports.dispatch_normal_event = function dispatch_normal_event(event) {
'demote_inactive_streams',
'dense_mode',
'emojiset',
'fluid_layout_width',
'high_contrast_mode',
'night_mode',
'left_side_userlist',
@ -386,7 +387,6 @@ exports.dispatch_normal_event = function dispatch_normal_event(event) {
'twenty_four_hour_time',
'translate_emoticons',
'starred_message_counts',
'fluid_layout_width',
];
if (_.contains(user_display_settings, event.setting_name)) {
page_params[event.setting_name] = event.setting;

View File

@ -108,11 +108,11 @@ function setup_settings_label() {
// display settings
dense_mode: i18n.t("Dense mode"),
fluid_layout_width: i18n.t("Use full width on wide screens"),
high_contrast_mode: i18n.t("High contrast mode"),
left_side_userlist: i18n.t("User list on left sidebar in narrow windows"),
night_mode: i18n.t("Night mode"),
starred_message_counts: i18n.t("Show counts for starred messages"),
fluid_layout_width: i18n.t("Use full width on wide screens"),
twenty_four_hour_time: i18n.t("24-hour time (17:00 instead of 5:00 PM)"),
translate_emoticons: i18n.t("Convert emoticons before sending (<code>:)</code> becomes 😃)"),
};

View File

@ -880,14 +880,14 @@ class UserProfile(AbstractBaseUser, PermissionsMixin):
left_side_userlist = models.BooleanField(default=False) # type: bool
# display settings
twenty_four_hour_time = models.BooleanField(default=False) # type: bool
default_language = models.CharField(default=u'en', max_length=MAX_LANGUAGE_ID_LENGTH) # type: str
dense_mode = models.BooleanField(default=True) # type: bool
fluid_layout_width = models.BooleanField(default=False) # type: bool
high_contrast_mode = models.BooleanField(default=False) # type: bool
night_mode = models.BooleanField(default=False) # type: bool
translate_emoticons = models.BooleanField(default=False) # type: bool
dense_mode = models.BooleanField(default=True) # type: bool
twenty_four_hour_time = models.BooleanField(default=False) # type: bool
starred_message_counts = models.BooleanField(default=False) # type: bool
fluid_layout_width = models.BooleanField(default=False) # type: bool
# UI setting controlling Zulip's behavior of demoting in the sort
# order and graying out streams with no recent traffic. The
@ -955,14 +955,14 @@ class UserProfile(AbstractBaseUser, PermissionsMixin):
demote_inactive_streams=int,
dense_mode=bool,
emojiset=str,
left_side_userlist=bool,
timezone=str,
twenty_four_hour_time=bool,
high_contrast_mode=bool,
night_mode=bool,
translate_emoticons=bool,
starred_message_counts=bool,
fluid_layout_width=bool,
high_contrast_mode=bool,
left_side_userlist=bool,
night_mode=bool,
starred_message_counts=bool,
timezone=str,
translate_emoticons=bool,
twenty_four_hour_time=bool,
)
notification_setting_types = dict(