Files
neochat/src/roominfo/RoomSearchPage.qml
Joshua Goins fa8294d4b9 Add action to user detail dialog to search for their messages in room
In other messaging applications (e.g. Discord) this is possible through
text modifiers like "from:@user". We don't support that, and I'm not
super keen on implementing yet-another-parsing-thing, so an action in
the user detail dialog should work for now.

Very useful to sift through large rooms but when you only care about a
specific person's messages (maybe your own?)
2025-08-30 13:19:46 -04:00

49 lines
1.2 KiB
QML

// SPDX-FileCopyrightText: 2022 Tobias Fella <tobias.fella@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick
import org.kde.neochat.libneochat
import org.kde.neochat.timeline
/**
* @brief Component for finding messages in a room.
*
* This component is based on a SearchPage and allows the user to enter a search
* term into the input field and then search the room for messages with text that
* matches the input.
*
* @sa SearchPage
*/
SearchPage {
id: root
/**
* @brief The room the search is being performed in.
*/
required property NeoChatRoom room
/**
* @brief If set, limits the search to events from a specific user id.
*/
property string senderId
title: i18nc("@action:title", "Search Messages")
model: SearchModel {
id: searchModel
room: root.room
senderId: root.senderId
}
modelDelegate: EventDelegate {
room: root.room
}
searchFieldPlaceholder: i18n("Find messages…")
noSearchPlaceholderMessage: i18n("Enter text to start searching")
noResultPlaceholderMessage: i18n("No messages found")
listVerticalLayoutDirection: ListView.BottomToTop
}