From 66e64d976ae691c5f93a544a8cafe76fa311bc9e Mon Sep 17 00:00:00 2001 From: crimera Date: Wed, 12 Jun 2024 07:53:33 +0800 Subject: [PATCH] update: Improved the hooking of the recyclerview methods. also fixes the crash when opening feature flags. --- .../twitter/settings/featureflags/CustomAdapter.java | 4 ++-- .../main/java/androidx/recyclerview/widget/RecyclerView.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/twitter/settings/featureflags/CustomAdapter.java b/app/src/main/java/app/revanced/integrations/twitter/settings/featureflags/CustomAdapter.java index 6283a920f6..7afca0c634 100644 --- a/app/src/main/java/app/revanced/integrations/twitter/settings/featureflags/CustomAdapter.java +++ b/app/src/main/java/app/revanced/integrations/twitter/settings/featureflags/CustomAdapter.java @@ -94,7 +94,7 @@ public ViewHolder(CustomAdapter adapter, View view) { } @Override - public RecyclerView.c0 I(int i, RecyclerView recyclerView){ + public RecyclerView.c0 onCreateViewHolder(int i, RecyclerView recyclerView){ View view = LayoutInflater.from(recyclerView.getContext()) .inflate( Utils.getResourceIdentifier("item_row", "layout"), @@ -104,7 +104,7 @@ public RecyclerView.c0 I(int i, RecyclerView recyclerView){ } @Override - public void F(ViewHolder viewHolder, int i) { + public void onBindViewHolder(ViewHolder viewHolder, int i) { flagTextView.setText(flags.get(i).getName()); enabled.setChecked(flags.get(i).getEnabled()); } diff --git a/stub/src/main/java/androidx/recyclerview/widget/RecyclerView.java b/stub/src/main/java/androidx/recyclerview/widget/RecyclerView.java index eed23fac4b..b71437d58e 100644 --- a/stub/src/main/java/androidx/recyclerview/widget/RecyclerView.java +++ b/stub/src/main/java/androidx/recyclerview/widget/RecyclerView.java @@ -53,9 +53,9 @@ public static abstract class e { // get count public abstract int getCount(); - public abstract c0 I(int i, RecyclerView recyclerView); + public abstract c0 onCreateViewHolder(int i, RecyclerView recyclerView); - public abstract void F(VH vh, int i); + public abstract void onBindViewHolder(VH vh, int i); public final void D(int i) {} }