perf(Instagram - Customise story ring size): Clarify standard size in the setting#1265
Conversation
|
Ya I never tried |
| public static String UNLOCK_PLUS_BENEFITS = "Unlock Plus benefits"; | ||
| public static String UNLOCK_PLUS_BENEFITS_DESC = "Unlock 'Plus' subscription benefits that are checked locally. USE IT AT YOUR OWN RISK"; | ||
| public static String CUSTOMISE_STORY_RING_SIZE = "Customise story ring size"; | ||
| public static String CUSTOMISE_STORY_RING_SIZE_DESC = "Enter the percentage of story ring size. 100 is the standard and maximum size."; |
There was a problem hiding this comment.
100 is the default one but isn't the maximum size per say. I tried increasing it to 200 and it did work and the app didn't crash.
You can probably change it to just standard size
There was a problem hiding this comment.
Really? Values above 100 do not work on my end. Whether it's 120 or 200, the size is the same as 100.
However, if it works on your end, this might be an A/B test or something. I can remove "maximum" from the description.
There was a problem hiding this comment.
Based on DPI or something ig. On my tab, it reflects aka increases to 200+ but on my phone 100 is the max.
|
Please don't merge for now |
|
Ready ? |
## [3.5.0-dev.6](v3.5.0-dev.5...v3.5.0-dev.6) (2026-06-08) ### 🐛 Bug Fixes * **Instagram:** Check if `More options on profile` is patched before adding the button ([a8cfbab](a8cfbab)) ### ✨ New Features * **Instagram:** Added `Save media comment` patch ([b756d4b](b756d4b)) * **Instagram:** Added image variants download option ([5aca4b4](5aca4b4)) ### 🔧 Improvements * **Instagram:** Customise story ring size - Clarify standard size in the setting ([#1265](#1265)) ([d30a32e](d30a32e)) * **Instagram:** Added alternative logic for video variants ([45bf91f](45bf91f)) * **Instagram:** Added Debug option for comments & improved comment button loading ([2c827ed](2c827ed)) * **Twitter:** Make unofficial instance links optional for deeplinks ([6dea26b](6dea26b))
After the default settings value for this patch has been changed to 70, some users didn't know how to revert to the stock Instagram size, so I added the original value and instructions on how to set it in the settings screen.
Also, I removed the unnecessary ".0f" from the default value.
Since neither "." nor "f" can be entered in this setting, the ".0f" was meaningless.
I could allow decimal point input, but nobody would want to set the size down to the decimal point.
Furthermore, I changed
Float.valueOf()toFloat.parseFloat()because the IDE warned that the former was useless because it returns a non-primitiveFloatobject.I confirmed
parseFloat()can parse "70.0f" and the size changes correctly.p.s. This is the first time I've seen the code for the Instagram patches (Kotlin side).
I noticed that you're not using
instructionMatchesat all.Do you know Morphe's instructionMatches feature?
This allows each element of the instruction filter of the fingerprint to be used later within a patch.
To demonstrate a practical use case for it, I've refactored this patch using instructionMatches.
Before the introduction of instruction filters, it was necessary to match a specific literal value (in this case,
100.0f) using a custom fingerprint and then useindexOfFirstLiteralInstructionwithin the patch to search for that literal again.But now, if you specify an instruction in the filter, you can directly access the filter's matched instructions within the patch.
Therefore, you can write the patch more concisely.
It's no longer needed to extract the literal
100.0fas a constant.Another example is my ImportExportLoginTokenPatch.kt.
Here, I used
it.instructionMatches.last().indexto add an instruction immediately after the move-result-object of the layout inflator calling and receive that result.Instruction filters are one of Morphe's most distinctive features compared to the old Patcher.
It was also the direct cause of the split between ReVanced and Morphe.
This makes my experience writing patches in Morphe enjoyable.
I assume you will continue to develop new patches for Instagram, you can incorporate this new feature when you create a new patch.
For more details, please see here. (There is a point to note when adding instructions for multiple matches)
https://github.com/MorpheApp/morphe-patcher/blob/main/docs/2_2_1_fingerprinting.md
I just wanted to let you know in case you didn't know it yet.