]> git.mxchange.org Git - friendica.git/commitdiff
Only offer "ignore thread" when there is a need for this
authorMichael <heluecht@pirati.ca>
Sun, 28 Feb 2021 11:20:02 +0000 (11:20 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 28 Feb 2021 11:20:02 +0000 (11:20 +0000)
src/Object/Post.php

index 5996f20d0d582fc7fd4618672f78cf7cb672c16d..389fac8770958f68c4068edc1dd15ecae603aec7 100644 (file)
@@ -300,14 +300,16 @@ class Post
                if ($this->isToplevel()) {
                        if(local_user()) {
                                $ignored = PostModel\ThreadUser::getIgnored($item['uri-id'], local_user());
-                               $ignore = [
-                                       'do'        => DI::l10n()->t("ignore thread"),
-                                       'undo'      => DI::l10n()->t("unignore thread"),
-                                       'toggle'    => DI::l10n()->t("toggle ignore status"),
-                                       'classdo'   => $ignored ? "hidden" : "",
-                                       'classundo' => $ignored ? "" : "hidden",
-                                       'ignored'   => DI::l10n()->t('ignored'),
-                               ];
+                               if ($item['mention'] || $ignored) {
+                                       $ignore = [
+                                               'do'        => DI::l10n()->t("ignore thread"),
+                                               'undo'      => DI::l10n()->t("unignore thread"),
+                                               'toggle'    => DI::l10n()->t("toggle ignore status"),
+                                               'classdo'   => $ignored ? "hidden" : "",
+                                               'classundo' => $ignored ? "" : "hidden",
+                                               'ignored'   => DI::l10n()->t('ignored'),
+                                       ];
+                               }
 
                                if ($conv->getProfileOwner() == local_user() && ($item['uid'] != 0)) {
                                        if ($origin) {