From 6f373c6c117dec09e707e2a36788d3a8c4b7da34 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 28 Mar 2014 22:41:57 -0700 Subject: [PATCH] drop click event when don't have any games (easier than uninstalling the handler when there are no child games) --- .../src/org/eehouse/android/xw4/GameListGroup.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListGroup.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListGroup.java index cfcff4641..eadd95774 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListGroup.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListGroup.java @@ -155,9 +155,11 @@ public class GameListGroup extends LinearLayout ////////////////////////////////////////////////// public void onClick( View view ) { - m_expanded = !m_expanded; - m_gcb.onGroupExpandedChanged( m_groupPosition, m_expanded ); - setButton(); + if ( 0 < m_nGames ) { + m_expanded = !m_expanded; + m_gcb.onGroupExpandedChanged( m_groupPosition, m_expanded ); + setButton(); + } } private void setButton()