aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-03-19 17:49:07 +0100
committerMario Vavti <mario@mariovavti.com>2017-03-19 17:49:07 +0100
commit949ca844c5e580484c46fb3202a29d19049bb453 (patch)
tree5814cf3d5ade649bc2f2ccae85414fa8850c052c /include
parentf31af3c7c0e157e375a08ce562221d91406bcef9 (diff)
downloadvolse-hubzilla-949ca844c5e580484c46fb3202a29d19049bb453.tar.gz
volse-hubzilla-949ca844c5e580484c46fb3202a29d19049bb453.tar.bz2
volse-hubzilla-949ca844c5e580484c46fb3202a29d19049bb453.zip
open like-modal directly if more than 10 likes
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php10
1 files changed, 3 insertions, 7 deletions
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'], '<a class="dropdown-item" href="#" data-toggle="modal" data-target="#' . $v . 'Modal-'
- . (($ob) ? $ob->get_id() : $item['id']) . '"><b>' . t('View all') . '</b></a>');
- } 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;