models: Create starred_message_counts boolean field.

This commit is contained in:
Joshua Pan 2018-08-16 23:09:07 -07:00 committed by Tim Abbott
parent 83d8d662dc
commit 79e2266d6e
4 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-08-17 06:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('zerver', '0185_realm_plan_type'),
]
operations = [
migrations.AddField(
model_name='userprofile',
name='starred_message_counts',
field=models.BooleanField(default=False),
),
]

View File

@ -768,6 +768,7 @@ class UserProfile(AbstractBaseUser, PermissionsMixin):
night_mode = models.BooleanField(default=False) # type: bool
translate_emoticons = models.BooleanField(default=False) # type: bool
dense_mode = models.BooleanField(default=True) # type: bool
starred_message_counts = models.BooleanField(default=False) # type: bool
# A timezone name from the `tzdata` database, as found in pytz.all_timezones.
#
@ -822,6 +823,7 @@ class UserProfile(AbstractBaseUser, PermissionsMixin):
high_contrast_mode=bool,
night_mode=bool,
translate_emoticons=bool,
starred_message_counts=bool,
)
notification_setting_types = dict(

View File

@ -168,6 +168,7 @@ class HomeTest(ZulipTestCase):
"server_generation",
"server_inline_image_preview",
"server_inline_url_embed_preview",
"starred_message_counts",
"starred_messages",
"stream_description_max_length",
"stream_name_max_length",

View File

@ -116,6 +116,7 @@ def update_display_settings_backend(
request: HttpRequest, user_profile: UserProfile,
twenty_four_hour_time: Optional[bool]=REQ(validator=check_bool, default=None),
dense_mode: Optional[bool]=REQ(validator=check_bool, default=None),
starred_message_counts: Optional[bool]=REQ(validator=check_bool, default=None),
high_contrast_mode: Optional[bool]=REQ(validator=check_bool, default=None),
night_mode: Optional[bool]=REQ(validator=check_bool, default=None),
translate_emoticons: Optional[bool]=REQ(validator=check_bool, default=None),