nextcloud/apps/comments/src/utils/activity.ts
Ferdinand Thiessen cd15bb0679
fix(comments): properly handle opening the sidebar when Activity integration is used
When the activity integration is used we need to open the `activity` tab
not the comments tab.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-12 17:19:04 +01:00

13 lines
441 B
TypeScript

/*!
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { loadState } from '@nextcloud/initial-state'
/**
* Check if the comments app is using the Activity app integration for the sidebar.
*/
export function isUsingActivityIntegration() {
return loadState('comments', 'activityEnabled', false) && window.OCA?.Activity?.registerSidebarAction !== undefined
}