From a46805591bae6aacc2a29c6c8865f7289f5d8d96 Mon Sep 17 00:00:00 2001 From: instant992 Date: Wed, 10 Jun 2026 09:34:35 +0400 Subject: [PATCH] Single-pass phone blur and add License section - BlurredTextSpan draws the text once with a 5dp blur (no more repeated draws); the number stays unreadable - Add a License section (GPL-2.0-or-later) to both READMEs noting the freedom to redistribute and the independent-fork disclaimer --- README.en.md | 14 ++++++++++++++ README.md | 15 +++++++++++++++ .../nekogram/helpers/BlurredTextSpan.java | 8 ++------ 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/README.en.md b/README.en.md index b868565e..a62447cc 100644 --- a/README.en.md +++ b/README.en.md @@ -71,3 +71,17 @@ The output APK is named `FoxiGram---.apk`. - `google-services.json`, signing keystores, and `local.properties` are not committed. Provide your own for release builds. - Based on Nekogram, which is based on Telegram for Android. + +## License + +This project is distributed under the **GNU General Public License v2.0 or +later** (GPL-2.0-or-later) — the same license as Telegram for Android and +Nekogram, on which it is based. + +This means you are free to use, modify and distribute the app, including sharing +it with other people. When you distribute it — original or modified — you must +make the source code available under the same terms and keep the attribution. + +FoxiGram is an independent fork and is not affiliated with official Telegram. +"Telegram", its logos and trademarks belong to their respective owners. + diff --git a/README.md b/README.md index fa02f0ae..93df7d0b 100644 --- a/README.md +++ b/README.md @@ -72,3 +72,18 @@ go build -buildmode=c-shared -o ../TMessagesProj/src/main/jniLibs/arm64-v8a/libx - `google-services.json`, ключи подписи и `local.properties` не хранятся в репозитории. Для релизной сборки подставьте свои. - Основан на Nekogram, который основан на Telegram для Android. + +## Лицензия + +Проект распространяется на условиях **GNU General Public License v2.0 или +новее** (GPL-2.0-or-later) — как и Telegram для Android и Nekogram, на которых +он основан. + +Это означает, что вы можете свободно использовать, изменять и распространять +приложение, в том числе передавать его другим людям. При распространении — +оригинального или изменённого — необходимо открывать исходный код на тех же +условиях и сохранять указание авторства. + +FoxiGram — независимый форк и не связан с официальным Telegram. Названия +«Telegram», логотипы и торговые марки принадлежат их правообладателям. + diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/helpers/BlurredTextSpan.java b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/helpers/BlurredTextSpan.java index df24b997..4558ba64 100644 --- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/helpers/BlurredTextSpan.java +++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/helpers/BlurredTextSpan.java @@ -31,7 +31,7 @@ public class BlurredTextSpan extends ReplacementSpan { private int cachePad; public BlurredTextSpan(String text) { - this(text, AndroidUtilities.dp(7f)); + this(text, AndroidUtilities.dp(5f)); } public BlurredTextSpan(String text, float blurRadius) { @@ -104,10 +104,6 @@ public class BlurredTextSpan extends ReplacementSpan { p.setColor(color); p.setTypeface(paint.getTypeface()); p.setMaskFilter(new BlurMaskFilter(blurRadius, BlurMaskFilter.Blur.NORMAL)); - // A strong blur fades the glyphs to near-transparency; draw the blurred - // text several times so it stays a dense, unreadable smudge. - for (int i = 0; i < 4; i++) { - c.drawText(text, pad, cacheBaseline, p); - } + c.drawText(text, pad, cacheBaseline, p); } }