feat: add Go to message action in various places (#3953)
* feat: add `Go to message` action in search popup * chore: add changelog entry * fix: only scroll if the scrollbar is shown * fix: go to message when view isn't focused * feat: animate highlighted message * fix: missing includes * fix: order of initialization * fix: add `ChannelView::mayContainMessage` to filter messages * feat: add `Go to message` action in `/mentions` * fix: ignore any mentions channel when searching for split * feat: add `Go to message` action in reply-threads * fix: remove redundant `source` parameter * feat: add `Go to message` action in user-cards * feat: add link to deleted message * fix: set current time to 0 when starting animation * chore: update changelog * fix: add default case (unreachable) * chore: removed unused variable * fix: search in mentions * fix: always attempt to focus split * fix: rename `Link::MessageId` to `Link::JumpToMessage` * fix: rename `selectAndScrollToMessage` to `scrollToMessage` * fix: rename internal `scrollToMessage` to `scrollToMessageLayout` * fix: deleted message link in search popup * chore: reword explanation * fix: use for-loop instead of `std::find_if` * refactor: define highlight colors in `BaseTheme` * core: replace `iff` with `if` * fix: only return if the message found * Reword/phrase/dot changelog entries Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -320,6 +320,11 @@ void WindowManager::select(SplitContainer *container)
|
||||
this->selectSplitContainer.invoke(container);
|
||||
}
|
||||
|
||||
void WindowManager::scrollToMessage(const MessagePtr &message)
|
||||
{
|
||||
this->scrollToMessageSignal.invoke(message);
|
||||
}
|
||||
|
||||
QPoint WindowManager::emotePopupPos()
|
||||
{
|
||||
return this->emotePopupPos_;
|
||||
|
||||
@@ -15,6 +15,7 @@ class Settings;
|
||||
class Paths;
|
||||
class Window;
|
||||
class SplitContainer;
|
||||
class ChannelView;
|
||||
|
||||
enum class MessageElementFlag : int64_t;
|
||||
using MessageElementFlags = FlagsEnum<MessageElementFlag>;
|
||||
@@ -66,6 +67,13 @@ public:
|
||||
|
||||
void select(Split *split);
|
||||
void select(SplitContainer *container);
|
||||
/**
|
||||
* Scrolls to the message in a split that's not
|
||||
* a mentions view and focuses the split.
|
||||
*
|
||||
* @param message Message to scroll to.
|
||||
*/
|
||||
void scrollToMessage(const MessagePtr &message);
|
||||
|
||||
QPoint emotePopupPos();
|
||||
void setEmotePopupPos(QPoint pos);
|
||||
@@ -105,6 +113,7 @@ public:
|
||||
|
||||
pajlada::Signals::Signal<Split *> selectSplit;
|
||||
pajlada::Signals::Signal<SplitContainer *> selectSplitContainer;
|
||||
pajlada::Signals::Signal<const MessagePtr &> scrollToMessageSignal;
|
||||
|
||||
private:
|
||||
static void encodeNodeRecursively(SplitContainer::Node *node,
|
||||
|
||||
Reference in New Issue
Block a user