Fix scroll using volume on multireddit (#834)

This commit is contained in:
Patrick Demers 2022-07-17 07:48:42 -07:00 committed by GitHub
parent 12f404246b
commit 5c0addbc91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<String> 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);