From d98d56c3b5481e12dc53136c06b6c9c069d40d98 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 19 Jan 2022 11:24:42 +0000 Subject: provide a spinner for edit connection action in threads --- Zotlabs/Lib/ThreadItem.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index d974325a9..8d20935a1 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -2,6 +2,7 @@ namespace Zotlabs\Lib; +use App; use Zotlabs\Lib\Apps; use Zotlabs\Access\AccessList; @@ -412,6 +413,12 @@ class ThreadItem { $pinned_items = ($allowed_type ? get_pconfig($item['uid'], 'pinned', $item['item_type'], []) : []); $pinned = ((!empty($pinned_items) && in_array($midb64, $pinned_items)) ? true : false); + $contact = []; + + if(App::$contacts && array_key_exists($item['author_xchan'], App::$contacts)) { + $contact = App::$contacts[$item['author_xchan']]; + } + $tmp_item = array( 'template' => $this->get_template(), 'mode' => $mode, @@ -532,7 +539,9 @@ class ThreadItem { 'wait' => t('Please wait'), 'thread_level' => $thread_level, 'settings' => $settings, - 'thr_parent' => (($item['parent_mid'] != $item['thr_parent']) ? gen_link_id($item['thr_parent']) : '') + 'thr_parent' => (($item['parent_mid'] != $item['thr_parent']) ? gen_link_id($item['thr_parent']) : ''), + 'contact_id' => (($contact) ? $contact['abook_id'] : '') + ); $arr = array('item' => $item, 'output' => $tmp_item); -- cgit v1.2.3