<xf:if is="$unreadConversations is not empty OR $readConversations is not empty">
	<div class="menu-scroller">
		<ol class="listPlain">
			<xf:foreach loop="$unreadConversations" value="$userConv">
				<xf:macro id="popup_item" arg-userConv="{$userConv}" />
			</xf:foreach>
			<xf:foreach loop="$readConversations" value="$userConv">
				<xf:macro id="popup_item" arg-userConv="{$userConv}" />
			</xf:foreach>
		</ol>
	</div>
<xf:else />
	<div class="menu-row">{{ phrase('you_have_no_recent_direct_messages') }}</div>
</xf:if>

<xf:macro id="popup_item" arg-userConv="!">
	<li class="menu-row menu-row--separated menu-row--clickable {{ $userConv.isUnread() ? 'menu-row--highlighted' : '' }}">
		<div class="fauxBlockLink">
			<div class="contentRow">
				<div class="contentRow-figure">
					<xf:avatar user="$userConv.Master.LastMessageUser" size="xxs" defaultname="{$userConv.Master.last_message_username}" />
				</div>
				<div class="contentRow-main contentRow-main--close">
					<a href="{{ link('direct-messages/unread', $userConv) }}" class="fauxBlockLink-blockLink">{$userConv.Master.title}</a>
					<div class="contentRow-minor contentRow-minor--smaller contentRow-minor--hideLinks">
						{{ phrase('with_people:') }}
						<ul class="listInline listInline--selfInline listInline--comma">
							<li><xf:username user="$userConv.Master.Starter" defaultname="{$userConv.Master.username}" title="{{ phrase('direct_message_starter') }}" href="" /></li><xf:trim>
							</xf:trim><xf:foreach loop="$userConv.Master.recipients" value="$recipient" if="{$recipient.user_id} != {$userConv.Master.user_id}"><xf:trim>
								<li><xf:username user="{$recipient}" defaultname="{{ phrase('unknown_member') }}" href="" /></li>
							</xf:trim></xf:foreach>
						</ul>
					</div>
					<div class="contentRow-minor contentRow-minor--smaller">
						<xf:date time="$userConv.Master.last_message_date" />
					</div>
				</div>
			</div>
		</div>
	</li>
</xf:macro>