Skip to content

Commit 2e1907b

Browse files
Bartosz PrzybylskiAndyScherzinger
authored andcommitted
tabs to spaces
1 parent f5fe5c3 commit 2e1907b

1 file changed

Lines changed: 62 additions & 62 deletions

File tree

src/com/owncloud/android/features/FeatureList.java

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -38,75 +38,75 @@
3838
*/
3939
public class FeatureList {
4040

41-
static final private boolean SHOW_ON_FIRST_RUN = true;
42-
static final private boolean SHOW_ON_UPGRADE = false;
41+
static final private boolean SHOW_ON_FIRST_RUN = true;
42+
static final private boolean SHOW_ON_UPGRADE = false;
4343

4444

45-
static final private FeatureItem featuresList[] = {
45+
static final private FeatureItem featuresList[] = {
4646
// Basic features showed on first install
47-
new FeatureItem(R.drawable.what_new_instant_upload, R.string.welcome_feature_1_title, R.string.welcome_feature_1_text, "1.0.0", "0", SHOW_ON_FIRST_RUN),
48-
new FeatureItem(R.drawable.whats_new_files, R.string.welcome_feature_2_title, R.string.welcome_feature_2_text, "1.0.0", "0", SHOW_ON_FIRST_RUN),
49-
new FeatureItem(R.drawable.whats_new_share, R.string.welcome_feature_3_title, R.string.welcome_feature_3_text, "1.0.0", "0" ,SHOW_ON_FIRST_RUN),
50-
new FeatureItem(R.drawable.whats_new_accounts, R.string.welcome_feature_4_title, R.string.welcome_feature_4_text, "1.0.0", "0", SHOW_ON_FIRST_RUN),
51-
new FeatureItem(R.drawable.whats_new_oc_files, R.string.welcome_feature_5_title, FeatureItem.DO_NOT_SHOW, "1.0.0", "0", SHOW_ON_FIRST_RUN),
47+
new FeatureItem(R.drawable.what_new_instant_upload, R.string.welcome_feature_1_title, R.string.welcome_feature_1_text, "1.0.0", "0", SHOW_ON_FIRST_RUN),
48+
new FeatureItem(R.drawable.whats_new_files, R.string.welcome_feature_2_title, R.string.welcome_feature_2_text, "1.0.0", "0", SHOW_ON_FIRST_RUN),
49+
new FeatureItem(R.drawable.whats_new_share, R.string.welcome_feature_3_title, R.string.welcome_feature_3_text, "1.0.0", "0" ,SHOW_ON_FIRST_RUN),
50+
new FeatureItem(R.drawable.whats_new_accounts, R.string.welcome_feature_4_title, R.string.welcome_feature_4_text, "1.0.0", "0", SHOW_ON_FIRST_RUN),
51+
new FeatureItem(R.drawable.whats_new_oc_files, R.string.welcome_feature_5_title, FeatureItem.DO_NOT_SHOW, "1.0.0", "0", SHOW_ON_FIRST_RUN),
5252
// Features introduced in certain point in time
5353
};
5454

5555

56-
static public FeatureItem[] get() {
57-
return featuresList;
58-
}
56+
static public FeatureItem[] get() {
57+
return featuresList;
58+
}
5959

60-
static public FeatureItem[] getFiltered(final int lastSeenVersionCode, final boolean isFirstRun, boolean isBeta) {
61-
List<FeatureItem> features = new LinkedList<>();
60+
static public FeatureItem[] getFiltered(final int lastSeenVersionCode, final boolean isFirstRun, boolean isBeta) {
61+
List<FeatureItem> features = new LinkedList<>();
6262

63-
for (FeatureItem item : get()) {
63+
for (FeatureItem item : get()) {
6464
final int itemVersionCode = isBeta ? item.getBetaVersionNumber() : item.getVersionNumber();
65-
if (isFirstRun && item.shouldShowOnFirstRun()) {
66-
features.add(item);
67-
} else if (!isFirstRun && !item.shouldShowOnFirstRun() &&
68-
MainApp.getVersionCode() >= itemVersionCode &&
69-
lastSeenVersionCode < itemVersionCode) {
70-
features.add(item);
71-
}
72-
}
73-
return features.toArray(new FeatureItem[features.size()]);
74-
}
75-
76-
static public class FeatureItem implements Parcelable {
77-
public static final int DO_NOT_SHOW = -1;
78-
private int image;
79-
private int titleText;
80-
private int contentText;
81-
private int versionNumber;
65+
if (isFirstRun && item.shouldShowOnFirstRun()) {
66+
features.add(item);
67+
} else if (!isFirstRun && !item.shouldShowOnFirstRun() &&
68+
MainApp.getVersionCode() >= itemVersionCode &&
69+
lastSeenVersionCode < itemVersionCode) {
70+
features.add(item);
71+
}
72+
}
73+
return features.toArray(new FeatureItem[features.size()]);
74+
}
75+
76+
static public class FeatureItem implements Parcelable {
77+
public static final int DO_NOT_SHOW = -1;
78+
private int image;
79+
private int titleText;
80+
private int contentText;
81+
private int versionNumber;
8282
private int betaVersion;
83-
private boolean showOnInitialRun;
83+
private boolean showOnInitialRun;
8484

85-
public FeatureItem(int image, int titleText, int contentText, String version, String betaVersion) {
86-
this(image, titleText, contentText, version, betaVersion, false);
87-
}
85+
public FeatureItem(int image, int titleText, int contentText, String version, String betaVersion) {
86+
this(image, titleText, contentText, version, betaVersion, false);
87+
}
8888

89-
public FeatureItem(int image, int titleText, int contentText, String version, String betaVersion, boolean showOnInitialRun) {
90-
this.image = image;
91-
this.titleText = titleText;
92-
this.contentText = contentText;
93-
this.versionNumber = versionCodeFromString(version);
89+
public FeatureItem(int image, int titleText, int contentText, String version, String betaVersion, boolean showOnInitialRun) {
90+
this.image = image;
91+
this.titleText = titleText;
92+
this.contentText = contentText;
93+
this.versionNumber = versionCodeFromString(version);
9494
this.betaVersion = Integer.parseInt(betaVersion);
95-
this.showOnInitialRun = showOnInitialRun;
96-
}
95+
this.showOnInitialRun = showOnInitialRun;
96+
}
9797

98-
public boolean shouldShowImage() { return image != DO_NOT_SHOW; }
99-
public int getImage() { return image; }
98+
public boolean shouldShowImage() { return image != DO_NOT_SHOW; }
99+
public int getImage() { return image; }
100100

101-
public boolean shouldShowTitleText() { return titleText != DO_NOT_SHOW; }
102-
public int getTitleText() { return titleText; }
101+
public boolean shouldShowTitleText() { return titleText != DO_NOT_SHOW; }
102+
public int getTitleText() { return titleText; }
103103

104-
public boolean shouldShowContentText() { return contentText != DO_NOT_SHOW; }
105-
public int getContentText() { return contentText; }
104+
public boolean shouldShowContentText() { return contentText != DO_NOT_SHOW; }
105+
public int getContentText() { return contentText; }
106106

107-
public int getVersionNumber() { return versionNumber; }
107+
public int getVersionNumber() { return versionNumber; }
108108
public int getBetaVersionNumber() { return betaVersion; }
109-
public boolean shouldShowOnFirstRun() { return showOnInitialRun; }
109+
public boolean shouldShowOnFirstRun() { return showOnInitialRun; }
110110

111111
@Override
112112
public int describeContents() {
@@ -146,16 +146,16 @@ public Object[] newArray(int size) {
146146
};
147147
}
148148

149-
static int versionCodeFromString(String version) {
150-
String v[] = version.split(Pattern.quote("."));
151-
if (v.length != 3) {
152-
Log_OC.wtf("FeatureList", "Version string is incorrect " + version);
153-
return 0;
154-
}
155-
int result = Integer.parseInt(v[0])*(int)(10e6) +
156-
Integer.parseInt(v[1])*(int)(10e4) +
157-
Integer.parseInt(v[2])*100;
158-
159-
return result;
160-
}
149+
static int versionCodeFromString(String version) {
150+
String v[] = version.split(Pattern.quote("."));
151+
if (v.length != 3) {
152+
Log_OC.wtf("FeatureList", "Version string is incorrect " + version);
153+
return 0;
154+
}
155+
int result = Integer.parseInt(v[0])*(int)(10e6) +
156+
Integer.parseInt(v[1])*(int)(10e4) +
157+
Integer.parseInt(v[2])*100;
158+
159+
return result;
160+
}
161161
}

0 commit comments

Comments
 (0)