Skip to content

Commit

Permalink
feat: add setting entry item icon
Browse files Browse the repository at this point in the history
  • Loading branch information
fankes committed Jul 25, 2023
1 parent d4f55cb commit 3ea2c1c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/src/main/java/cc/ioctl/hook/SettingEntryHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import static io.github.qauxv.util.Initiator.load;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
Expand All @@ -52,6 +51,7 @@
import io.github.qauxv.fragment.FuncStatusDetailsFragment;
import io.github.qauxv.hook.BasePersistBackgroundHook;
import io.github.qauxv.lifecycle.Parasitics;
import io.github.qauxv.ui.ResUtils;
import io.github.qauxv.util.Initiator;
import io.github.qauxv.util.LicenseStatus;
import io.github.qauxv.util.Log;
Expand Down Expand Up @@ -127,8 +127,7 @@ private void injectSettingEntryForMainSettingConfigProvider() throws ReflectiveO
Class<?> kItemProcessorGroup = result.get(0).getClass();
Constructor<?> ctor = kItemProcessorGroup.getDeclaredConstructor(List.class, CharSequence.class, CharSequence.class);
Parasitics.injectModuleResources(ctx.getResources());
@SuppressLint("DiscouragedApi")
int resId = ctx.getResources().getIdentifier("qui_tuning", "drawable", ctx.getPackageName());
int resId = ResUtils.isInNightMode() ? R.mipmap.ic_qauxv_entry_item_night : R.mipmap.ic_qauxv_entry_item_day;
Object entryItem = ctorSimpleItemProcessor.newInstance(ctx, R.id.setting2Activity_settingEntryItem, "QAuxiliary", resId);
Class<?> thatFunction0 = setOnClickListener.getParameterTypes()[0];
Object theUnit = thatFunction0.getClassLoader().loadClass("kotlin.Unit").getField("INSTANCE").get(null);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3ea2c1c

Please sign in to comment.