Skip to content

Commit 80a2e89

Browse files
committed
Rename button
1 parent 25c074d commit 80a2e89

File tree

1 file changed

+5
-11
lines changed
  • TestProjects/com.unity.mobile-notifications-sample/Assets/Scripts

1 file changed

+5
-11
lines changed

TestProjects/com.unity.mobile-notifications-sample/Assets/Scripts/AndroidTest.cs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,16 @@ public class AndroidTest : MonoBehaviour
2020
private Dictionary<string, OrderedDictionary> m_groups;
2121
private Logger m_LOGGER;
2222
private int _notificationExplicitID;
23-
private Button ButtonExplicitID;
23+
private Button ButtonModifyExplicitID;
2424

2525
public int notificationExplicitID
2626
{
2727
get { return _notificationExplicitID; }
2828
set
2929
{
3030
_notificationExplicitID = value;
31-
if (_notificationExplicitID == 0)
32-
{
33-
ButtonExplicitID.interactable = false;
34-
}
35-
else
36-
{
37-
ButtonExplicitID.interactable = true;
38-
}
31+
bool buttonsEnabled = _notificationExplicitID != 0;
32+
ButtonModifyExplicitID.interactable = buttonsEnabled;
3933
}
4034
}
4135

@@ -235,8 +229,8 @@ private void InstantiateAllTestButtons()
235229
}
236230
buttonGameObject.gameObject.SetActive(false);
237231
}
238-
ButtonExplicitID = GameObject.Find("Modify/Modify pending Explicit notification").GetComponent<Button>();
239-
ButtonExplicitID.interactable = false;
232+
ButtonModifyExplicitID = GameObject.Find("Modify/Modify pending Explicit notification").GetComponent<Button>();
233+
ButtonModifyExplicitID.interactable = false;
240234
m_gameObjectReferences.ButtonGroupTemplate.gameObject.SetActive(false);
241235
}
242236

0 commit comments

Comments
 (0)