diff --git a/src/components/MessagesList/MessagesList.vue b/src/components/MessagesList/MessagesList.vue index 68e5b5f9fb..3ed7ae6efe 100644 --- a/src/components/MessagesList/MessagesList.vue +++ b/src/components/MessagesList/MessagesList.vue @@ -1158,10 +1158,14 @@ export default { // TODO: doesn't work if chat is hidden. Need to store // delayed 'shouldScroll' and call after chat is visible - scrollElement.scrollIntoView({ - behavior: smooth ? 'smooth' : 'auto', - block: 'center', - inline: 'nearest', + // FIXME: because scrollToBottom is also triggered and it is wrapped in $nextTick + // We need to trigger this at the same time (nextTick) to avoid focusing and then scrolling to bottom + this.$nextTick(() => { + scrollElement.scrollIntoView({ + behavior: smooth ? 'smooth' : 'auto', + block: 'center', + inline: 'nearest', + }) }) if (this.$refs.scroller && !smooth) { diff --git a/src/components/RightSidebar/RightSidebar.vue b/src/components/RightSidebar/RightSidebar.vue index 139a876b3f..67a5da88e3 100644 --- a/src/components/RightSidebar/RightSidebar.vue +++ b/src/components/RightSidebar/RightSidebar.vue @@ -6,8 +6,8 @@ + + + + diff --git a/src/services/coreService.ts b/src/services/coreService.ts index 5010d0dfa0..a54bef968a 100644 --- a/src/services/coreService.ts +++ b/src/services/coreService.ts @@ -10,6 +10,8 @@ import { getTalkConfig, hasTalkFeature } from './CapabilitiesManager.ts' import { SHARE } from '../constants.js' import type { TaskProcessingResponse, + UnifiedSearchResponse, + SearchMessagePayload, } from '../types/index.ts' const canInviteToFederation = hasTalkFeature('local', 'federation-v1') @@ -63,8 +65,16 @@ const deleteTaskById = async function(id: number, options?: object): Promise export type setUserSettingsParams = Required['requestBody']['content']['application/json'] export type setUserSettingsResponse = ApiResponse + +// Unified Search +export type MessageSearchResultAttributes = { + conversation: string + messageId: string + actorType: string + actorId: string + timestamp: string +} + +export type CoreUnifiedSearchResultEntry = { + thumbnailUrl: string; + title: string; + subline: string; + resourceUrl: string; + icon: string; + rounded: boolean; + attributes: MessageSearchResultAttributes; +} + +export type UserFilterObject = { + id: string + displayName: string + isNoUser: boolean + user: string + disableMenu: boolean + showUserStatus: boolean +} + +export type CoreUnifiedSearchResult = { + name: string; + isPaginated: boolean; + entries: CoreUnifiedSearchResultEntry[]; + cursor: number | string | null; +} +export type UnifiedSearchResponse = ApiResponseUnwrapped + +export type SearchMessagePayload = { + term: string, + person?: string, + since?: string | null, + until?: string | null, + cursor?: number | string | null, + limit?: number, + from?: string +}