mirror of https://gitlab.com/tildes/tildes.git
Browse Source
Mark notifications read on interact (can disable)
Mark notifications read on interact (can disable)
When a user interacts with a comment (by voting, replying, labeling, or bookmarking), any unread notifications they have from that comment will now be marked as read. This behavior is on by default, but can be disabled in Settings if the user would rather mark all notifications read manually.merge-requests/68/head
Chad Birch
6 years ago
6 changed files with 134 additions and 0 deletions
-
32tildes/alembic/versions/fef2c9c9a186_user_add_interact_mark_notifications_.py
-
3tildes/tildes/models/user/user.py
-
4tildes/tildes/templates/notifications_unread.jinja2
-
23tildes/tildes/templates/settings.jinja2
-
56tildes/tildes/views/api/web/comment.py
-
16tildes/tildes/views/api/web/user.py
@ -0,0 +1,32 @@ |
|||
"""User: add interact_mark_notifications_read |
|||
|
|||
Revision ID: fef2c9c9a186 |
|||
Revises: beaa57144e49 |
|||
Create Date: 2019-04-01 13:21:38.441021 |
|||
|
|||
""" |
|||
from alembic import op |
|||
import sqlalchemy as sa |
|||
|
|||
|
|||
# revision identifiers, used by Alembic. |
|||
revision = "fef2c9c9a186" |
|||
down_revision = "beaa57144e49" |
|||
branch_labels = None |
|||
depends_on = None |
|||
|
|||
|
|||
def upgrade(): |
|||
op.add_column( |
|||
"users", |
|||
sa.Column( |
|||
"interact_mark_notifications_read", |
|||
sa.Boolean(), |
|||
server_default="true", |
|||
nullable=False, |
|||
), |
|||
) |
|||
|
|||
|
|||
def downgrade(): |
|||
op.drop_column("users", "interact_mark_notifications_read") |
Write
Preview
Loading…
Cancel
Save
Reference in new issue