mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Remove unnecessary Integer.toString() calls (#2959)
In cases where an integer is directly concatenated onto a string, toString() is not needed because it is called implicitly; this patch removes the calls to improve code readability.
This commit is contained in:
parent
877c669297
commit
b176515153
2 changed files with 5 additions and 5 deletions
|
|
@ -356,7 +356,7 @@ public class AchievementsActivity extends NavigationBaseActivity {
|
|||
(achievements.getUniqueUsedImages() + "/" + levelInfo.getMaxUniqueImages());
|
||||
imagesFeatured.setText(String.valueOf(achievements.getFeaturedImages()));
|
||||
String levelUpInfoString = getString(R.string.level);
|
||||
levelUpInfoString += " " + Integer.toString(levelInfo.getLevelNumber());
|
||||
levelUpInfoString += " " + levelInfo.getLevelNumber();
|
||||
levelNumber.setText(levelUpInfoString);
|
||||
imageView.setImageDrawable(VectorDrawableCompat.create(getResources(), R.drawable.badge,
|
||||
new ContextThemeWrapper(this, levelInfo.getLevelStyle()).getTheme()));
|
||||
|
|
|
|||
|
|
@ -516,10 +516,10 @@ public class UploadActivity extends BaseActivity implements UploadView, SimilarI
|
|||
int descCount = directKvStore.getInt(name + "descCount");
|
||||
for (int i = 0; i < descCount; i++) {
|
||||
Description description= new Description();
|
||||
String desc = directKvStore.getString(name + "description_<"+Integer.toString(i)+">");
|
||||
String desc = directKvStore.getString(name + "description_<" + i + ">");
|
||||
description.setDescriptionText(desc);
|
||||
finalDesc.add(description);
|
||||
int position = directKvStore.getInt(name + "spinnerPosition_<"+Integer.toString(i)+">");
|
||||
int position = directKvStore.getInt(name + "spinnerPosition_<" + i + ">");
|
||||
description.setSelectedLanguageIndex(position);
|
||||
}
|
||||
prevTitleDecs.setOnTouchListener((v, event) -> {
|
||||
|
|
@ -744,8 +744,8 @@ public class UploadActivity extends BaseActivity implements UploadView, SimilarI
|
|||
int n = descriptionsAdapter.getItemCount() - 1;
|
||||
directKvStore.putInt(name + "descCount", n);
|
||||
for (int i = 0; i < n; i++) {
|
||||
directKvStore.putString(name + "description_<"+Integer.toString(i)+">", descriptionsAdapter.getDescriptions().get(i).getDescriptionText());
|
||||
directKvStore.putInt(name + "spinnerPosition_<" + Integer.toString(i) + ">", descriptionsAdapter.getDescriptions().get(i).getSelectedLanguageIndex());
|
||||
directKvStore.putString(name + "description_<" + i + ">", descriptionsAdapter.getDescriptions().get(i).getDescriptionText());
|
||||
directKvStore.putInt(name + "spinnerPosition_<" + i + ">", descriptionsAdapter.getDescriptions().get(i).getSelectedLanguageIndex());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue