mirror of
https://github.com/friendica/friendica
synced 2025-04-26 00:30:12 +00:00
Issue 5158: Ignore all threads, even public ones (#5588)
* Issue 5158: Ignore all threads, even public ones * Remove some notice * Now it really should work * Using "defaults"
This commit is contained in:
parent
50e1512014
commit
276abfaba6
7 changed files with 61 additions and 44 deletions
|
@ -252,6 +252,18 @@ class Post extends BaseObject
|
|||
$tagger = '';
|
||||
|
||||
if ($this->isToplevel()) {
|
||||
$thread = Item::selectFirstThreadForUser(local_user(), ['ignored'], ['iid' => $item['id']]);
|
||||
if (DBA::isResult($thread)) {
|
||||
$ignore = [
|
||||
'do' => L10n::t("ignore thread"),
|
||||
'undo' => L10n::t("unignore thread"),
|
||||
'toggle' => L10n::t("toggle ignore status"),
|
||||
'classdo' => $thread['ignored'] ? "hidden" : "",
|
||||
'classundo' => $thread['ignored'] ? "" : "hidden",
|
||||
'ignored' => L10n::t('ignored'),
|
||||
];
|
||||
}
|
||||
|
||||
if ($conv->getProfileOwner() == local_user() && ($item['uid'] != 0)) {
|
||||
$isstarred = (($item['starred']) ? "starred" : "unstarred");
|
||||
|
||||
|
@ -264,18 +276,6 @@ class Post extends BaseObject
|
|||
'starred' => L10n::t('starred'),
|
||||
];
|
||||
|
||||
$thread = DBA::selectFirst('thread', ['ignored'], ['uid' => $item['uid'], 'iid' => $item['id']]);
|
||||
if (DBA::isResult($thread)) {
|
||||
$ignore = [
|
||||
'do' => L10n::t("ignore thread"),
|
||||
'undo' => L10n::t("unignore thread"),
|
||||
'toggle' => L10n::t("toggle ignore status"),
|
||||
'classdo' => $thread['ignored'] ? "hidden" : "",
|
||||
'classundo' => $thread['ignored'] ? "" : "hidden",
|
||||
'ignored' => L10n::t('ignored'),
|
||||
];
|
||||
}
|
||||
|
||||
if (Feature::isEnabled($conv->getProfileOwner(), 'commtag')) {
|
||||
$tagger = [
|
||||
'add' => L10n::t("add tag"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue