Compare commits

..

No commits in common. "dev" and "v5.12.3" have entirely different histories.
dev ... v5.12.3

10 changed files with 54 additions and 104 deletions

View file

@ -5,7 +5,7 @@ body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Thanks for reporting issues of AyuGram Desktop! Thanks for reporting issues of Telegram Desktop!
To make it easier for us to help you please enter detailed information below. To make it easier for us to help you please enter detailed information below.
- type: textarea - type: textarea
@ -39,9 +39,12 @@ body:
required: true required: true
- type: input - type: input
attributes: attributes:
label: Version of AyuGram Desktop label: Version of Telegram Desktop
description: > description: >
**Don't use 'latest'**, specify actual version. Please note we don't support versions from Linux distro repositories.
If you need support for these versions, **please contact your distro maintainer**
or your distro bugtracker.
**Don't use 'latest'**, specify actual version, **that's a reason to close your issue**.
validations: validations:
required: true required: true
- type: dropdown - type: dropdown
@ -49,7 +52,11 @@ body:
label: Installation source label: Installation source
multiple: false multiple: false
options: options:
- Binary from GitHub / official Telegram source - Static binary from official website
- Microsoft Store
- Mac App Store
- Flatpak
- Snap
- Other (unofficial) source - Other (unofficial) source
validations: validations:
required: true required: true
@ -58,7 +65,9 @@ body:
label: Crash ID label: Crash ID
description: > description: >
If you're reporting a crash, please enter the crash ID from the crash reporter If you're reporting a crash, please enter the crash ID from the crash reporter
opening on the next launch after crash. opening on the next launch after crash. **You have to enable beta versions
installation in Settings -> Advanced for the reporter to appear.**
You don't have to wait for a beta version to arrive.
- type: textarea - type: textarea
attributes: attributes:
label: Logs label: Logs

View file

@ -6322,41 +6322,38 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_DontSendOnlinePackets" = "Don't Send Online"; "ayu_DontSendOnlinePackets" = "Don't Send Online";
"ayu_DontSendUploadProgress" = "Don't Send Typing"; "ayu_DontSendUploadProgress" = "Don't Send Typing";
"ayu_SendOfflinePacketAfterOnline" = "Go Offline Automatically"; "ayu_SendOfflinePacketAfterOnline" = "Go Offline Automatically";
"ayu_GhostModeOptionLongTapDescription" = "Long-press any option to prevent it from changing when toggling Ghost Mode."; "ayu_GhostModeOptionLongTapDescription" = "Long tap on any option to prevent it from changing on toggling Ghost Mode.";
"ayu_MarkReadAfterAction" = "Read on Interact"; "ayu_MarkReadAfterAction" = "Read on Interact";
"ayu_MarkReadAfterActionDescription" = "Automatically marks a message as read when you send a new one or tap a reaction."; "ayu_MarkReadAfterActionDescription" = "Automatically reads message when you send a new one or tap a reaction.";
"ayu_MarkReadAfterSend" = "Send"; "ayu_MarkReadAfterSend" = "Send";
"ayu_MarkReadAfterReaction" = "Reaction"; "ayu_MarkReadAfterReaction" = "Reaction";
"ayu_MarkReadAfterPoll" = "Poll"; "ayu_MarkReadAfterPoll" = "Poll";
"ayu_UseScheduledMessages" = "Schedule Messages"; "ayu_UseScheduledMessages" = "Schedule Messages";
"ayu_UseScheduledMessagesDescription" = "Automatically schedules outgoing messages to send after ~12 seconds (longer for media). Using this feature, you won't appear online.\nAvoid using on unreliable networks."; "ayu_UseScheduledMessagesDescription" = "Automatically schedules outgoing messages for ~12 seconds, and more for media. Sending messages this way, you won't appear online.\nDon't use on bad networks.";
"ayu_SendWithoutSoundByDefault" = "Send without Sound"; "ayu_SendWithoutSoundByDefault" = "Send without Sound";
"ayu_SendWithoutSoundByDefaultDescription" = "Sends outgoing messages without sound by default."; "ayu_SendWithoutSoundByDefaultDescription" = "Automatically sends outgoing messages without sound.";
"ayu_SuggestGhostModeBeforeViewingStory" = "Story Ghost Mode Alert"; "ayu_SuggestGhostModeBeforeViewingStory" = "Story Ghost Mode Alert";
"ayu_SuggestGhostModeBeforeViewingStoryDescription" = "Displays an alert before opening a story, suggesting you enable Ghost Mode."; "ayu_SuggestGhostModeBeforeViewingStoryDescription" = "Shows an alert before opening the story, suggesting to turn on Ghost Mode.";
"ayu_SpyEssentialsHeader" = "Spy essentials"; "ayu_SpyEssentialsHeader" = "Spy essentials";
"ayu_SaveDeletedMessages" = "Save Deleted Messages"; "ayu_SaveDeletedMessages" = "Save Deleted Messages";
"ayu_SaveMessagesHistory" = "Save Edits History"; "ayu_SaveMessagesHistory" = "Save Edits History";
"ayu_MessageSavingSaveMedia" = "Save Attachments"; "ayu_MessageSavingActionBarHeader" = "Message Saving Preferences";
"ayu_MessageSavingSaveMediaHint" = "Configure chats & limits"; "ayu_MessageSavingSaveMedia" = "Save Media";
"ayu_MessageSavingSaveMediaInPrivateChats" = "Private Chats"; "ayu_MessageSavingSaveMediaHint" = "Click for More";
"ayu_MessageSavingSaveMediaInPublicChannels" = "Public Channels"; "ayu_MessageSavingSaveMediaInPrivateChats" = "…in private chats";
"ayu_MessageSavingSaveMediaInPrivateChannels" = "Private Channels"; "ayu_MessageSavingSaveMediaInPublicChannels" = "…in public channels";
"ayu_MessageSavingSaveMediaInPublicGroups" = "Public Groups"; "ayu_MessageSavingSaveMediaInPrivateChannels" = "…in private channels";
"ayu_MessageSavingSaveMediaInPrivateGroups" = "Private Groups"; "ayu_MessageSavingSaveMediaInPublicGroups" = "…in public groups";
"ayu_MessageSavingSaveMediaHintPopup" = "Make sure it's configured to your needs."; "ayu_MessageSavingSaveMediaInPrivateGroups" = "…in private groups";
"ayu_MaximumMediaSizeCellular" = "Media size limit (cellular data)"; "ayu_MaximumMediaSizeCellular" = "Media size limit (cellular data)";
"ayu_MaximumMediaSizeWiFi" = "Media size limit (WiFi)"; "ayu_MaximumMediaSizeWiFi" = "Media size limit (WiFi)";
"ayu_MessageSavingOtherHeader" = "Other"; "ayu_MessageSavingOtherHeader" = "Other";
"ayu_MessageSavingSaveReactions" = "Save reactions";
"ayu_MessageSavingSaveForBots" = "Save in Bot Dialogs"; "ayu_MessageSavingSaveForBots" = "Save in Bot Dialogs";
"ayu_MessageSavingSavePath" = "Attachments Folder"; "ayu_MessageSavingSavePath" = "Attachments Folder";
"ayu_MessageSavingSavePathTitle" = "Choose folder"; "ayu_MessageSavingSavePathTitle" = "Choose folder";
"ayu_SpySaveReadMarks" = "Save Read Date"; "ayu_SpySaveReadMarks" = "Save Read Date";
"ayu_SpySaveReadMarksDescription" = "Locally saves data about reading messages. This will be shown if Telegram does not provide a read date."; "ayu_SpySaveReadMarksDescription" = "Locally saves data about reading messages. This will be shown if Telegram does not provide read date.";
"ayu_SpySaveLocalOnline" = "Save Last Seen Date";
"ayu_SpySaveLocalOnlineDescription" = "Saves the last online date for users with hidden online status based on their actions. You'll be able to see **very approximately** when they were last online.";
"ayu_ExportDatabaseButton" = "Export Database";
"ayu_ImportDatabaseButton" = "Import Database";
"ayu_QoLTogglesHeader" = "Useful features"; "ayu_QoLTogglesHeader" = "Useful features";
"ayu_KeepAliveService" = "AyuGram Push Service"; "ayu_KeepAliveService" = "AyuGram Push Service";
"ayu_DisableAds" = "Disable Ads"; "ayu_DisableAds" = "Disable Ads";
@ -6386,7 +6383,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_SettingsShowID_Hide" = "Hide"; "ayu_SettingsShowID_Hide" = "Hide";
"ayu_SettingsShowMessageShot" = "Show Message Shot"; "ayu_SettingsShowMessageShot" = "Show Message Shot";
"ayu_SettingsRecentStickersCount" = "Recent Stickers Count"; "ayu_SettingsRecentStickersCount" = "Recent Stickers Count";
"ayu_SettingsCustomizationHint" = "You must restart the application after making changes in the \"Customization\" section."; "ayu_SettingsCustomizationHint" = "After making changes to the \"Customization\" section, you must restart the application.";
"ayu_SettingsContextMenuTitle" = "Choose when to show the item"; "ayu_SettingsContextMenuTitle" = "Choose when to show the item";
"ayu_SettingsContextMenuDescription" = "Extended menu items will be displayed if you hold CTRL or SHIFT while right-clicking on the message."; "ayu_SettingsContextMenuDescription" = "Extended menu items will be displayed if you hold CTRL or SHIFT while right-clicking on the message.";
"ayu_SettingsContextMenuItemHidden" = "Hidden"; "ayu_SettingsContextMenuItemHidden" = "Hidden";
@ -6410,7 +6407,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_SettingsIncreaseWebviewHeight" = "Increase Content Height"; "ayu_SettingsIncreaseWebviewHeight" = "Increase Content Height";
"ayu_SettingsIncreaseWebviewWidth" = "Increase Content Width"; "ayu_SettingsIncreaseWebviewWidth" = "Increase Content Width";
"ayu_ExportDataTitle" = "Export AyuGram Database?"; "ayu_ExportDataTitle" = "Export AyuGram Database?";
"ayu_ExportDataDescription" = "It will be exported to the public folder under Saved Attachments."; "ayu_ExportDataDescription" = "It will be exported to the public folder, to Saved Attachments.";
"ayu_ExportDataConfirm" = "Yes, export"; "ayu_ExportDataConfirm" = "Yes, export";
"ayu_ExportDataCancel" = "No, close window"; "ayu_ExportDataCancel" = "No, close window";
"ayu_ExportDataSuccess" = "Database exported successfully."; "ayu_ExportDataSuccess" = "Database exported successfully.";
@ -6488,9 +6485,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_IconYaPlus" = "Yandex Plus"; "ayu_IconYaPlus" = "Yandex Plus";
"ayu_WALMode" = "Enable WAL mode"; "ayu_WALMode" = "Enable WAL mode";
"ayu_PushNotificationCount" = "FCM notifications received"; "ayu_PushNotificationCount" = "FCM notifications received";
"ayu_AyuAttachments" = "AyuGram Attachments Folder"; "ayu_ClearAyuDatabase" = "Clear Messages Database";
"ayu_AyuDatabase" = "AyuGram Messages Database"; "ayu_ClearAyuAttachmentsNotification" = "AyuGram attachments folder cleared";
"ayu_TelegramCacheDatabase" = "Telegram Messages Database"; "ayu_ClearTelegramDatabase" = "Clear Telegram Database";
"ayu_ClearAyuDatabaseNotification" = "AyuGram database cleared";
"ayu_ClearAyuAttachments" = "Clear Attachments Folder";
"ayu_ConfirmationsTitle" = "Confirmations"; "ayu_ConfirmationsTitle" = "Confirmations";
"ayu_StickerConfirmation" = "For Stickers"; "ayu_StickerConfirmation" = "For Stickers";
"ayu_GIFConfirmation" = "For GIFs"; "ayu_GIFConfirmation" = "For GIFs";
@ -6558,10 +6557,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_SuggestGhostModeStoryText" = "Do you want to enable **Ghost Mode** before viewing the story?"; "ayu_SuggestGhostModeStoryText" = "Do you want to enable **Ghost Mode** before viewing the story?";
"ayu_SuggestGhostModeStoryActionTextYes" = "Yes"; "ayu_SuggestGhostModeStoryActionTextYes" = "Yes";
"ayu_SuggestGhostModeStoryActionTextNo" = "No"; "ayu_SuggestGhostModeStoryActionTextNo" = "No";
"ayu_ClearAttachmentsFolderWarning" = "Are you sure you want to clear the **attachments folder**? This action cannot be undone.";
"ayu_ClearMessagesDatabaseWarning" = "Are you sure you want to clear **all deleted & edited messages**? This action cannot be undone.";
"ayu_ClearTelegramDatabaseWarning" = "Are you sure you want to clear the **Telegram internal database**? This action cannot be undone.";
"ayu_FirstLaunchAlert" = "AyuGram is **free** software and should only be obtained from our **official sources**. You assume **full responsibility** for using this application with your account."; "ayu_FirstLaunchAlert" = "AyuGram is **free** software and should only be obtained from our **official sources**. You assume **full responsibility** for using this application with your account.";
"ayu_LocalPremiumAlert" = "With local Telegram Premium, you won't get increased limits or be able to send animated emojis. Other users won't see your premium emoji and quote color."; "ayu_LocalPremiumAlert" = "With local Telegram Premium you won't have increased limits and won't be able to send animated emojis. Other users won't see your premium emoji and quote color.";
"ayu_ExteraChatsAlert" = "Don't ask questions related to **AyuGram** in **exteraGram** chats. If you need help, ask in the official **AyuGram** chat."; "ayu_ExteraChatsAlert" = "Don't ask questions related to **AyuGram** in **exteraGram** chats. If you need help, ask in the official **AyuGram** chat.";
"ayu_HideNextViewsDescriptionAyu" = "Hide my views forever, until Ghost Mode is disabled."; "ayu_HideNextViewsDescriptionAyu" = "Hide my views forever, until Ghost Mode disabled.";
"ayu_EnableGhostModeStories" = "Enable Ghost Mode"; "ayu_EnableGhostModeStories" = "Enable Ghost Mode";
"ayu_GhostModeIsActive" = "Ghost Mode is Active"; "ayu_GhostModeIsActive" = "Ghost Mode is Active";
"ayu_SimpleQuotesAndReplies" = "Disable Colorful Replies"; "ayu_SimpleQuotesAndReplies" = "Disable Colorful Replies";
@ -6587,7 +6589,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_MessageShotShowReactions" = "Show reactions"; "ayu_MessageShotShowReactions" = "Show reactions";
"ayu_MessageShotShowColorfulReplies" = "Show colorful replies"; "ayu_MessageShotShowColorfulReplies" = "Show colorful replies";
"ayu_SendAsSticker" = "Send as Sticker"; "ayu_SendAsSticker" = "Send as Sticker";
"ayu_SendWithSound" = "Send With Sound";
"ayu_AyuForwardStatusPreparing" = "Forwarding messages"; "ayu_AyuForwardStatusPreparing" = "Forwarding messages";
"ayu_AyuForwardStatusLoadingMedia" = "Loading media"; "ayu_AyuForwardStatusLoadingMedia" = "Loading media";
"ayu_AyuForwardStatusForwarding" = "Forwarding messages"; "ayu_AyuForwardStatusForwarding" = "Forwarding messages";
@ -6606,21 +6607,19 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_LikelyOfflineStatus" = "offline ?"; "ayu_LikelyOfflineStatus" = "offline ?";
"ayu_GhostModeShortcut" = "Enter with Ghost"; "ayu_GhostModeShortcut" = "Enter with Ghost";
"ayu_SettingsShowMessageSeconds" = "Show Message Seconds"; "ayu_SettingsShowMessageSeconds" = "Show Message Seconds";
"ayu_ShowOnlyAddedEmojisAndStickers" = "Show Only Added Emojis & Stickers";
"ayu_ContextCopyID" = "Copy ID"; "ayu_ContextCopyID" = "Copy ID";
"ayu_IDCopiedToast" = "ID copied to clipboard."; "ayu_IDCopiedToast" = "ID copied to clipboard.";
"ayu_ContextHideMessage" = "Hide"; "ayu_ContextHideMessage" = "Hide";
"ayu_ContextCopyCallbackData" = "Copy Callback Data"; "ayu_ContextCopyCallbackData" = "Copy Callback Data";
"ayu_RegisterURLScheme" = "Register URL Scheme"; "ayu_RegisterURLScheme" = "Register URL Scheme";
"ayu_SessionTerminated" = "Session **{item}** was terminated. You may still browse cached messages.";
"ayu_LocalPremiumNotice" = "You're using **local** Telegram Premium.\nIt **won't** give you any benefits.\n**Enjoy the star near your nickname!**"; "ayu_LocalPremiumNotice" = "You're using **local** Telegram Premium.\nIt **won't** give you any benefits.\n**Enjoy the star near your nickname!**";
"ayu_DeveloperPopup" = "**{item}** is a member of the **exteraGram** development team."; "ayu_DeveloperPopup" = "**{item}** is a member of the **exteraGram** development team.";
"ayu_SupporterPopup" = "**{item}** supported the development of **exteraGram** or **AyuGram** and received an exclusive badge."; "ayu_SupporterPopup" = "**{item}** supported the development of **exteraGram** or **AyuGram** and received an exclusive badge.";
"ayu_SettingsWatermark" = "AyuGram is developed and maintained by Radolyn Labs."; "ayu_SettingsWatermark" = "AyuGram developed and maintained by Radolyn Labs.";
"ayu_ConfirmationSticker" = "Do you want to send this sticker?"; "ayu_ConfirmationSticker" = "Do you want to send this sticker?";
"ayu_ConfirmationGIF" = "Do you want to send this GIF?"; "ayu_ConfirmationGIF" = "Do you want to send this GIF?";
"ayu_ConfirmationVoice" = "Do you want to send this voice message?"; "ayu_ConfirmationVoice" = "Do you want to send this voice message?";
"ayu_IntroAbout" = "Welcome to the AyuGram Desktop.\nMake Telegram your own."; "ayu_IntroAbout" = "Welcome to the AyuGram Desktop.\nMake Telegram your own.";
"ayu_AboutText1" = "ToS breaking Telegram client based on {api_link}."; "ayu_AboutText1" = "ToS breaking Telegram client based on {api_link}.";
"ayu_UpdateAyuGram" = "Update AyuGram"; "ayu_UpdateAyuGram" = "Update AyuGram";
"ayu_UtilityRestartRequired" = "The app will close in 5 seconds."; "ayu_UtilityRestartRequired" = "App will close in 5 seconds.";

View file

@ -380,10 +380,6 @@ void AyuGramSettings::set_disableCustomBackgrounds(bool val) {
disableCustomBackgrounds = val; disableCustomBackgrounds = val;
} }
void AyuGramSettings::set_showOnlyAddedEmojisAndStickers(bool val) {
showOnlyAddedEmojisAndStickers = val;
}
void AyuGramSettings::set_collapseSimilarChannels(bool val) { void AyuGramSettings::set_collapseSimilarChannels(bool val) {
collapseSimilarChannels = val; collapseSimilarChannels = val;
} }

View file

@ -37,7 +37,6 @@ public:
bool disableAds; bool disableAds;
bool disableStories; bool disableStories;
bool disableCustomBackgrounds; bool disableCustomBackgrounds;
bool showOnlyAddedEmojisAndStickers;
bool collapseSimilarChannels; bool collapseSimilarChannels;
bool hideSimilarChannels; bool hideSimilarChannels;
@ -118,7 +117,6 @@ public:
void set_disableAds(bool val); void set_disableAds(bool val);
void set_disableStories(bool val); void set_disableStories(bool val);
void set_disableCustomBackgrounds(bool val); void set_disableCustomBackgrounds(bool val);
void set_showOnlyAddedEmojisAndStickers(bool val);
void set_collapseSimilarChannels(bool val); void set_collapseSimilarChannels(bool val);
void set_hideSimilarChannels(bool val); void set_hideSimilarChannels(bool val);

View file

@ -16,15 +16,6 @@
using namespace sqlite_orm; using namespace sqlite_orm;
auto storage = make_storage( auto storage = make_storage(
"./tdata/ayudata.db", "./tdata/ayudata.db",
make_index("idx_deleted_message_userId_dialogId_topicId_messageId",
column<DeletedMessage>(&DeletedMessage::userId),
column<DeletedMessage>(&DeletedMessage::dialogId),
column<DeletedMessage>(&DeletedMessage::topicId),
column<DeletedMessage>(&DeletedMessage::messageId)),
make_index("idx_edited_message_userId_dialogId_messageId",
column<EditedMessage>(&EditedMessage::userId),
column<EditedMessage>(&EditedMessage::dialogId),
column<EditedMessage>(&EditedMessage::messageId)),
make_table<DeletedMessage>( make_table<DeletedMessage>(
"DeletedMessage", "DeletedMessage",
make_column("fakeId", &DeletedMessage::fakeId, primary_key().autoincrement()), make_column("fakeId", &DeletedMessage::fakeId, primary_key().autoincrement()),
@ -221,15 +212,13 @@ std::vector<EditedMessage> getEditedMessages(ID userId, ID dialogId, ID messageI
bool hasRevisions(ID userId, ID dialogId, ID messageId) { bool hasRevisions(ID userId, ID dialogId, ID messageId) {
try { try {
return !storage.select( return storage.count<EditedMessage>(
columns(column<EditedMessage>(&EditedMessage::messageId)),
where( where(
column<EditedMessage>(&EditedMessage::userId) == userId and column<EditedMessage>(&EditedMessage::userId) == userId and
column<EditedMessage>(&EditedMessage::dialogId) == dialogId and column<EditedMessage>(&EditedMessage::dialogId) == dialogId and
column<EditedMessage>(&EditedMessage::messageId) == messageId column<EditedMessage>(&EditedMessage::messageId) == messageId
), )
limit(1) ) > 0;
).empty();
} catch (std::exception &ex) { } catch (std::exception &ex) {
LOG(("Failed to check if message has revisions: %1").arg(ex.what())); LOG(("Failed to check if message has revisions: %1").arg(ex.what()));
return false; return false;
@ -262,15 +251,13 @@ std::vector<DeletedMessage> getDeletedMessages(ID userId, ID dialogId, ID topicI
bool hasDeletedMessages(ID userId, ID dialogId, ID topicId) { bool hasDeletedMessages(ID userId, ID dialogId, ID topicId) {
try { try {
return !storage.select( return storage.count<DeletedMessage>(
columns(column<DeletedMessage>(&DeletedMessage::dialogId)),
where( where(
column<DeletedMessage>(&DeletedMessage::userId) == userId and column<DeletedMessage>(&DeletedMessage::userId) == userId and
column<DeletedMessage>(&DeletedMessage::dialogId) == dialogId and column<DeletedMessage>(&DeletedMessage::dialogId) == dialogId and
(column<DeletedMessage>(&DeletedMessage::topicId) == topicId or topicId == 0) (column<DeletedMessage>(&DeletedMessage::topicId) == topicId or topicId == 0)
), )
limit(1) ) > 0;
).empty();
} catch (std::exception &ex) { } catch (std::exception &ex) {
LOG(("Failed to check if dialog has deleted message: %1").arg(ex.what())); LOG(("Failed to check if dialog has deleted message: %1").arg(ex.what()));
return false; return false;

View file

@ -809,25 +809,6 @@ void SetupQoLToggles(not_null<Ui::VerticalLayout*> container) {
}, },
container->lifetime()); container->lifetime());
AddButtonWithIcon(
container,
tr::ayu_ShowOnlyAddedEmojisAndStickers(),
st::settingsButtonNoIcon
)->toggleOn(
rpl::single(settings->showOnlyAddedEmojisAndStickers)
)->toggledValue(
) | rpl::filter(
[=](bool enabled)
{
return (enabled != settings->showOnlyAddedEmojisAndStickers);
}) | start_with_next(
[=](bool enabled)
{
settings->set_showOnlyAddedEmojisAndStickers(enabled);
AyuSettings::save();
},
container->lifetime());
AddButtonWithIcon( AddButtonWithIcon(
container, container,
tr::ayu_LocalPremium(), tr::ayu_LocalPremium(),

View file

@ -55,10 +55,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace ChatHelpers { namespace ChatHelpers {
namespace { namespace {
@ -2259,13 +2255,9 @@ void EmojiListWidget::refreshCustom() {
&& !_allowWithoutPremium; && !_allowWithoutPremium;
const auto owner = &session->data(); const auto owner = &session->data();
const auto &sets = owner->stickers().sets(); const auto &sets = owner->stickers().sets();
auto settings = &AyuSettings::getInstance();
const auto push = [&](uint64 setId, bool installed) { const auto push = [&](uint64 setId, bool installed) {
const auto megagroup = _megagroupSet const auto megagroup = _megagroupSet
&& (setId == Data::Stickers::MegagroupSetId); && (setId == Data::Stickers::MegagroupSetId);
if (settings->showOnlyAddedEmojisAndStickers && !installed && !megagroup) {
return;
}
const auto lookupId = megagroup const auto lookupId = megagroup
? _megagroupSet->mgInfo->emojiSet.id ? _megagroupSet->mgInfo->emojiSet.id
: setId; : setId;

View file

@ -54,10 +54,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace ChatHelpers { namespace ChatHelpers {
namespace { namespace {
@ -408,13 +404,9 @@ bool FieldAutocomplete::clearFilteredBotCommands() {
FieldAutocomplete::StickerRows FieldAutocomplete::getStickerSuggestions() { FieldAutocomplete::StickerRows FieldAutocomplete::getStickerSuggestions() {
const auto data = &_session->data().stickers(); const auto data = &_session->data().stickers();
const auto list = data->getListByEmoji({ _emoji }, _stickersSeed); const auto list = data->getListByEmoji({ _emoji }, _stickersSeed);
const auto settings = &AyuSettings::getInstance();
auto result = ranges::views::all( auto result = ranges::views::all(
list list
) | ranges::views::filter([&](not_null<DocumentData*> sticker) { ) | ranges::views::transform([](not_null<DocumentData*> sticker) {
return !settings->showOnlyAddedEmojisAndStickers
|| sticker->isStickerSetInstalled();
}) | ranges::views::transform([](not_null<DocumentData*> sticker) {
return StickerSuggestion{ return StickerSuggestion{
sticker, sticker,
sticker->createMediaView() sticker->createMediaView()

View file

@ -763,10 +763,6 @@ void StickersListWidget::fillFilteredStickersRow() {
} }
void StickersListWidget::addSearchRow(not_null<StickersSet*> set) { void StickersListWidget::addSearchRow(not_null<StickersSet*> set) {
const auto settings = &AyuSettings::getInstance();
if (settings->showOnlyAddedEmojisAndStickers && !SetInMyList(set->flags)) {
return;
}
const auto skipPremium = !session().premiumPossible(); const auto skipPremium = !session().premiumPossible();
auto elements = PrepareStickers( auto elements = PrepareStickers(
set->stickers.empty() ? set->covers : set->stickers, set->stickers.empty() ? set->covers : set->stickers,

View file

@ -3109,12 +3109,12 @@ void HistoryItem::setPostAuthor(const QString &postAuthor) {
void HistoryItem::setDeleted() { void HistoryItem::setDeleted() {
_deleted = true; _deleted = true;
if (isService()) { const auto settings = &AyuSettings::getInstance();
const auto settings = &AyuSettings::getInstance(); if (settings->replaceBottomInfoWithIcons) {
setAyuHint(settings->deletedMark);
} else {
history()->owner().requestItemViewRefresh(this); history()->owner().requestItemViewRefresh(this);
history()->owner().requestItemResize(this); history()->owner().requestItemResize(this);
} else {
setAyuHint(settings->deletedMark);
} }
} }