Added logging

This commit is contained in:
M66B 2020-06-03 10:05:19 +02:00
parent 11d7b2cb59
commit 48051e67bd
1 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,8 @@ public class SwipeRefreshLayoutEx extends SwipeRefreshLayout {
if (this.refreshing == refreshing) if (this.refreshing == refreshing)
return; return;
Log.i("Refreshing=" + this.refreshing + "/" + refreshing + " muted=" + muted + " event=set");
this.refreshing = refreshing; this.refreshing = refreshing;
removeCallbacks(delayedDisable); removeCallbacks(delayedDisable);
@ -76,6 +78,7 @@ public class SwipeRefreshLayoutEx extends SwipeRefreshLayout {
public void resetRefreshing() { public void resetRefreshing() {
// Restart spinner after screen off, etc // Restart spinner after screen off, etc
if (super.isRefreshing()) { if (super.isRefreshing()) {
Log.i("Refreshing=" + refreshing + " muted=" + muted + " event=reset");
super.setRefreshing(false); super.setRefreshing(false);
super.setRefreshing(true); super.setRefreshing(true);
} }
@ -84,6 +87,7 @@ public class SwipeRefreshLayoutEx extends SwipeRefreshLayout {
private final Runnable delayedDisable = new Runnable() { private final Runnable delayedDisable = new Runnable() {
@Override @Override
public void run() { public void run() {
Log.i("Refreshing=" + refreshing + " muted=" + muted + " event=disable");
if (!refreshing) if (!refreshing)
SwipeRefreshLayoutEx.super.setRefreshing(refreshing); SwipeRefreshLayoutEx.super.setRefreshing(refreshing);
} }
@ -92,6 +96,7 @@ public class SwipeRefreshLayoutEx extends SwipeRefreshLayout {
private final Runnable delayedMute = new Runnable() { private final Runnable delayedMute = new Runnable() {
@Override @Override
public void run() { public void run() {
Log.i("Refreshing=" + refreshing + " muted=" + muted + " event=mute");
if (refreshing) { if (refreshing) {
muted = true; muted = true;
SwipeRefreshLayoutEx.super.setRefreshing(false); SwipeRefreshLayoutEx.super.setRefreshing(false);