aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-04-02 21:26:17 -0700
committerScott Jackson <daneren2005@gmail.com>2014-04-02 21:26:17 -0700
commit5c52f0ffd528838a7998a5ad84a4ca47f46502e3 (patch)
treefd446b0e9c9370b8f5ae49c0a7a84c8ef86c431a
parent912462373a8473eff600743d472049436c846aae (diff)
downloaddsub-5c52f0ffd528838a7998a5ad84a4ca47f46502e3.tar.gz
dsub-5c52f0ffd528838a7998a5ad84a4ca47f46502e3.tar.bz2
dsub-5c52f0ffd528838a7998a5ad84a4ca47f46502e3.zip
Don't show change log when no changes listed (ie: code bump)
-rw-r--r--src/github/daneren2005/dsub/view/ChangeLog.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/view/ChangeLog.java b/src/github/daneren2005/dsub/view/ChangeLog.java
index b847733e..bbc4e4dd 100644
--- a/src/github/daneren2005/dsub/view/ChangeLog.java
+++ b/src/github/daneren2005/dsub/view/ChangeLog.java
@@ -281,7 +281,13 @@ public class ChangeLog {
protected AlertDialog getDialog(boolean full) {
WebView wv = new WebView(mContext);
//wv.setBackgroundColor(0); // transparent
- wv.loadDataWithBaseURL(null, getLog(full), "text/html", "UTF-8", null);
+ String log = getLog(full);
+ // No changes to show
+ if(log == null) {
+ return null;
+ }
+
+ wv.loadDataWithBaseURL(null, log, "text/html", "UTF-8", null);
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
builder.setTitle(
@@ -401,6 +407,10 @@ public class ChangeLog {
// ... and sort them (newest version first).
Collections.sort(versions, Collections.reverseOrder());
+ if(versions.size() == 0) {
+ return null;
+ }
+
for (Integer version : versions) {
int key = version.intValue();