mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Simplify boolean expressions
This commit is contained in:
parent
f019aa2865
commit
5fe95813df
3 changed files with 3 additions and 3 deletions
|
|
@ -32,7 +32,7 @@ public class CacheController {
|
|||
|
||||
public void cacheCategory() {
|
||||
List<String> pointCatList = new ArrayList<>();
|
||||
if (MwVolleyApi.GpsCatExists.getGpsCatExists() == true) {
|
||||
if (MwVolleyApi.GpsCatExists.getGpsCatExists()) {
|
||||
pointCatList.addAll(MwVolleyApi.getGpsCat());
|
||||
Timber.d("Categories being cached: %s", pointCatList);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class ContributionController {
|
|||
String path = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Commons/images/" + new Date().getTime() + ".jpg";
|
||||
File _photoFile = new File(path);
|
||||
try {
|
||||
if(_photoFile.exists() == false) {
|
||||
if(!_photoFile.exists()) {
|
||||
_photoFile.getParentFile().mkdirs();
|
||||
_photoFile.createNewFile();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class ShareActivity
|
|||
Toast startingToast = Toast.makeText(getApplicationContext(), R.string.uploading_started, Toast.LENGTH_LONG);
|
||||
startingToast.show();
|
||||
|
||||
if (cacheFound == false) {
|
||||
if (!cacheFound) {
|
||||
//Has to be called after apiCall.request()
|
||||
app.cacheData.cacheCategory();
|
||||
Timber.d("Cache the categories found");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue