Fix uddate issues and improve speed when displaying contact posts

This commit is contained in:
Michael 2023-12-14 04:58:43 +00:00
parent 747a15f0e0
commit f81192b4c3
8 changed files with 135 additions and 75 deletions

View file

@ -31,7 +31,7 @@ use Friendica\Model\Contact;
function update_contact_content(App $a)
{
if (!empty(DI::args()->get(1)) && !empty($_GET['force'])) {
$contact = Contact::getById(DI::args()->get(1), ['id', 'deleted']);
$contact = DBA::selectFirst('account-user-view', ['pid', 'deleted'], ['id' => DI::args()->get(1)]);
if (DBA::isResult($contact) && empty($contact['deleted'])) {
DI::page()['aside'] = '';
@ -39,7 +39,7 @@ function update_contact_content(App $a)
$item = Post::selectFirst(['parent'], ['id' => $_GET['item']]);
}
$text = Contact::getPostsFromId($contact['id'], true, true, $item['parent'] ?? 0);
$text = Contact::getThreadsFromId($contact['pid'], DI::userSession()->getLocalUserId(), true, $item['parent'] ?? 0, $_GET['last_received'] ?? '');
}
}