diff --git a/zerver/migrations/0186_userprofile_starred_message_counts.py b/zerver/migrations/0186_userprofile_starred_message_counts.py new file mode 100644 index 0000000000..19d875bd9d --- /dev/null +++ b/zerver/migrations/0186_userprofile_starred_message_counts.py @@ -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), + ), + ] diff --git a/zerver/models.py b/zerver/models.py index 6e5b3534a5..1afaa89004 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -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( diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py index c5b79f6f5a..908ec4442c 100644 --- a/zerver/tests/test_home.py +++ b/zerver/tests/test_home.py @@ -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", diff --git a/zerver/views/user_settings.py b/zerver/views/user_settings.py index 4111ba8675..e4e2d5a188 100644 --- a/zerver/views/user_settings.py +++ b/zerver/views/user_settings.py @@ -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),