mirror of
https://gitlab.com/brutaldon/brutaldon.git
synced 2024-12-04 14:46:24 -05:00
Make filtering preference work again
This commit is contained in:
parent
6bb4a428d7
commit
743bdc856c
19
brutaldon/migrations/0013_auto_20180826_1935.py
Normal file
19
brutaldon/migrations/0013_auto_20180826_1935.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 2.1 on 2018-08-26 23:35
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('brutaldon', '0012_auto_20180826_1853'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='preference',
|
||||
name='theme',
|
||||
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='brutaldon.Theme'),
|
||||
),
|
||||
]
|
@ -103,9 +103,9 @@ def timeline(request, timeline='home', timeline_name='Home', max_id=None, since_
|
||||
next = None
|
||||
|
||||
# This filtering has to be done *after* getting next/prev links
|
||||
if request.session.get('filter_replies', False):
|
||||
if account.preferences.filter_replies:
|
||||
data = [x for x in data if not x.in_reply_to_id]
|
||||
if request.session.get('filter_boosts', False):
|
||||
if account.preferences.filter_boosts:
|
||||
data = [x for x in data if not x.reblog]
|
||||
return render(request, 'main/%s_timeline.html' % timeline,
|
||||
{'toots': data, 'form': form, 'timeline': timeline,
|
||||
|
Loading…
Reference in New Issue
Block a user