From 01b4bfcfd95153008f35de720b46bbf22ef06cbb Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 13 Dec 2013 22:59:08 -0800 Subject: Don't run through all handlers if nothing to update --- src/github/daneren2005/dsub/view/UpdateView.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/github') diff --git a/src/github/daneren2005/dsub/view/UpdateView.java b/src/github/daneren2005/dsub/view/UpdateView.java index f247137d..1b4e55d8 100644 --- a/src/github/daneren2005/dsub/view/UpdateView.java +++ b/src/github/daneren2005/dsub/view/UpdateView.java @@ -130,7 +130,11 @@ public class UpdateView extends LinearLayout { views.add(view); } } - updateAllLive(views); + if(views.size() > 0) { + updateAllLive(views); + } else { + uiHandler.postDelayed(updateRunnable, 2000L); + } } catch (Throwable x) { Log.w(TAG, "Error when updating song views.", x); } -- cgit v1.2.3