Make Accidental Pull Down Refresh less likely (#5281)
This commit is contained in:
parent
2d6fff4182
commit
06713ded88
|
@ -204,6 +204,7 @@ public abstract class EpisodesListFragment extends Fragment {
|
|||
}
|
||||
|
||||
SwipeRefreshLayout swipeRefreshLayout = root.findViewById(R.id.swipeRefresh);
|
||||
swipeRefreshLayout.setDistanceToTriggerSync(getResources().getInteger(R.integer.swipe_refresh_distance));
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
AutoUpdateManager.runImmediate(requireContext());
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> swipeRefreshLayout.setRefreshing(false),
|
||||
|
|
|
@ -223,6 +223,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
|||
EventBus.getDefault().register(this);
|
||||
|
||||
SwipeRefreshLayout swipeRefreshLayout = root.findViewById(R.id.swipeRefresh);
|
||||
swipeRefreshLayout.setDistanceToTriggerSync(getResources().getInteger(R.integer.swipe_refresh_distance));
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
try {
|
||||
DBTasks.forceRefreshFeed(requireContext(), feed, true);
|
||||
|
|
|
@ -452,6 +452,7 @@ public class QueueFragment extends Fragment implements Toolbar.OnMenuItemClickLi
|
|||
registerForContextMenu(recyclerView);
|
||||
|
||||
SwipeRefreshLayout swipeRefreshLayout = root.findViewById(R.id.swipeRefresh);
|
||||
swipeRefreshLayout.setDistanceToTriggerSync(getResources().getInteger(R.integer.swipe_refresh_distance));
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
AutoUpdateManager.runImmediate(requireContext());
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> swipeRefreshLayout.setRefreshing(false),
|
||||
|
|
|
@ -148,6 +148,7 @@ public class SubscriptionFragment extends Fragment implements Toolbar.OnMenuItem
|
|||
feedsFilteredMsg.setOnClickListener((l) -> SubscriptionsFilterDialog.showDialog(requireContext()));
|
||||
|
||||
SwipeRefreshLayout swipeRefreshLayout = root.findViewById(R.id.swipeRefresh);
|
||||
swipeRefreshLayout.setDistanceToTriggerSync(getResources().getInteger(R.integer.swipe_refresh_distance));
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
AutoUpdateManager.runImmediate(requireContext());
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> swipeRefreshLayout.setRefreshing(false),
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
<integer name="subscriptions_default_num_of_columns">3</integer>
|
||||
<integer name="nav_drawer_screen_size_percent">80</integer>
|
||||
<integer name="swipe_to_refresh_duration_in_ms">750</integer>
|
||||
<integer name="swipe_refresh_distance">300</integer>
|
||||
</resources>
|
Loading…
Reference in New Issue