Skip to content

Commit

Permalink
feat: force enable enter in desc editing
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonLeeeaf committed Aug 1, 2024
1 parent 0cc1859 commit 47828c8
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 19 deletions.
43 changes: 29 additions & 14 deletions .androidide/editor/openedFiles.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
{
"allFiles": [
{
"file": "/storage/emulated/0/MoonLeaf/Projects/FuckMaoNemo/app/src/main/res/xml/config.xml",
"selection": {
"end": {
"column": 83,
"index": 3436,
"line": 97
},
"start": {
"column": 83,
"index": 3436,
"line": 97
}
}
},
{
"file": "/storage/emulated/0/MoonLeaf/Projects/FuckMaoNemo/app/src/main/java/io/github/moonleeeaf/fuckmaonemo/Hook.java",
"selection": {
"end": {
"column": 17,
"index": 6820,
"line": 170
"column": 58,
"index": 8459,
"line": 207
},
"start": {
"column": 17,
"index": 6820,
"line": 170
"column": 58,
"index": 8459,
"line": 207
}
}
},
{
"file": "/storage/emulated/0/MoonLeaf/Projects/FuckMaoNemo/app/src/main/res/xml/config.xml",
"file": "/storage/emulated/0/MoonLeaf/Projects/FuckMaoNemo/app/build.gradle",
"selection": {
"end": {
"column": 66,
"index": 3096,
"line": 88
"column": 22,
"index": 272,
"line": 14
},
"start": {
"column": 52,
"index": 3082,
"line": 88
"column": 22,
"index": 272,
"line": 14
}
}
}
],
"selectedFile": "/storage/emulated/0/MoonLeaf/Projects/FuckMaoNemo/app/src/main/java/io/github/moonleeeaf/fuckmaonemo/Hook.java"
"selectedFile": "/storage/emulated/0/MoonLeaf/Projects/FuckMaoNemo/app/build.gradle"
}
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId "io.github.moonleeeaf.fuckmaonemo"
minSdk 21
targetSdk 33
versionCode 14000
versionName "1.4.0"
versionCode 15000
versionName "1.5.0"

vectorDrawables {
useSupportLibrary true
Expand Down
22 changes: 22 additions & 0 deletions app/src/main/java/io/github/moonleeeaf/fuckmaonemo/Hook.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
import android.content.res.AssetManager;
import android.content.res.loader.AssetsProvider;
import android.os.Bundle;
import android.text.InputFilter;
import android.text.Spanned;
import android.util.Pair;
import android.widget.EditText;
import android.widget.Toast;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
Expand Down Expand Up @@ -189,6 +192,25 @@ protected void beforeHookedMethod(MethodHookParam mp) throws Throwable {
);
});

// 我就要个人信息换行
load("remove_edit_desc_filter", () -> {
XposedBridge.log("[FuckMaoNemo] Hook_我就要个人信息换行");
XposedBridge.hookMethod(
getMethod(
XposedHelpers.findClass("com.codemao.nemo.activity.UserNameDesEditActivity", classLoader),
"initView",
null
),
new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam mp) throws Throwable {
EditText e = (EditText) XposedHelpers.getObjectField(mp.thisObject, "editText");
e.setFilters(new InputFilter[]{});
}
}
);
});

// 作品没有失效
load("work_is_valid", () -> {
XposedBridge.log("[FuckMaoNemo] Hook_作品没有失效");
Expand Down
15 changes: 12 additions & 3 deletions app/src/main/res/xml/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,25 @@
<SwitchPreference
android:key="fix_kn_player"
android:title="修复 KN 作品无法打开"
android:summary="去你吗的Nemo推广(UA检测),去你妈的 ?is_nemo_player 害得我无法打开,我直接把它机吧割了,QSWL\n本功能仅需要时启用,5.0.0用户请不要启用" />
android:summary="去你吗的Nemo推广(UA检测),去你妈的 “?is_nemo_player” 害得我无法打开,我直接把它机吧割了,QSWL\n本功能仅需要时启用,5.0.0用户请不要启用" />

</PreferenceCategory>

<PreferenceCategory android:title="实验">

<SwitchPreference
android:key="remove_edit_desc_filter"
android:title="我就要个人信息换行"
android:summary="删除个人简介编辑页面的过滤器以达到不过滤换行符号的目的(注意:暂时不能手动输入,暂时用复制粘贴换行符来替代)" />

</PreferenceCategory>

<PreferenceCategory android:title="实验">

<SwitchPreference
android:key="test"
android:title="未命名实验功能"
android:summary="实验" />
android:title="Unnamed Feature"
android:summary="setFork_user(B)V" />

<SwitchPreference
android:key="force_show_rework"
Expand Down

0 comments on commit 47828c8

Please sign in to comment.