]> git.mxchange.org Git - friendica.git/commitdiff
Apply suggestions from code review
authorMichael Vogel <icarus@dabo.de>
Sun, 8 Jan 2023 22:13:31 +0000 (23:13 +0100)
committerGitHub <noreply@github.com>
Sun, 8 Jan 2023 22:13:31 +0000 (23:13 +0100)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
src/Model/Item.php
src/Module/Contact.php
src/Module/Contact/Profile.php

index 8b1002fb2664a1b4aa3bcaca6e87bbeacf3cc3f5..afa51461e8c5412e28042b54536e253bceb2a338 100644 (file)
@@ -3051,6 +3051,7 @@ class Item
                        if (Contact\User::isCollapsed($item['author-id'], $item['uid'])) {
                                $filter_reasons[] = DI::l10n()->t('Content from %s is collapsed', $item['author-name']);
                        }
+
                        if (!empty($item['content-warning']) && (!DI::userSession()->getLocalUserId() || !DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'disable_cw', false))) {
                                $filter_reasons[] = DI::l10n()->t('Content warning: %s', $item['content-warning']);
                        }
index 7441e52bcdd2a5d7617aff8ea6e931922854c968..21b1793af5b6fd1650ce3be90003e01d957edbb3 100644 (file)
@@ -416,7 +416,7 @@ class Contact extends BaseModule
                        case 'blocked':   $header .= ' - ' . DI::l10n()->t('Blocked'); break;
                        case 'hidden':    $header .= ' - ' . DI::l10n()->t('Hidden'); break;
                        case 'ignored':   $header .= ' - ' . DI::l10n()->t('Ignored'); break;
-                       case 'collapsed': $header .= ' - ' . DI::l10n()->t('collapsed'); break;
+                       case 'collapsed': $header .= ' - ' . DI::l10n()->t('Collapsed'); break;
                        case 'archived':  $header .= ' - ' . DI::l10n()->t('Archived'); break;
                }
 
index 886798a5f83a672403b88b5508c168d9e18e6bd1..15eebd3603830befa539acfd8a98f2407922bef7 100644 (file)
@@ -207,7 +207,7 @@ class Profile extends BaseModule
                                        // @TODO Backward compatibility, replace with $localRelationship->unblock()
                                        Contact\User::setCollapsed($contact['id'], DI::userSession()->getLocalUserId(), false);
 
-                                       $message = $this->t('Contact has been collapsed');
+                                       $message = $this->t('Contact has been uncollapsed');
                                } else {
                                        // @TODO Backward compatibility, replace with $localRelationship->block()
                                        Contact\User::setCollapsed($contact['id'], DI::userSession()->getLocalUserId(), true);