From 5c0addbc9138de4a42af8dbf73a58aff14175373 Mon Sep 17 00:00:00 2001 From: Patrick Demers Date: Sun, 17 Jul 2022 07:48:42 -0700 Subject: Fix scroll using volume on multireddit (#834) --- .../activities/ViewMultiRedditDetailActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/src/main') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java index 9be74816..9dad1ebc 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java @@ -9,6 +9,7 @@ import android.os.Handler; import android.text.Editable; import android.text.TextWatcher; import android.view.Gravity; +import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -141,6 +142,13 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT private Call subredditAutocompleteCall; private NavigationWrapper navigationWrapper; + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + if (mFragment instanceof PostFragment) + return ((PostFragment) mFragment).handleKeyDown(keyCode); + return super.onKeyDown(keyCode, event); + } + @Override protected void onCreate(Bundle savedInstanceState) { ((Infinity) getApplication()).getAppComponent().inject(this); -- cgit v1.2.3