Skip to content

Commit

Permalink
Merge pull request #2233 from nextcloud/artonge/backport/stable27/2228
Browse files Browse the repository at this point in the history
[stable27] Order collections files by taken date
  • Loading branch information
artonge committed Jan 4, 2024
2 parents 9e69169 + f8dad67 commit 7926c6a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions lib/Controller/PageController.php
Expand Up @@ -36,8 +36,8 @@
use OCP\App\IAppManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\IL10N;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
Expand All @@ -48,7 +48,8 @@
use OCP\Files\Search\ISearchComparison;
use OCP\ICache;
use OCP\ICacheFactory;
use OCP\AppFramework\Services\IInitialState;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
use OCP\IUserSession;
use OCP\Util;
Expand Down Expand Up @@ -76,6 +77,7 @@ public function __construct(
IRootFolder $rootFolder,
ICacheFactory $cacheFactory,
LoggerInterface $logger,
private IConfig $config,
IL10N $l10n
) {
parent::__construct(Application::APP_ID, $request);
Expand Down Expand Up @@ -110,6 +112,7 @@ public function index(): TemplateResponse {
$this->initialState->provideInitialState('maps', $this->appManager->isEnabledForUser('maps') === true);
$this->initialState->provideInitialState('recognize', $this->appManager->isEnabledForUser('recognize') === true);
$this->initialState->provideInitialState('systemtags', $this->appManager->isEnabledForUser('systemtags') === true);
$this->initialState->provideInitialState('showPeopleMenuEntry', $this->config->getAppValue('photos', 'showPeopleMenuEntry', 'true') === 'true');

// Provide user config
foreach (array_keys(UserConfigService::DEFAULT_CONFIGS) as $key) {
Expand Down
2 changes: 1 addition & 1 deletion src/Photos.vue
Expand Up @@ -187,7 +187,7 @@ export default {
: getCurrentUser().isAdmin || isMapsInstalled,
showPeopleMenuEntry: getCurrentUser() === null
? false
: getCurrentUser().isAdmin || isRecognizeInstalled,
: (getCurrentUser().isAdmin && loadState('photos', 'showPeopleMenuEntry', true)) || isRecognizeInstalled,
openedSettings: false,
}
Expand Down

0 comments on commit 7926c6a

Please sign in to comment.