Commit 07f32fcc authored by Geoffrey Métais's avatar Geoffrey Métais

Simplify pull-to-refresh activation

parent 18b9e78a
......@@ -318,12 +318,7 @@ public class AudioAlbumsSongsFragment extends BaseAudioBrowser implements SwipeR
private View.OnTouchListener mSwipeFilter = new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
mSwipeRefreshLayout.setEnabled(false);
switch (event.getAction()) {
case MotionEvent.ACTION_UP:
mSwipeRefreshLayout.setEnabled(true);
break;
}
mSwipeRefreshLayout.setEnabled(event.getAction() == MotionEvent.ACTION_UP);
return false;
}
};
......
......@@ -677,12 +677,7 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements SwipeRefre
private View.OnTouchListener mSwipeFilter = new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
mSwipeRefreshLayout.setEnabled(false);
switch (event.getAction()) {
case MotionEvent.ACTION_UP:
mSwipeRefreshLayout.setEnabled(true);
break;
}
mSwipeRefreshLayout.setEnabled(event.getAction() == MotionEvent.ACTION_UP);
return false;
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment