From 949ca844c5e580484c46fb3202a29d19049bb453 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 19 Mar 2017 17:49:07 +0100 Subject: open like-modal directly if more than 10 likes --- include/conversation.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index f2b394556..e6ba1fa6e 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1927,15 +1927,11 @@ function get_responses($conv_responses,$response_verbs,$ob,$item) { $ret[$v] = array(); $ret[$v]['count'] = ((x($conv_responses[$v],$item['mid'])) ? $conv_responses[$v][$item['mid']] : ''); $ret[$v]['list'] = ((x($conv_responses[$v],$item['mid'])) ? $conv_responses[$v][$item['mid'] . '-l'] : ''); - if(count($ret[$v]['list']) > MAX_LIKERS) { - $ret[$v]['list_part'] = array_slice($ret[$v]['list'], 0, MAX_LIKERS); - array_push($ret[$v]['list_part'], '' . t('View all') . ''); - } else { - $ret[$v]['list_part'] = ''; - } $ret[$v]['button'] = get_response_button_text($v,$ret[$v]['count']); $ret[$v]['title'] = $conv_responses[$v]['title']; + if($ret[$v]['count'] > MAX_LIKERS) { + $ret[$v]['modal'] = true; + } } $count = 0; -- cgit v1.2.3