| 1 | From 3865a179b3aed172bac4a3dcd1f320270de16dcf Mon Sep 17 00:00:00 2001
|
| 2 | From: Arseniy Zaostrovnykh <[email protected]>
|
| 3 | Date: Sun, 16 Mar 2025 20:49:16 +0100
|
| 4 | Subject: [PATCH] dialogs_inner_widget: Fix use-before-def compile error.
|
| 5 |
|
| 6 | * Telegram/SourceFiles/dialogs/dialogs_inner_widget.h: Include headers
|
| 7 | and eagerly define TagCache to avoid using under-defined types for
|
| 8 | std::unsigned_map values.
|
| 9 | * Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp: Remove the
|
| 10 | definition of TagCache that is now in the header.
|
| 11 | ---
|
| 12 | Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp | 5 -----
|
| 13 | Telegram/SourceFiles/dialogs/dialogs_inner_widget.h | 7 ++++++-
|
| 14 | 2 files changed, 6 insertions(+), 6 deletions(-)
|
| 15 |
|
| 16 | diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp
|
| 17 | index 39e047897..9687405aa 100644
|
| 18 | |
| 19 | |
| 20 | @@ -247,11 +247,6 @@ struct InnerWidget::PeerSearchResult {
|
| 21 | BasicRow row;
|
| 22 | };
|
| 23 |
|
| 24 | -struct InnerWidget::TagCache {
|
| 25 | - Ui::ChatsFilterTagContext context;
|
| 26 | - QImage frame;
|
| 27 | -};
|
| 28 | -
|
| 29 | Key InnerWidget::FilterResult::key() const {
|
| 30 | return row->key();
|
| 31 | }
|
| 32 | diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h
|
| 33 | index 2500f43d1..c85c5ce32 100644
|
| 34 | |
| 35 | |
| 36 | @@ -16,6 +16,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
| 37 | #include "ui/effects/animations.h"
|
| 38 | #include "ui/rp_widget.h"
|
| 39 | #include "ui/userpic_view.h"
|
| 40 | +#include "dialogs/dialogs_common.h"
|
| 41 | +#include "ui/chat/chats_filter_tag.h"
|
| 42 |
|
| 43 | namespace style {
|
| 44 | struct DialogRow;
|
| 45 | @@ -226,7 +228,10 @@ private:
|
| 46 | struct CollapsedRow;
|
| 47 | struct HashtagResult;
|
| 48 | struct PeerSearchResult;
|
| 49 | - struct TagCache;
|
| 50 | + struct TagCache {
|
| 51 | + Ui::ChatsFilterTagContext context;
|
| 52 | + QImage frame;
|
| 53 | + };
|
| 54 |
|
| 55 | enum class JumpSkip {
|
| 56 | PreviousOrBegin,
|
| 57 | --
|
| 58 | 2.48.1
|
| 59 |
|