From c04835243ff9d21001dde43851e79038976da49d Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Thu, 5 May 2022 18:31:50 -0400 Subject: [PATCH] Replace deprecated method calls --- .../settings/ui/viewholder/CheckBoxSettingViewHolder.java | 2 +- .../features/settings/ui/viewholder/FilePickerViewHolder.java | 2 +- .../settings/ui/viewholder/InputBindingSettingViewHolder.java | 2 +- .../settings/ui/viewholder/RumbleBindingViewHolder.java | 2 +- .../features/settings/ui/viewholder/SettingViewHolder.java | 2 +- .../features/settings/ui/viewholder/SingleChoiceViewHolder.java | 2 +- .../features/settings/ui/viewholder/SliderViewHolder.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/CheckBoxSettingViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/CheckBoxSettingViewHolder.java index b4e9b15ea8..11fe903421 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/CheckBoxSettingViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/CheckBoxSettingViewHolder.java @@ -59,7 +59,7 @@ public final class CheckBoxSettingViewHolder extends SettingViewHolder mCheckbox.toggle(); - getAdapter().onBooleanClick(mItem, getAdapterPosition(), mCheckbox.isChecked()); + getAdapter().onBooleanClick(mItem, getBindingAdapterPosition(), mCheckbox.isChecked()); setStyle(mTextSettingName, mItem); } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/FilePickerViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/FilePickerViewHolder.java index e2717a63cd..f0bad3389c 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/FilePickerViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/FilePickerViewHolder.java @@ -90,7 +90,7 @@ public final class FilePickerViewHolder extends SettingViewHolder return; } - int position = getAdapterPosition(); + int position = getBindingAdapterPosition(); if (mFilePicker.getRequestType() == MainPresenter.REQUEST_DIRECTORY) { getAdapter().onFilePickerDirectoryClick(mItem, position); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/InputBindingSettingViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/InputBindingSettingViewHolder.java index d8d9aac0b7..1e2f287cb5 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/InputBindingSettingViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/InputBindingSettingViewHolder.java @@ -61,7 +61,7 @@ public final class InputBindingSettingViewHolder extends SettingViewHolder return; } - getAdapter().onInputBindingClick(mItem, getAdapterPosition()); + getAdapter().onInputBindingClick(mItem, getBindingAdapterPosition()); setStyle(mTextSettingName, mItem); } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/RumbleBindingViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/RumbleBindingViewHolder.java index 1409dfe4b4..4ffc43f44d 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/RumbleBindingViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/RumbleBindingViewHolder.java @@ -61,7 +61,7 @@ public class RumbleBindingViewHolder extends SettingViewHolder return; } - getAdapter().onInputBindingClick(mItem, getAdapterPosition()); + getAdapter().onInputBindingClick(mItem, getBindingAdapterPosition()); setStyle(mTextSettingName, mItem); } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SettingViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SettingViewHolder.java index 3abbedbdaf..69c88a7497 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SettingViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SettingViewHolder.java @@ -102,7 +102,7 @@ public abstract class SettingViewHolder extends RecyclerView.ViewHolder builder .setPositiveButton(R.string.ok, (dialog, whichButton) -> { - getAdapter().clearSetting(item, getAdapterPosition()); + getAdapter().clearSetting(item, getBindingAdapterPosition()); bind(item); Toast.makeText(context, R.string.setting_cleared, Toast.LENGTH_SHORT).show(); dialog.dismiss(); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SingleChoiceViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SingleChoiceViewHolder.java index ea3084af84..56c2c520a2 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SingleChoiceViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SingleChoiceViewHolder.java @@ -98,7 +98,7 @@ public final class SingleChoiceViewHolder extends SettingViewHolder return; } - int position = getAdapterPosition(); + int position = getBindingAdapterPosition(); if (mItem instanceof SingleChoiceSetting) { getAdapter().onSingleChoiceClick((SingleChoiceSetting) mItem, position); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SliderViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SliderViewHolder.java index fa4f701cd5..a5f7778f2a 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SliderViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SliderViewHolder.java @@ -67,7 +67,7 @@ public final class SliderViewHolder extends SettingViewHolder return; } - getAdapter().onSliderClick(mItem, getAdapterPosition()); + getAdapter().onSliderClick(mItem, getBindingAdapterPosition()); setStyle(mTextSettingName, mItem); }