summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Chars/List.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-06-24 16:25:09 +0200
committerYorhel <git@yorhel.nl>2021-06-24 16:25:09 +0200
commit98f9b76a9ec342e7cc4512e8de1b3d669eee7ec1 (patch)
tree17f9da160db57f48ff47e452b558630adefa6ad8 /lib/VNWeb/Chars/List.pm
parent32b11b261fe79491dfb73139487c259e0d041e2b (diff)
VN::List: Bad attempt at a grid mode
Diffstat (limited to 'lib/VNWeb/Chars/List.pm')
-rw-r--r--lib/VNWeb/Chars/List.pm6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/VNWeb/Chars/List.pm b/lib/VNWeb/Chars/List.pm
index 2f935c7c..462eeedf 100644
--- a/lib/VNWeb/Chars/List.pm
+++ b/lib/VNWeb/Chars/List.pm
@@ -57,12 +57,8 @@ sub listing_ {
div_ class => 'mainbox charbgrid', sub {
- # XXX: This logic is repeated in Images::Lib (and possibly elsewhere), might want to abstract it.
- my $sexp = auth->pref('max_sexual')||0;
- my $viop = auth->pref('max_violence')||0;
a_ href => "/$_->{id}", title => $_->{original}||$_->{name},
- !$_->{image} || $sexp < 0 || $_->{image}{sexual} > $sexp || $_->{image}{violence} > $viop || (!$_->{image}{votecount} && ($sexp < 2 || $viop < 2))
- ? () : (style => 'background-image: url("'.imgurl($_->{image}{id}).'")'),
+ !$_->{image} || image_hidden($_->{image}) ? () : (style => 'background-image: url("'.imgurl($_->{image}{id}).'")'),
sub {
span_ $_->{name};
} for @$list;