XF 2.0 Disable avatars (custom user fields)

I used in XF 1.5 this code to disable avatars by custom user field, thread_list_item:

Code:
<li id="thread-{$thread.thread_id}" class="discussionListItem {$thread.discussion_state}{xen:if '!{$thread.discussion_open}', ' locked'}{xen:if {$thread.sticky}, ' sticky'}{xen:if {$thread.isNew}, ' unread'}{xen:if {$thread.prefix_id}, ' prefix{$thread.prefix_id}'}{xen:if {$thread.isIgnored}, ' ignored'} {xen:if $thread.thread_is_watched, threadWatched} {xen:if $thread.forum_is_watched, forumWatched}" data-author="{$thread.username}">
    <xen:if is="!{$visitor.customFields.hide_avatars_thread_list}">
    <div class="listBlock posterAvatar">
        <span class="avatarContainer">
            <xen:avatar user="$thread" size="s" img="true" />
            <xen:if is="{$thread.user_post_count}"><xen:avatar user="$visitor" size="s" img="true" class="miniMe" title="{xen:phrase you_have_posted_x_messages_in_this_thread, 'count={xen:number $thread.user_post_count}'}" /></xen:if>
        </span>
    </div>
    </xen:if>

I am trying the same in XF 2.0. I think the right syntax is "<xen:if is="!{$xf.visitor.Profile.custom_fields.hide_avatars_thread_list}">", but where and how should I add this (thread_list_macros ?)?
 
Top