diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/conversation.php | 6 | ||||
-rw-r--r-- | include/items.php | 12 | ||||
-rw-r--r-- | include/js_strings.php | 1 |
3 files changed, 10 insertions, 9 deletions
diff --git a/include/conversation.php b/include/conversation.php index bd1b7f863..07e4df088 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1426,7 +1426,7 @@ function get_responses($response_verbs, $item) { } $ret[$v]['count'] = $item[$v . '_count'] ?? 0; - $ret[$v]['button'] = get_response_button_text($v, $ret[$v]['count']); + $ret[$v]['button'] = get_response_button_text($v, $ret[$v]['count'], $item['item_thread_top']); } //logger('ret: ' . print_r($ret,true)); @@ -1434,7 +1434,7 @@ function get_responses($response_verbs, $item) { return $ret; } -function get_response_button_text($v, $count = 0) { +function get_response_button_text($v, $count = 0, $top_level = 0) { switch($v) { case 'like': return ['label' => tt('Like','Likes',$count,'noun'), 'icon' => 'hand-thumbs-up', 'class' => 'like', 'action' => 'dolike']; @@ -1446,7 +1446,7 @@ function get_response_button_text($v, $count = 0) { return ['label' => tt('Dislike','Dislikes',$count,'noun'), 'icon' => 'hand-thumbs-down', 'class' => 'dislike', 'action' => 'dolike']; break; case 'comment': - return ['label' => tt('Reply','Replies',$count,'noun'), 'icon' => 'chat', 'class' => 'comment', 'action' => '']; + return ['label' => (($top_level) ? tt('Comment', 'Comments' ,$count, 'noun') : tt('Reply', 'Replies', $count, 'noun')), 'icon' => 'chat', 'class' => 'comment', 'action' => '']; break; case 'accept': return ['label' => tt('Attending','Attending',$count,'noun'), 'icon' => 'calendar-check', 'class' => 'accept', 'action' => 'dolike']; diff --git a/include/items.php b/include/items.php index 021d743a5..9e448e39a 100644 --- a/include/items.php +++ b/include/items.php @@ -5390,7 +5390,7 @@ function item_by_item_id(int $id, int $parent): array WHERE item.id = %d AND item.uid = %d - AND item.verb NOT IN ('Like', 'Dislike', 'Announce', 'Accept', 'Reject', 'TentativeAccept', 'Add', 'Remove', 'Follow', 'Ignore') + AND item.verb IN ('Create', 'Update', 'EmojiReact') $item_normal_sql", intval($id), intval(local_channel()) @@ -5474,7 +5474,7 @@ function items_by_parent_ids(array $parents, null|array $thr_parents = null, str ROW_NUMBER() OVER (PARTITION BY item.parent ORDER BY item.created DESC) AS rn FROM item WHERE item.parent IN ($ids) - AND item.verb NOT IN ('Like', 'Dislike', 'Announce', 'Accept', 'Reject', 'TentativeAccept', 'Add', 'Remove', 'Follow', 'Ignore') + AND item.verb IN ('Create', 'Update', 'EmojiReact') AND item.item_thread_top = 0 $thr_parent_sql $permission_sql @@ -5523,7 +5523,7 @@ function item_reaction_sql(string $ids, string $permission_sql = '', string $joi $thread_allow = ((local_channel()) ? PConfig::Get(local_channel(), 'system', 'thread_allow', true) : Config::Get('system', 'thread_allow', true)); if ($thread_allow) { - $verbs['comment'] = ['Create', 'Update']; + $verbs['comment'] = ['Create', 'Update', 'EmojiReact']; } $cte = ''; @@ -5604,7 +5604,7 @@ function items_by_thr_parent(string $mid, int $parent, int|null $offset = null): $order_sql = "ORDER BY item.created"; if (isset($offset)) { - $order_sql = "ORDER BY item.created DESC LIMIT 3 OFFSET $offset"; + $order_sql = "ORDER BY item.created DESC, item.received DESC LIMIT 3 OFFSET $offset"; } $owner_uid = intval($parent_item[0]['uid']); @@ -5626,7 +5626,7 @@ function items_by_thr_parent(string $mid, int $parent, int|null $offset = null): WHERE item.thr_parent = '%s' AND item.uid = %d - AND item.verb NOT IN ('Like', 'Dislike', 'Announce', 'Accept', 'Reject', 'TentativeAccept', 'Add', 'Remove', 'Follow', 'Ignore') + AND item.verb IN ('Create', 'Update', 'EmojiReact') AND item.item_thread_top = 0 $item_normal_sql $order_sql", @@ -5653,7 +5653,7 @@ function items_by_thr_parent(string $mid, int $parent, int|null $offset = null): WHERE item.thr_parent = '%s' AND item.uid = %d - AND item.verb NOT IN ('Like', 'Dislike', 'Announce', 'Accept', 'Reject', 'TentativeAccept', 'Add', 'Remove', 'Follow', 'Ignore') + AND item.verb IN ('Create', 'Update', 'EmojiReact') AND item.item_thread_top = 0 $permission_sql $item_normal_sql diff --git a/include/js_strings.php b/include/js_strings.php index 1772cb66b..6f2ffd351 100644 --- a/include/js_strings.php +++ b/include/js_strings.php @@ -36,6 +36,7 @@ function js_strings() { '$pinned' => t('Pinned'), '$pin_item' => t('Pin to the top'), '$unpin_item' => t('Unpin from the top'), + '$dblclick_to_exit_zoom' => t('Double click to exit zoom'), // translatable prefix and suffix strings for jquery.timeago - // using the defaults set below if left untranslated, empty strings if |