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
attributes:
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.
- type: textarea
@ -39,9 +39,12 @@ body:
required: true
- type: input
attributes:
label: Version of AyuGram Desktop
label: Version of Telegram Desktop
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:
required: true
- type: dropdown
@ -49,7 +52,11 @@ body:
label: Installation source
multiple: false
options:
- Binary from GitHub / official Telegram source
- Static binary from official website
- Microsoft Store
- Mac App Store
- Flatpak
- Snap
- Other (unofficial) source
validations:
required: true
@ -58,7 +65,9 @@ body:
label: Crash ID
description: >
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
attributes:
label: Logs

View file

@ -6322,41 +6322,38 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_DontSendOnlinePackets" = "Don't Send Online";
"ayu_DontSendUploadProgress" = "Don't Send Typing";
"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_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_MarkReadAfterReaction" = "Reaction";
"ayu_MarkReadAfterPoll" = "Poll";
"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_SendWithoutSoundByDefaultDescription" = "Sends outgoing messages without sound by default.";
"ayu_SendWithoutSoundByDefaultDescription" = "Automatically sends outgoing messages without sound.";
"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_SaveDeletedMessages" = "Save Deleted Messages";
"ayu_SaveMessagesHistory" = "Save Edits History";
"ayu_MessageSavingSaveMedia" = "Save Attachments";
"ayu_MessageSavingSaveMediaHint" = "Configure chats & limits";
"ayu_MessageSavingSaveMediaInPrivateChats" = "Private Chats";
"ayu_MessageSavingSaveMediaInPublicChannels" = "Public Channels";
"ayu_MessageSavingSaveMediaInPrivateChannels" = "Private Channels";
"ayu_MessageSavingSaveMediaInPublicGroups" = "Public Groups";
"ayu_MessageSavingSaveMediaInPrivateGroups" = "Private Groups";
"ayu_MessageSavingSaveMediaHintPopup" = "Make sure it's configured to your needs.";
"ayu_MessageSavingActionBarHeader" = "Message Saving Preferences";
"ayu_MessageSavingSaveMedia" = "Save Media";
"ayu_MessageSavingSaveMediaHint" = "Click for More";
"ayu_MessageSavingSaveMediaInPrivateChats" = "…in private chats";
"ayu_MessageSavingSaveMediaInPublicChannels" = "…in public channels";
"ayu_MessageSavingSaveMediaInPrivateChannels" = "…in private channels";
"ayu_MessageSavingSaveMediaInPublicGroups" = "…in public groups";
"ayu_MessageSavingSaveMediaInPrivateGroups" = "…in private groups";
"ayu_MaximumMediaSizeCellular" = "Media size limit (cellular data)";
"ayu_MaximumMediaSizeWiFi" = "Media size limit (WiFi)";
"ayu_MessageSavingOtherHeader" = "Other";
"ayu_MessageSavingSaveReactions" = "Save reactions";
"ayu_MessageSavingSaveForBots" = "Save in Bot Dialogs";
"ayu_MessageSavingSavePath" = "Attachments Folder";
"ayu_MessageSavingSavePathTitle" = "Choose folder";
"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_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_SpySaveReadMarksDescription" = "Locally saves data about reading messages. This will be shown if Telegram does not provide read date.";
"ayu_QoLTogglesHeader" = "Useful features";
"ayu_KeepAliveService" = "AyuGram Push Service";
"ayu_DisableAds" = "Disable Ads";
@ -6386,7 +6383,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_SettingsShowID_Hide" = "Hide";
"ayu_SettingsShowMessageShot" = "Show Message Shot";
"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_SettingsContextMenuDescription" = "Extended menu items will be displayed if you hold CTRL or SHIFT while right-clicking on the message.";
"ayu_SettingsContextMenuItemHidden" = "Hidden";
@ -6410,7 +6407,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_SettingsIncreaseWebviewHeight" = "Increase Content Height";
"ayu_SettingsIncreaseWebviewWidth" = "Increase Content Width";
"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_ExportDataCancel" = "No, close window";
"ayu_ExportDataSuccess" = "Database exported successfully.";
@ -6488,9 +6485,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_IconYaPlus" = "Yandex Plus";
"ayu_WALMode" = "Enable WAL mode";
"ayu_PushNotificationCount" = "FCM notifications received";
"ayu_AyuAttachments" = "AyuGram Attachments Folder";
"ayu_AyuDatabase" = "AyuGram Messages Database";
"ayu_TelegramCacheDatabase" = "Telegram Messages Database";
"ayu_ClearAyuDatabase" = "Clear Messages Database";
"ayu_ClearAyuAttachmentsNotification" = "AyuGram attachments folder cleared";
"ayu_ClearTelegramDatabase" = "Clear Telegram Database";
"ayu_ClearAyuDatabaseNotification" = "AyuGram database cleared";
"ayu_ClearAyuAttachments" = "Clear Attachments Folder";
"ayu_ConfirmationsTitle" = "Confirmations";
"ayu_StickerConfirmation" = "For Stickers";
"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_SuggestGhostModeStoryActionTextYes" = "Yes";
"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_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_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_GhostModeIsActive" = "Ghost Mode is Active";
"ayu_SimpleQuotesAndReplies" = "Disable Colorful Replies";
@ -6587,7 +6589,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_MessageShotShowReactions" = "Show reactions";
"ayu_MessageShotShowColorfulReplies" = "Show colorful replies";
"ayu_SendAsSticker" = "Send as Sticker";
"ayu_SendWithSound" = "Send With Sound";
"ayu_AyuForwardStatusPreparing" = "Forwarding messages";
"ayu_AyuForwardStatusLoadingMedia" = "Loading media";
"ayu_AyuForwardStatusForwarding" = "Forwarding messages";
@ -6606,21 +6607,19 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_LikelyOfflineStatus" = "offline ?";
"ayu_GhostModeShortcut" = "Enter with Ghost";
"ayu_SettingsShowMessageSeconds" = "Show Message Seconds";
"ayu_ShowOnlyAddedEmojisAndStickers" = "Show Only Added Emojis & Stickers";
"ayu_ContextCopyID" = "Copy ID";
"ayu_IDCopiedToast" = "ID copied to clipboard.";
"ayu_ContextHideMessage" = "Hide";
"ayu_ContextCopyCallbackData" = "Copy Callback Data";
"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_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_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_ConfirmationGIF" = "Do you want to send this GIF?";
"ayu_ConfirmationVoice" = "Do you want to send this voice message?";
"ayu_IntroAbout" = "Welcome to the AyuGram Desktop.\nMake Telegram your own.";
"ayu_AboutText1" = "ToS breaking Telegram client based on {api_link}.";
"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;
}
void AyuGramSettings::set_showOnlyAddedEmojisAndStickers(bool val) {
showOnlyAddedEmojisAndStickers = val;
}
void AyuGramSettings::set_collapseSimilarChannels(bool val) {
collapseSimilarChannels = val;
}

View file

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

View file

@ -16,15 +16,6 @@
using namespace sqlite_orm;
auto storage = make_storage(
"./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>(
"DeletedMessage",
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) {
try {
return !storage.select(
columns(column<EditedMessage>(&EditedMessage::messageId)),
return storage.count<EditedMessage>(
where(
column<EditedMessage>(&EditedMessage::userId) == userId and
column<EditedMessage>(&EditedMessage::dialogId) == dialogId and
column<EditedMessage>(&EditedMessage::messageId) == messageId
),
limit(1)
).empty();
)
) > 0;
} catch (std::exception &ex) {
LOG(("Failed to check if message has revisions: %1").arg(ex.what()));
return false;
@ -262,15 +251,13 @@ std::vector<DeletedMessage> getDeletedMessages(ID userId, ID dialogId, ID topicI
bool hasDeletedMessages(ID userId, ID dialogId, ID topicId) {
try {
return !storage.select(
columns(column<DeletedMessage>(&DeletedMessage::dialogId)),
return storage.count<DeletedMessage>(
where(
column<DeletedMessage>(&DeletedMessage::userId) == userId and
column<DeletedMessage>(&DeletedMessage::dialogId) == dialogId and
(column<DeletedMessage>(&DeletedMessage::topicId) == topicId or topicId == 0)
),
limit(1)
).empty();
)
) > 0;
} catch (std::exception &ex) {
LOG(("Failed to check if dialog has deleted message: %1").arg(ex.what()));
return false;

View file

@ -809,25 +809,6 @@ void SetupQoLToggles(not_null<Ui::VerticalLayout*> container) {
},
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(
container,
tr::ayu_LocalPremium(),

View file

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

View file

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

View file

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

View file

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