From b8ea365ca8eb801f8c8442f2f9ab439343ed8b8f Mon Sep 17 00:00:00 2001 From: azahi Date: Tue, 14 Jan 2025 13:27:50 +0300 Subject: 2025-01-14 --- packages/prismlauncher-no-login.patch | 65 +++++++++++++++++++++++++++++++++++ packages/telegram-no-ads.patch | 61 ++++++++++++++++++++++++++++++++ packages/vesktop-no-anime.patch | 17 +++++++++ packages/vesktop.patch | 17 --------- 4 files changed, 143 insertions(+), 17 deletions(-) create mode 100644 packages/prismlauncher-no-login.patch create mode 100644 packages/telegram-no-ads.patch create mode 100644 packages/vesktop-no-anime.patch delete mode 100644 packages/vesktop.patch (limited to 'packages') diff --git a/packages/prismlauncher-no-login.patch b/packages/prismlauncher-no-login.patch new file mode 100644 index 0000000..033cb1a --- /dev/null +++ b/packages/prismlauncher-no-login.patch @@ -0,0 +1,65 @@ +diff --git c/launcher/Application.cpp w/launcher/Application.cpp +index b8dcc1099..29a84ba85 100644 +--- c/launcher/Application.cpp ++++ w/launcher/Application.cpp +@@ -1094,7 +1094,7 @@ bool Application::createSetupWizard() + bool pasteInterventionRequired = settings()->get("PastebinURL") != ""; + bool validWidgets = m_themeManager->isValidApplicationTheme(settings()->get("ApplicationTheme").toString()); + bool validIcons = m_themeManager->isValidIconTheme(settings()->get("IconTheme").toString()); +- bool login = !m_accounts->anyAccountIsValid() && capabilities() & Application::SupportsMSA; ++ bool login = false; + bool themeInterventionRequired = !validWidgets || !validIcons; + bool wizardRequired = javaRequired || languageRequired || pasteInterventionRequired || themeInterventionRequired || askjava || login; + if (wizardRequired) { +diff --git c/launcher/LaunchController.cpp w/launcher/LaunchController.cpp +index 687da1322..2bab547e8 100644 +--- c/launcher/LaunchController.cpp ++++ w/launcher/LaunchController.cpp +@@ -84,27 +84,8 @@ void LaunchController::decideAccount() + return; + } + +- // Find an account to use. +- auto accounts = APPLICATION->accounts(); +- if (accounts->count() <= 0 || !accounts->anyAccountIsValid()) { +- // Tell the user they need to log in at least one account in order to play. +- auto reply = CustomMessageBox::selectable(m_parentWidget, tr("No Accounts"), +- tr("In order to play Minecraft, you must have at least one Microsoft " +- "account which owns Minecraft logged in. " +- "Would you like to open the account manager to add an account now?"), +- QMessageBox::Information, QMessageBox::Yes | QMessageBox::No) +- ->exec(); +- +- if (reply == QMessageBox::Yes) { +- // Open the account manager. +- APPLICATION->ShowGlobalSettings(m_parentWidget, "accounts"); +- } else if (reply == QMessageBox::No) { +- // Do not open "profile select" dialog. +- return; +- } +- } +- + // Select the account to use. If the instance has a specific account set, that will be used. Otherwise, the default account will be used ++ auto accounts = APPLICATION->accounts(); + auto instanceAccountId = m_instance->settings()->get("InstanceAccountId").toString(); + auto instanceAccountIndex = accounts->findAccountByProfileId(instanceAccountId); + if (instanceAccountIndex == -1 || instanceAccountId.isEmpty()) { +diff --git c/launcher/ui/pages/global/AccountListPage.cpp w/launcher/ui/pages/global/AccountListPage.cpp +index 041b8faff..90eb6becf 100644 +--- c/launcher/ui/pages/global/AccountListPage.cpp ++++ w/launcher/ui/pages/global/AccountListPage.cpp +@@ -141,14 +141,6 @@ void AccountListPage::on_actionAddMicrosoft_triggered() + + void AccountListPage::on_actionAddOffline_triggered() + { +- if (!m_accounts->anyAccountIsValid()) { +- QMessageBox::warning(this, tr("Error"), +- tr("You must add a Microsoft account that owns Minecraft before you can add an offline account." +- "

" +- "If you have lost your account you can contact Microsoft for support.")); +- return; +- } +- + MinecraftAccountPtr account = + OfflineLoginDialog::newAccount(this, tr("Please enter your desired username to add your offline account.")); + diff --git a/packages/telegram-no-ads.patch b/packages/telegram-no-ads.patch new file mode 100644 index 0000000..1b34920 --- /dev/null +++ b/packages/telegram-no-ads.patch @@ -0,0 +1,61 @@ +diff --git i/Telegram/SourceFiles/data/components/sponsored_messages.cpp w/Telegram/SourceFiles/data/components/sponsored_messages.cpp +index 5ae9d8b2c..f116246b5 100644 +--- i/Telegram/SourceFiles/data/components/sponsored_messages.cpp ++++ w/Telegram/SourceFiles/data/components/sponsored_messages.cpp +@@ -27,7 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + namespace Data { + namespace { + +-constexpr auto kRequestTimeLimit = 5 * 60 * crl::time(1000); ++constexpr auto kRequestTimeLimit = 9999999 * 60 * crl::time(1000); + + [[nodiscard]] bool TooEarlyForRequest(crl::time received) { + return (received > 0) && (received + kRequestTimeLimit > crl::now()); +@@ -74,6 +74,9 @@ void SponsoredMessages::clearOldRequests() { + + SponsoredMessages::AppendResult SponsoredMessages::append( + not_null history) { ++ if (1) { ++ return; ++ } + if (isTopBarFor(history)) { + return SponsoredMessages::AppendResult::None; + } +@@ -110,6 +113,9 @@ void SponsoredMessages::inject( + MsgId injectAfterMsgId, + int betweenHeight, + int fallbackWidth) { ++ if (1) { ++ return; ++ } + if (!canHaveFor(history)) { + return; + } +@@ -210,24 +216,17 @@ void SponsoredMessages::inject( + } + + bool SponsoredMessages::canHaveFor(not_null history) const { +- if (history->peer->isChannel()) { +- return true; +- } else if (const auto user = history->peer->asUser()) { +- return user->isBot(); +- } + return false; + } + + bool SponsoredMessages::isTopBarFor(not_null history) const { +- if (peerIsUser(history->peer->id)) { +- if (const auto user = history->peer->asUser()) { +- return user->isBot(); +- } +- } + return false; + } + + void SponsoredMessages::request(not_null history, Fn done) { ++ if (1) { ++ return; ++ } + if (!canHaveFor(history)) { + return; + } diff --git a/packages/vesktop-no-anime.patch b/packages/vesktop-no-anime.patch new file mode 100644 index 0000000..5fd97ef --- /dev/null +++ b/packages/vesktop-no-anime.patch @@ -0,0 +1,17 @@ +diff --git i/static/views/splash.html w/static/views/splash.html +index 7cb571b..519c0f6 100644 +--- i/static/views/splash.html ++++ w/static/views/splash.html +@@ -30,12 +30,6 @@ + + +
+- shiggy +

Loading Vesktop...

+
+ diff --git a/packages/vesktop.patch b/packages/vesktop.patch deleted file mode 100644 index 5fd97ef..0000000 --- a/packages/vesktop.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git i/static/views/splash.html w/static/views/splash.html -index 7cb571b..519c0f6 100644 ---- i/static/views/splash.html -+++ w/static/views/splash.html -@@ -30,12 +30,6 @@ - - -
-- shiggy -

Loading Vesktop...

-
- -- cgit 1.4.1