diff --git a/plugins/notification-resources/src/components/Activity.svelte b/plugins/notification-resources/src/components/Activity.svelte index 8c0ddc6ccf..ab0f6f786a 100644 --- a/plugins/notification-resources/src/components/Activity.svelte +++ b/plugins/notification-resources/src/components/Activity.svelte @@ -24,11 +24,11 @@ import NotificationView from './NotificationView.svelte' export let filter: 'all' | 'read' | 'unread' = 'all' + export let _id: Ref | undefined const dispatch = createEventDispatcher() const query = createQuery() - let _id: Ref | undefined let docs: DocUpdates[] = [] let filtered: DocUpdates[] = [] let loading = true @@ -60,7 +60,7 @@ filtered = docs.filter((p) => p.txes.length > 0) } listProvider.update(filtered) - if (loading || _id === undefined) { + if (_id === undefined) { changeSelected(selected) } else { const index = filtered.findIndex((p) => p.attachedTo === _id) diff --git a/plugins/notification-resources/src/components/Inbox.svelte b/plugins/notification-resources/src/components/Inbox.svelte index c8e320a862..e5b51f50af 100644 --- a/plugins/notification-resources/src/components/Inbox.svelte +++ b/plugins/notification-resources/src/components/Inbox.svelte @@ -37,12 +37,12 @@ $: tabs = [ { label: notification.string.Activity, - props: { filter }, + props: { filter, _id }, component: Activity }, { label: notification.string.People, - props: { filter }, + props: { filter, _id }, component: People } ] diff --git a/plugins/notification-resources/src/components/People.svelte b/plugins/notification-resources/src/components/People.svelte index 57c1127cf7..126c4042d3 100644 --- a/plugins/notification-resources/src/components/People.svelte +++ b/plugins/notification-resources/src/components/People.svelte @@ -25,10 +25,10 @@ import PeopleNotificationView from './PeopleNotificationsView.svelte' export let filter: 'all' | 'read' | 'unread' = 'all' + export let _id: Ref | undefined const query = createQuery() - let _id: Ref | undefined let docs: DocUpdates[] = [] let map: Map, DocUpdates[]> = new Map() let accounts: EmployeeAccount[] = [] @@ -90,7 +90,7 @@ accounts = Array.from(map.keys()) .map((p) => $employeeAccountByIdStore.get(p as Ref)) .filter((p) => p !== undefined) as EmployeeAccount[] - if (loading || _id === undefined) { + if (_id === undefined) { changeSelected(selected) } else { const index = filtered.findIndex((p) => p.attachedTo === _id)