Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(Bring back twitter): Optimize string replacement #440

Merged
merged 10 commits into from
Nov 11, 2024

Conversation

kitadai31
Copy link
Contributor

@kitadai31 kitadai31 commented Oct 20, 2024

https://t.me/pikopatches/1/17451

The current implementation has poor performance as it iterates over all string elements for each entry in the stringsMap.
DOM operations using Java XML API are expensive, but on the other hand, Map lookups are fast.
So, the string replacement should be done in a single iteration.

I tested performance on a very low-end phone (Snapdragon 410, 2GB RAM) with ReVanced Manager.

Before PR:

values: 2373 ms
values-en-rGB: 1886 ms
values-ru: 1983 ms
values-hi: 1986 ms
values-pt-rBR: 17 ms
values-tr: 1946 ms
values-zh-rCN: 1950 ms
values-zh-rTW: 2008 ms
Total: 14149 ms

After PR:

values: 631 ms
values-en-rGB: 339 ms
values-ru: 445 ms
values-hi: 453 ms
values-pt-rBR: 7 ms
values-tr: 367 ms
values-zh-rCN: 400 ms
values-zh-rTW: 392 ms
Total: 3034 ms

[ADDED]
Furthermore, with this change, adding more strings to the map will have little impact on the performance of the patch.
Thus, more "X" can be replaced with "Twiter".


I have a few questions before this PR is ready.

  • Do you really need to add strings that aren't present in the original strings.xml?

If a string does not exist in the original strings.xml, it was probably deleted from the app.
If so, I think adding it is no point because it will never displayed in the app.
In addition I can remove mutableStringsMap.

  • Do you really need to create a new string.xml when it doesn't exist?

In my opinion, it is not needed to create a new strings.xml even if a specific language string.xml is not found,
When users merged the split APKs, they may have removed unnecessary language splits, in which case this patch does not need to add strings.xml for languages ​​that do not exist.
Also, if a user unintentionally excludes the language split for their language, after applying this patch they will experience a strange situation where only the 60 strings included in this patch are translated.

At the time this patch was created, full APK of X was provided.
However, now that users have to merge the split APKs themselves, I believe that this behavior needs to be reconsidered.

  • What is // log which keys were not found or failed ?

I can't get what this comment means.
I think logging the missing strings is good idea instead of adding them silently.

@kitadai31 kitadai31 marked this pull request as draft October 20, 2024 10:16
@crimera
Copy link
Owner

crimera commented Oct 20, 2024

What is // log which keys were not found or failed ?

I think this is for testing that we forgot to remove.

Do you really need to create a new string.xml when it doesn't exist?

Do you really need to add strings that aren't present in the original strings.xml?

Fair points. Now that I look at the code, they really are redundant. One counter point. It may be that the original apk does not provide translations for the user's native language, so they create a custom translation for it. But seeing that no one actually did that, then I think it is safe to remove them after all.

@kitadai31
Copy link
Contributor Author

Should I add logging code for strings which was not found?

@IndusAryan
Copy link
Contributor

yeah, new implementation is a lot better

@kitadai31
Copy link
Contributor Author

kitadai31 commented Oct 20, 2024

Hey, after I submitted this PR, I found a old code in the git log that replaces all "X" with "Twitter".
And I was curious why it was slow, so I looked into it.
https://github.com/crimera/piko/blob/2c63ff1bc1444ed6d83f911becca4289001c306c/src/main/kotlin/crimera/patches/twitter/misc/bringbacktwitter/BringBackTwitterResourcePatch.kt

In conclusion, it was a problem with using setTextContent().

This part was causing the performance issue.

for (i in 0 until strings.length) {
    val string = strings.item(i) as Element
    if (!string.getAttribute("name").contains("api_key")) {
        string.textContent = string.textContent.replace("X", "Twitter")
    }
}

This code calls setTextContent() for each string. (= 6000-7000 times for each language.)
Kotlin makes setters like setTextContent() look like a simple assignment, but in reality setTextContent() is a very slow operation.
I tried rewriting this part like this:

for (i in 0 until strings.length) {
    val string = strings.item(i) as Element
    if (!string.getAttribute("name").contains("api_key")) {
        val text = string.textContent
        if (text.contains("X")) {
            string.textContent = text.replace("X", "Twitter")
        }
    }
}

This improved performance incredibly.

Old code:
res/values-de/strings.xml: 1325 ms
res/values-ko/strings.xml: 1272 ms
res/values-pt/strings.xml: 1220 ms
res/values-ro/strings.xml: 1256 ms
res/values-zh-rCN/strings.xml: 1231 ms
res/values-ar-rEH/strings.xml: 985 ms
res/values-hu/strings.xml: 1506 ms
res/values-fr/strings.xml: 1266 ms
res/values-ja/strings.xml: 1235 ms
res/values-uk/strings.xml: 1264 ms
res/values-it/strings.xml: 1236 ms
res/values-in/strings.xml: 1269 ms
res/values-pl/strings.xml: 1321 ms
res/values-hi/strings.xml: 1289 ms
res/values-ru/strings.xml: 1230 ms
res/values-ms/strings.xml: 1247 ms
res/values-th/strings.xml: 1214 ms
res/values-nl/strings.xml: 1293 ms
res/values-en-rGB/strings.xml: 1632 ms
res/values-zh-rTW/strings.xml: 1287 ms
res/values-zh-rHK/strings.xml: 1241 ms
res/values-es/strings.xml: 1297 ms
res/values-fi/strings.xml: 1250 ms
res/values-vi/strings.xml: 1299 ms
res/values-ar/strings.xml: 1303 ms
res/values-sv/strings.xml: 1257 ms
res/values-tr/strings.xml: 1290 ms
res/values/strings.xml: 2050 ms

↓↓↓↓↓↓

New code:
res/values-de/strings.xml: 128 ms
res/values-ko/strings.xml: 95 ms
res/values-pt/strings.xml: 70 ms
res/values-ro/strings.xml: 75 ms
res/values-zh-rCN/strings.xml: 74 ms
res/values-ar-rEH/strings.xml: 68 ms
res/values-hu/strings.xml: 70 ms
res/values-fr/strings.xml: 68 ms
res/values-ja/strings.xml: 57 ms
res/values-uk/strings.xml: 29 ms
res/values-it/strings.xml: 48 ms
res/values-in/strings.xml: 50 ms
res/values-pl/strings.xml: 48 ms
res/values-hi/strings.xml: 70 ms
res/values-ru/strings.xml: 61 ms
res/values-ms/strings.xml: 49 ms
res/values-th/strings.xml: 58 ms
res/values-nl/strings.xml: 51 ms
res/values-en-rGB/strings.xml: 50 ms
res/values-zh-rTW/strings.xml: 55 ms
res/values-zh-rHK/strings.xml: 57 ms
res/values-es/strings.xml: 51 ms
res/values-fi/strings.xml: 51 ms
res/values-vi/strings.xml: 99 ms
res/values-ar/strings.xml: 55 ms
res/values-sv/strings.xml: 51 ms
res/values-tr/strings.xml: 51 ms
res/values/strings.xml: 64 ms

Please note that this result is measured on a Windows PC with Ryzen 5 5500U + 8GB RAM using ReVanced CLI.
So this times cannot be comparable with the time above.
I have not tried the old code on the low-end phone, but it is not hard to imagine that the results would be very bad.

This execution time is almost the same as the current process using replacement map.
With this change, performance is no longer an issue, so in the future we could consider simply replacing all X with Twitter.

But this is beyond the scope of this PR.
I just tell this for your information.

@kitadai31
Copy link
Contributor Author

kitadai31 commented Oct 20, 2024

I pushed the change.
I left a log code that shows the number of strings which was not found.
Please check if this is fine.

However, a new problem with pt-rBR languages arose.
This patch has a pt-rBR strings map, but the X APK only has values-pt and doesn't have values-pt-rBR.
pt-rBR strings will not be applied after this change.

I don't know the difference between normal pt and pt-rBR, but if the strings in the pt_rBR map is taken directly from Twitter 9.98.0 apk, I think I can change values-pt-rBR to values-pt directly.

I'll look into it tomorrow or the day after tomorrow.

@crimera
Copy link
Owner

crimera commented Oct 20, 2024

pt-rBR languages

It's for Portuguese Region Brazil. It seems I missed this one. We actually need to create the strings for that.

@kitadai31
Copy link
Contributor Author

kitadai31 commented Oct 22, 2024

After researched pt_rBR strings in this patch, I found that the grammar and wording was slightly different from the normal Portuguese (values-pt) contained in the original X APK, and that it was indeed Brazilian Portuguese.

One counter point. It may be that the original apk does not provide translations for the user's native language, so they create a custom translation for it.

This was real...

However, for other languages ​​it is still preferable not to add strings.xml if it does not exist.
Therefore, I'm moving the pt_rBR to customstringsupdater and adding custom logic for Brazilian Portuguese like Japanese.
It creates pt-rBR strings.xml and adds strings, instead of replacing existing strings.xml.

@r7kings Hello, if I'm correct, you are the one who created the pt_rBR strings in this patch.
Is my plan correct?
Is the pt_rBR string intended to be added to the newly created values-pt-rBR directory, and not to the existing values-pt directory, right?


After that, I will resolve conflicts.
But I can see some debug codes (?) in c20e16f.
measureExecutionTime and println("parsing: ${stringsFile.parent}")

@crimera Is this intended? Should I keep these code after merging conflicts?

@crimera
Copy link
Owner

crimera commented Oct 22, 2024

Should I keep these code after merging conflicts?

Nah, I forgot to remove it.

Oops, accidentally closed the issue. My bad, I just woke up and misclicked

@crimera crimera closed this Oct 22, 2024
@crimera crimera reopened this Oct 22, 2024
# Conflicts:
#	src/main/kotlin/crimera/patches/twitter/misc/bringbacktwitter/BringBackTwitterResourcePatch.kt
# Conflicts:
#	src/main/kotlin/crimera/patches/twitter/misc/bringbacktwitter/BringBackTwitterResourcePatch.kt
When user removed some languages from split apk and SettingsPatch was executed prior to this patch, this log always show warnings because SettingsPatch adds other languages.
@kitadai31 kitadai31 marked this pull request as ready for review November 10, 2024 08:39
@kitadai31
Copy link
Contributor Author

kitadai31 commented Nov 10, 2024

Sorry for the late reply.
I pushed the changes, and this PR is now ready to be reviewed or merged.

By the way, I removed the missing strings logs at 3448546.

It turned out that when user removed some languages from split apk and SettingsPatch was applied prior to this patch, this log always show warnings because SettingsPatch adds other languages files.
For example, when a user chose only English split when merging split APKs, this log show a warning for each en-rGB, ru, hi, tr, zh-rCN, and zh-rTW languages that says "60 keys were not found in ..."

Therefore, I removed the log.

(If you still think the log is needed, please let me know.)

@kitadai31
Copy link
Contributor Author

I forgot to tell you one important thing.
Sincerely, please merge with squash and merge.

When I resolved the conflict on my local repository, I should have rebased the working branch on the dev branch instead of merging the dev branch. 😅
(Many "Merge branch 'refs/heads/dev' into fix/bring-back-twitter-performance")
As a result, this commit log is dirty, so doing a normal merge will mess up the commit log. 😅

@crimera crimera merged commit 7e61023 into crimera:dev Nov 11, 2024
1 check passed
crimera pushed a commit that referenced this pull request Nov 11, 2024
## [1.44.1-dev.2](v1.44.1-dev.1...v1.44.1-dev.2) (2024-11-11)

### Perfomance

* **Bring back twitter:** Optimize string replacement ([#440](#440)) ([7e61023](7e61023))
crimera pushed a commit that referenced this pull request Nov 14, 2024
## [1.45.0](v1.44.0...v1.45.0) (2024-11-14)

### Bug Fixes

* **Twitter:** Share menu button add hook in/from 10.67 ([a640946](a640946))

### Features

* **Twitter:** Added `Customise post font size` patch ([ea608e0](ea608e0))

### Refactors

* **Twitter:** refactor values of list preference ([e0e5c5b](e0e5c5b))

### Perfomance

* **Bring back twitter:** Optimize string replacement ([#440](#440)) ([7e61023](7e61023))
@kitadai31 kitadai31 deleted the fix/bring-back-twitter-performance branch January 19, 2025 07:48
github-actions bot pushed a commit to okkidwi/piko that referenced this pull request Jan 20, 2025
## [1.22.0-dev.1](v1.21.0...v1.22.0-dev.1) (2025-01-20)

### Bug Fixes

* add "SettingsStatusLoadFingerprint" to fingerprints of `Hide Community Notes` and `Hide Live Threads` patch ([9c0232a](9c0232a))
* **Bring back twitter:** Change the character "𝕏" into "Twitter". ([crimera#441](https://github.com/okkidwi/piko/issues/441)) ([c20e16f](c20e16f))
* **Bring back twitter:** Change x icon to legacy twitter. ([3006f47](3006f47))
* **Custom download folder:** Restore compatibility with versions prior to 10.64 ([b88b00b](b88b00b))
* **Custom downloader:** Improve fingerprint ([2a2a4a4](2a2a4a4))
* **Feature Flags:** Use ListView instead of RecyclerView for a more reliable list. ([6f16b7f](6f16b7f))
* Fix crash when opening feature flags ([2b1484d](2b1484d))
* Fix oopsie ([2af661f](2af661f))
* Improve getUsername fingerprint ([af617af](af617af))
* Missing `,` ([67675fe](67675fe))
* Not creating `values-night-v31` dir ([e3f3491](e3f3491))
* Opening mod settings with root installation results in crash ([8161644](8161644))
* Opening mod settings with root installation results in crash ([47e7670](47e7670))
* Remove debug prints ([33e4d08](33e4d08))
* Remove duplicate strings ([94c6642](94c6642))
* **Remove Google Ad:** Include ads in the comments ([79d6e35](79d6e35))
* Resource strings getting corrupted, resulting on failure to patch on revanced manager ([crimera#439](https://github.com/okkidwi/piko/issues/439)) ([1763137](1763137))
* switch jp to ja for Japanese translation ([c13cc87](c13cc87))
* tweet highlight color on hold ([crimera#243](https://github.com/okkidwi/piko/issues/243)) ([b22ea42](b22ea42))
* **Twitter:** `Customize Navigation Bar items` in/from `10.53.0-beta.1` ([e8154fb](e8154fb))
* **Twitter:** Add support for version 10.64.0-beta.1 ([c81378d](c81378d))
* **Twitter:** Bookmark in nav bar dix ([03fb96c](03fb96c))
* **Twitter:** Bookmark nav bar fix ([a6e8ab9](a6e8ab9))
* **Twitter:** Change patch name from `Enable app icon settings` -> `Enable app icons` ([5a7ef46](5a7ef46))
* **Twitter:** fix `Control video auto scroll` in 10.57 ([b7ae78c](b7ae78c))
* **Twitter:** Fix `Customize profile tabs` crash after `10.43` ([a38d621](a38d621))
* **Twitter:** fix `Enable app icon settings` patch ([c2b6f79](c2b6f79))
* **Twitter:** Fix `Hide nudge button` patch ([d7572fe](d7572fe))
* **Twitter:** Fix `Hide Promoted Trends` patch ([7052d25](7052d25))
* **Twitter:** Fix `Remove premium upsell` patch ([4df5e32](4df5e32))
* **Twitter:** fix `Remove videos for you` patch ([b19f943](b19f943))
* **Twitter:** Fix aapt breakage due to tag mismatch ([730a51c](730a51c))
* **Twitter:** fix video entity hook in `10.58` ([e8a833d](e8a833d))
* **Twitter:** Missing download option in immersive view ([6b0aa2c](6b0aa2c))
* **Twitter:** Share menu button add hook in/from 10.67 ([a640946](a640946))
* unescaped character on `pl` string values ([a6444be](a6444be))
* Unescaped characters ([8e539df](8e539df))
* URL decode path to JAR containing spaces by osumatrix ([e6671ba](e6671ba))
* Use UrlDecoder API available in older Android versions ([d9e6374](d9e6374))

### Features

* Add toggle for `Open browser chooser on opening links` patch ([6f217f0](6f217f0))
* **all:** Added `Export all activities` patch from ReVanced ([7cc405f](7cc405f))
* **Bring back twitter:** Add Japanese ([4eb08b5](4eb08b5))
* **Customize side bar items:** Allow for hiding of the "Jobs" item ([14ce811](14ce811))
* Enable recent patches by default ([e84f358](e84f358))
* **Hook feature flag:** Added ability to search for supported flags. ([28a2c0a](28a2c0a))
* Quick settings button is now optional ([e9e54e5](e9e54e5))
* Remove throw file ([86bff99](86bff99))
* **Translations:** Add `Turkish` ([bf70b91](bf70b91))
* **Translations:** Add Arabic translations ([c1d797b](c1d797b))
* **Translations:** Add Brazilian Portuguese translations [Bring back Twitter] ([3a831d3](3a831d3))
* **Translations:** Add japanese ([c123d8e](c123d8e))
* **Translations:** Add polish translation ([8102f35](8102f35))
* **Translations:** Add simplified Chinese translation ([7662a34](7662a34))
* **Translations:** Add Simplified Chinese translations and Taiwanese Traditional Chinese translations[Bring back Twitter] ([d44bfd7](d44bfd7))
* **Translations:** Added Traditional Chinese translation ([1c0b10a](1c0b10a))
* **Translations:** Fix Simplified Chinese Translation ([ec0a3dc](ec0a3dc))
* **Translations:** Update `japanese` ([444623f](444623f))
* **Translations:** Update `japanese` ([f5ece19](f5ece19))
* **Translations:** Update Russian translation ([54ba664](54ba664))
* **Translations:** Update Russian translation ([3606c10](3606c10))
* **Translations:** Updated Brazilian Portuguese ([e25ec0e](e25ec0e))
* **Translations:** Updated Brazilian Portuguese ([45aac73](45aac73))
* **Translations:** Updated Traditional Chinese string-zh-rCN.xml ([6cc2373](6cc2373))
* **Translations:** Updated Traditional Chinese string-zh-rTW.xml ([6787c28](6787c28))
* **translation:** Update Simplified Chinese translation ([4f3027a](4f3027a))
* **Translation:** Update Simplified Chinese translation ([b9fe0e8](b9fe0e8))
* **Twitter:** Added `Ability to copy video media link` patch ([14bfdc7](14bfdc7))
* **Twitter:** Added `Control video auto scroll` patch ([7a21924](7a21924))
* **Twitter:** Added `Custom downloader` ([3d5941e](3d5941e))
* **Twitter:** Added `Custom translator` patch ([737fb9e](737fb9e))
* **Twitter:** Added `Customise post font size` patch ([ea608e0](ea608e0))
* **Twitter:** Added `Customize explore tabs` patch ([4be6a7f](4be6a7f))
* **Twitter:** Added `Customize Inline action Bar items` patch ([05b06f9](05b06f9))
* **Twitter:** Added `Customize Navigation Bar items` patch ([9c6f59c](9c6f59c))
* **Twitter:** Added `Customize reply sort filter` patch ([121b8a6](121b8a6))
* **Twitter:** Added `Customize search suggestions` patch ([aaca565](aaca565))
* **Twitter:** Added `Customize search tab items` patch ([9edc97a](9edc97a))
* **Twitter:** Added `Customize side bar items` patch ([ca0d28f](ca0d28f))
* **Twitter:** Added `Customize timeline top bar` patch ([245c5f6](245c5f6))
* **Twitter:** Added `Debug Menu` patch ([7d5ca77](7d5ca77))
* **Twitter:** Added `Delete from database` patch ([d785660](d785660))
* **Twitter:** Added `Disable auto timeline scroll on launch` patch ([b8d431e](b8d431e))
* **Twitter:** Added `Enable app downgrading` patch ([9f581ce](9f581ce))
* **Twitter:** Added `Enable force HD videos` patch ([d316612](d316612))
* **Twitter:** Added `Enable PiP mode automatically` patch ([59d6b67](59d6b67))
* **Twitter:** Added `Hide Buy Premium Banner` patch ([7ba6419](7ba6419))
* **Twitter:** Added `Hide followed by context` patch ([261e1d0](261e1d0))
* **Twitter:** Added `Hide hidden replies` patch ([431acc4](431acc4))
* **Twitter:** Added `Hide nudge button` patch ([ad27484](ad27484))
* **Twitter:** Added `Patch info` section ([7f794c3](7f794c3))
* **Twitter:** Added `Profile tabs customisation` ([db0298b](db0298b))
* **Twitter:** Added `Remove main event` patch ([806598d](806598d))
* **Twitter:** Added `Remove premium upsell` patch ([37525de](37525de))
* **Twitter:** Added `Remove top people in search` patch ([95b5ef9](95b5ef9))
* **Twitter:** Added `Remove videos for you` patch ([25934a2](25934a2))
* **Twitter:** Added `Round off numbers` patch ([b1c1b13](b1c1b13))
* **Twitter:** Added ability to export and import prefs & feature flags ([01cdd6b](01cdd6b))
* **Twitter:** Added ability to export and import prefs & feature flags ([a591133](a591133))
* **Twitter:** Added ability to reset pref and flags ([4aaeb09](4aaeb09))
* **Twitter:** Added Remember filter for `Customize reply sort filter` ([24df398](24df398))
* **Twitter:** Added tab redirects hook (for Bookmark Navbar) ([f01b418](f01b418))
* **Twitter:** Custom deeplinks ([325a281](325a281))
* **ui:** app wide monet theming in light mode ([46f920b](46f920b))
* **ui:** full app wide material theming in dim mode replacing dark blue ([52d7444](52d7444))
* use browser chooser when opening links ([cc165f4](cc165f4))

### Updates

* Add spanish to languages ([e9b8efd](e9b8efd))
* **Bring back twitter:** Create strings file if not found ([9f51a5c](9f51a5c))
* **Custom sharing domain:** require settings patch also turned it on by default. ([6a3777f](6a3777f))
* Enable `Customize profile tabs` patch by default ([a8543bf](a8543bf))
* Enable `Hide Live Threads` patch by default ([b9862b5](b9862b5))
* **Hook feature flag:** Improve flag matching in search. ([d7f0827](d7f0827))
* Improve quick settings appearance ([6dc27b4](6dc27b4))
* Improve the retrieval of the patches version ([ba940da](ba940da))
* Improved the hooking of the recyclerview methods. also fixes the crash when opening feature flags. ([25e5bc4](25e5bc4))
* Russian translation ([42b68e9](42b68e9))
* Translation updates ([509dfbb](509dfbb))
* Translations ([d3ae8ec](d3ae8ec))
* **Translations:** Improved & updates polish translations ([9bbb9f4](9bbb9f4))
* **Translations:** Translation updates ([4bf8a8d](4bf8a8d))
* **Translations:** Update `Indonesian (Bahasa)` ([1442b6c](1442b6c))
* **Translations:** Update `Indonesian (Bahasa)` ([b9488d6](b9488d6))
* **Translations:** Update `japanese` ([9fce4a2](9fce4a2))
* **Translations:** Update `Japanese` ([b326d10](b326d10))
* **Translations:** Update Brazilian Portuguese ([8745f61](8745f61))
* **Translations:** Update Brazilian Portuguese ([7de9493](7de9493))
* **Translations:** Update Japanese ([61ff288](61ff288))
* **Translations:** Update polish ([9d8f4fc](9d8f4fc))
* **Translations:** Update polish translations ([6200d65](6200d65))
* **Translations:** Update Russian translation ([8b1c4c8](8b1c4c8))
* **Translations:** update simplified chinese translation ([3e5a8fd](3e5a8fd))
* **Translations:** update simplified chinese translation ([b24f7cc](b24f7cc))
* **Translations:** Update simplified chinese translation ([147cb29](147cb29))
* **Translations:** Update translations ([9686863](9686863))
* **Translations:** Update Turkish translations ([bab6ae9](bab6ae9))
* **Translation:** Update Hindi translations [Bring back Twitter] ([20ac044](20ac044))
* **Twitter:** Added hide 'Settings and privacy' in `Customize side bar items` ([cb01885](cb01885))
* **Twitter:** Added strings ([fad9b1a](fad9b1a))
* **Twitter:** Change Quick Btn path ([7febdf6](7febdf6))
* **Twitter:** Enable new patches by default ([19f9149](19f9149))
* **Twitter:** Updated `Enable force HD videos` patch description ([86ea041](86ea041))
* **Twitter:** updated string ([60afc68](60afc68))
* **Twitter:** Updated strings ([3cb159e](3cb159e))

### Refactors

* Add `enableSettings` helper function ([7d6ebd5](7d6ebd5))
* Add `SettingsPatch ` dependencies to patches ([6d252f8](6d252f8))
* **Custom Downloader:** Improve getting of tweet method declarations ([5237e49](5237e49))
* Optimize imports ([2f42add](2f42add))
* **Twitter:** `Add ability to copy media link` patch ([e8ef551](e8ef551))
* **Twitter:** Added 'Native features' section ([12d2bda](12d2bda))
* **Twitter:** Added `No shortened URL` as a settings toggle ([ea33a30](ea33a30))
* **Twitter:** Added missing patches names ([b3fda95](b3fda95))
* **Twitter:** Added multiple language support for `Bring back twitter` ([9eacab3](9eacab3))
* **Twitter:** Added Native download filename customization ([99a10b1](99a10b1))
* **Twitter:** Added quick settings button in side drawer ([c0152e3](c0152e3))
* **Twitter:** Added toggle for `Show sensitive media` patch ([cac4fe7](cac4fe7))
* **Twitter:** Change translator icon ([bf5f027](bf5f027))
* **Twitter:** Changed `Top Articles ` string ([b590695](b590695))
* **Twitter:** Combined `customize patch` into single class ([6c04aed](6c04aed))
* **Twitter:** Force enable `Enable app icon settings` patch ([ee605f1](ee605f1))
* **Twitter:** load `Utils.load()` dynamically ([5379276](5379276))
* **Twitter:** Major string changes ([f22fdf0](f22fdf0))
* **Twitter:** More strings refactor ([d5a629f](d5a629f))
* **Twitter:** Rearrange `Bring back twitter` resources ([a476924](a476924))
* **Twitter:** refactor `Custom downloader` patch ([42cc752](42cc752))
* **Twitter:** Refactor `Custom downloader` patch ([1e966f7](1e966f7))
* **Twitter:** Refactor `Enable app icon settings` patch ([e7b3d0e](e7b3d0e))
* **Twitter:** refactor default feature flag hook ([6fd6001](6fd6001))
* **Twitter:** Refactor hooks filename ([2daa292](2daa292))
* **Twitter:** refactor values of list preference ([e0e5c5b](e0e5c5b))
* **Twitter:** renamed 'Share menu button' fingerprints to hooks ([395c221](395c221))
* **Twitter:** Renamed patch `Remove Buy Premium Banner` to `Remove message prompts Banner` ([45dbad8](45dbad8))
* **Twitter:** Separated `App icon` and `Navigation icon` patch ([8a67f12](8a67f12))
* **Twitter:** Seperated/Added `Remove superhero event` patch ([d60ee17](d60ee17))
* **Twitter:** Strings in 'Customization' ([c52c2c0](c52c2c0))
* **Twitter:** Strings in 'Customization' ([a75221b](a75221b))
* **Twitter:** Strings refactor ([2db8866](2db8866))
* **Twitter:** updated profile tab string ([1af7846](1af7846))

### Perfomance

* **Bring back twitter:** Optimize string replacement ([crimera#440](https://github.com/okkidwi/piko/issues/440)) ([7e61023](7e61023))
github-actions bot pushed a commit to chemchetchagio/piko that referenced this pull request Jan 26, 2025
## [1.31.0](v1.30.2...v1.31.0) (2025-01-26)

### Bug Fixes

* **Bring back twitter:** Change the character "𝕏" into "Twitter". ([crimera#441](https://github.com/chemchetchagio/piko/issues/441)) ([c20e16f](c20e16f))
* **Bring back twitter:** Change x icon to legacy twitter. ([3006f47](3006f47))
* **Custom download folder:** Restore compatibility with versions prior to 10.64 ([b88b00b](b88b00b))
* **Custom downloader:** Improve fingerprint ([2a2a4a4](2a2a4a4))
* **Feature Flags:** Use ListView instead of RecyclerView for a more reliable list. ([6f16b7f](6f16b7f))
* Fix crash when opening feature flags ([2b1484d](2b1484d))
* Improve getUsername fingerprint ([af617af](af617af))
* Remove debug prints ([33e4d08](33e4d08))
* Remove duplicate strings ([94c6642](94c6642))
* **Remove Google Ad:** Include ads in the comments ([79d6e35](79d6e35))
* Resource strings getting corrupted, resulting on failure to patch on revanced manager ([crimera#439](https://github.com/chemchetchagio/piko/issues/439)) ([1763137](1763137))
* **Twitter:** `Customize Navigation Bar items` in/from `10.53.0-beta.1` ([e8154fb](e8154fb))
* **Twitter:** Add support for version 10.64.0-beta.1 ([c81378d](c81378d))
* **Twitter:** Change patch name from `Enable app icon settings` -> `Enable app icons` ([5a7ef46](5a7ef46))
* **Twitter:** fix `Control video auto scroll` in 10.57 ([b7ae78c](b7ae78c))
* **Twitter:** fix `Enable app icon settings` patch ([c2b6f79](c2b6f79))
* **Twitter:** Fix `Hide nudge button` patch ([d7572fe](d7572fe))
* **Twitter:** Fix `Remove premium upsell` patch ([4df5e32](4df5e32))
* **Twitter:** fix `Remove videos for you` patch ([b19f943](b19f943))
* **Twitter:** Fix aapt breakage due to tag mismatch ([730a51c](730a51c))
* **Twitter:** fix video entity hook in `10.58` ([e8a833d](e8a833d))
* **Twitter:** Missing download option in immersive view ([6b0aa2c](6b0aa2c))
* **Twitter:** Share menu button add hook in/from 10.67 ([a640946](a640946))

### Features

* **all:** Added `Export all activities` patch from ReVanced ([7cc405f](7cc405f))
* **Bring back twitter:** Add Japanese ([4eb08b5](4eb08b5))
* **Customize side bar items:** Allow for hiding of the "Jobs" item ([14ce811](14ce811))
* Enable recent patches by default ([e84f358](e84f358))
* **Hook feature flag:** Added ability to search for supported flags. ([28a2c0a](28a2c0a))
* Quick settings button is now optional ([e9e54e5](e9e54e5))
* **Translations:** Updated Traditional Chinese string-zh-rCN.xml ([6cc2373](6cc2373))
* **Translations:** Updated Traditional Chinese string-zh-rTW.xml ([6787c28](6787c28))
* **Twitter:** Added `Control video auto scroll` patch ([7a21924](7a21924))
* **Twitter:** Added `Custom downloader` ([3d5941e](3d5941e))
* **Twitter:** Added `Custom translator` patch ([737fb9e](737fb9e))
* **Twitter:** Added `Customise post font size` patch ([ea608e0](ea608e0))
* **Twitter:** Added `Customize explore tabs` patch ([4be6a7f](4be6a7f))
* **Twitter:** Added `Customize reply sort filter` patch ([121b8a6](121b8a6))
* **Twitter:** Added `Customize search suggestions` patch ([aaca565](aaca565))
* **Twitter:** Added `Customize search tab items` patch ([9edc97a](9edc97a))
* **Twitter:** Added `Delete from database` patch ([d785660](d785660))
* **Twitter:** Added `Enable force HD videos` patch ([d316612](d316612))
* **Twitter:** Added `Enable PiP mode automatically` patch ([59d6b67](59d6b67))
* **Twitter:** Added `Hide followed by context` patch ([261e1d0](261e1d0))
* **Twitter:** Added `Hide nudge button` patch ([ad27484](ad27484))
* **Twitter:** Added `Remove main event` patch ([806598d](806598d))
* **Twitter:** Added `Remove premium upsell` patch ([37525de](37525de))
* **Twitter:** Added `Remove top people in search` patch ([95b5ef9](95b5ef9))
* **Twitter:** Added `Remove videos for you` patch ([25934a2](25934a2))
* **Twitter:** Added Remember filter for `Customize reply sort filter` ([24df398](24df398))
* **Twitter:** Added tab redirects hook (for Bookmark Navbar) ([f01b418](f01b418))
* **Twitter:** Custom deeplinks ([325a281](325a281))

### Updates

* Add spanish to languages ([e9b8efd](e9b8efd))
* Enable `Customize profile tabs` patch by default ([a8543bf](a8543bf))
* Enable `Hide Live Threads` patch by default ([b9862b5](b9862b5))
* **Hook feature flag:** Improve flag matching in search. ([d7f0827](d7f0827))
* Improve quick settings appearance ([6dc27b4](6dc27b4))
* Improved the hooking of the recyclerview methods. also fixes the crash when opening feature flags. ([25e5bc4](25e5bc4))
* Russian translation ([42b68e9](42b68e9))
* Translation updates ([509dfbb](509dfbb))
* **Translations:** Translation updates ([4bf8a8d](4bf8a8d))
* **Translations:** Update `Japanese` ([b326d10](b326d10))
* **Translations:** Update translations ([9686863](9686863))
* **Twitter:** Added hide 'Settings and privacy' in `Customize side bar items` ([cb01885](cb01885))
* **Twitter:** Added strings ([fad9b1a](fad9b1a))
* **Twitter:** Change Quick Btn path ([7febdf6](7febdf6))
* **Twitter:** Updated `Enable force HD videos` patch description ([86ea041](86ea041))
* **Twitter:** updated string ([60afc68](60afc68))
* **Twitter:** Updated strings ([3cb159e](3cb159e))

### Refactors

* **Custom Downloader:** Improve getting of tweet method declarations ([5237e49](5237e49))
* **Twitter:** Added 'Native features' section ([12d2bda](12d2bda))
* **Twitter:** Added Native download filename customization ([99a10b1](99a10b1))
* **Twitter:** Added quick settings button in side drawer ([c0152e3](c0152e3))
* **Twitter:** Added toggle for `Show sensitive media` patch ([cac4fe7](cac4fe7))
* **Twitter:** Change translator icon ([bf5f027](bf5f027))
* **Twitter:** Changed `Top Articles ` string ([b590695](b590695))
* **Twitter:** Major string changes ([f22fdf0](f22fdf0))
* **Twitter:** More strings refactor ([d5a629f](d5a629f))
* **Twitter:** refactor `Custom downloader` patch ([42cc752](42cc752))
* **Twitter:** Refactor `Custom downloader` patch ([1e966f7](1e966f7))
* **Twitter:** Refactor hooks filename ([2daa292](2daa292))
* **Twitter:** refactor values of list preference ([e0e5c5b](e0e5c5b))
* **Twitter:** renamed 'Share menu button' fingerprints to hooks ([395c221](395c221))
* **Twitter:** Seperated/Added `Remove superhero event` patch ([d60ee17](d60ee17))
* **Twitter:** Strings in 'Customization' ([c52c2c0](c52c2c0))
* **Twitter:** Strings in 'Customization' ([a75221b](a75221b))
* **Twitter:** Strings refactor ([2db8866](2db8866))

### Perfomance

* **Bring back twitter:** Optimize string replacement ([crimera#440](https://github.com/chemchetchagio/piko/issues/440)) ([7e61023](7e61023))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants