[UTIL][Common][I18N] Use actor's preferred language for _m and utility to retrieve current language even when no actor is logged in

This commit is contained in:
2022-01-04 21:39:40 +00:00
parent 6247dd4c1a
commit 5a0bbfc795
4 changed files with 14 additions and 6 deletions

View File

@@ -53,7 +53,7 @@ class Feeds extends FeedController
Common::ensureLoggedIn();
$data = $this->query(
query: 'note-local:false',
language: Common::actor()?->getTopLanguage()?->getLocale(),
locale: Common::currentLanguage()->getLocale(),
);
return [
'_template' => 'collection/notes.html.twig',
@@ -101,7 +101,7 @@ class Feeds extends FeedController
Common::ensureLoggedIn();
$data = $this->query(
query: '',
language: Common::actor()?->getTopLanguage()?->getLocale(),
locale: Common::currentLanguage()->getLocale(),
);
return [
'_template' => 'collection/notes.html.twig',