Bartosz Przybylski 9 жил өмнө
parent
commit
3d9f35e6cf

+ 7 - 0
src/com/owncloud/android/features/FeatureList.java

@@ -86,9 +86,16 @@ public class FeatureList {
 			this.showOnInitialRun = showOnInitialRun;
 		}
 
+		public boolean shouldShowImage() { return image != DO_NOT_SHOW; }
 		public int getImage() { return image; }
+
+		public boolean shouldShowTitleText() { return titleText != DO_NOT_SHOW; }
 		public int getTitleText() { return titleText; }
+
+		public boolean shouldShowContentText() { return contentText != DO_NOT_SHOW; }
 		public int getContentText() { return contentText; }
+
+
 		public int getVersionNumber() { return versionNumber; }
 		public boolean shouldShowOnFirstRun() { return showOnInitialRun; }
 	}

+ 3 - 3
src/com/owncloud/android/ui/activity/WhatsNewActivity.java

@@ -122,15 +122,15 @@ public class WhatsNewActivity extends Activity {
 
 			mContentPanel.addView(newElement);
 			ImageView iv = (ImageView)newElement.findViewById(R.id.whatsNewImage);
-			if (item.getImage() != FeatureItem.DO_NOT_SHOW)
+			if (item.shouldShowImage())
 				iv.setImageResource(item.getImage());
 
 			TextView tv2 = (TextView)newElement.findViewById(R.id.whatsNewTitle);
-			if (item.getTitleText() != FeatureItem.DO_NOT_SHOW)
+			if (item.shouldShowTitleText())
 				tv2.setText(item.getTitleText());
 
 			tv2 = (TextView)newElement.findViewById(R.id.whatsNewText);
-			if (item.getContentText() != FeatureItem.DO_NOT_SHOW)
+			if (item.shouldShowContentText())
 				tv2.setText(item.getContentText());
 		}
 	}