mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-22 02:17:18 +00:00
Compare commits
3 Commits
f8dc13d1e1
...
f90a7c75da
Author | SHA1 | Date | |
---|---|---|---|
|
f90a7c75da | ||
|
0581eb6219 | ||
|
39bfd4d160 |
@ -197,14 +197,19 @@ void HistoryMessageForwarded::create(
|
||||
? originalSender->name()
|
||||
: originalHiddenSenderInfo->name)
|
||||
};
|
||||
if (originalSender) {
|
||||
context.session = &originalSender->owner().session();
|
||||
if (const auto copy = originalSender) {
|
||||
context.session = ©->owner().session();
|
||||
context.customEmojiRepaint = [=] {
|
||||
originalSender->owner().requestItemRepaint(item);
|
||||
// It is important to capture here originalSender by value,
|
||||
// not capture the HistoryMessageForwarded* and read the
|
||||
// originalSender field, because the components themselves
|
||||
// get moved from place to place and the captured `this`
|
||||
// pointer may become invalid, resulting in a crash.
|
||||
copy->owner().requestItemRepaint(item);
|
||||
};
|
||||
phrase = Ui::Text::SingleCustomEmoji(
|
||||
context.session->data().customEmojiManager().peerUserpicEmojiData(
|
||||
originalSender,
|
||||
copy,
|
||||
st::fwdTextUserpicPadding));
|
||||
}
|
||||
if (!originalPostAuthor.isEmpty()) {
|
||||
|
@ -368,7 +368,7 @@ const std::map<QString, Definition, std::greater<QString>> DefinitionMap {
|
||||
.defaultValue = false, }},
|
||||
{ "remember_compress_images", {
|
||||
.type = SettingType::BoolSetting,
|
||||
.defaultValue = false, }},
|
||||
.defaultValue = true, }},
|
||||
{ "view_profile_on_top", {
|
||||
.type = SettingType::BoolSetting,
|
||||
.defaultValue = false, }},
|
||||
|
Loading…
x
Reference in New Issue
Block a user