commit | b461b20cf3a98b7bb03768b2730655982e902e78 | [log] [tgz] |
---|---|---|
author | Annie Chin <afchin@google.com> | Mon Nov 28 14:47:57 2016 -0800 |
committer | Annie Chin <afchin@google.com> | Tue Nov 29 13:09:55 2016 -0800 |
tree | b18212a4e1b57dfea8139777ec1c7b0f457428f3 | |
parent | b2e96181066c1b50dafbf4d3e067be393ec23a0a [diff] |
Show "Empty History" only when completely empty. Fixes: 33107214 Do not show "Empty History" view when there is a Current Expression. Change-Id: I437fd3c4d71e0d80179365c886078a3499c9c184
diff --git a/src/com/android/calculator2/HistoryFragment.java b/src/com/android/calculator2/HistoryFragment.java index b16ccdb..e216400 100644 --- a/src/com/android/calculator2/HistoryFragment.java +++ b/src/com/android/calculator2/HistoryFragment.java
@@ -158,7 +158,7 @@ for (long i = 0; i < maxIndex; ++i) { newDataSet.add(null); } - if (maxIndex == 0) { + if (newDataSet.isEmpty()) { newDataSet.add(new HistoryItem()); } mDataSet = newDataSet;