Remove button (#718)

* Changed the "Use previous title/description" button so that it does not delete the title and description edit text fields if there is no previous data. https://github.com/commons-app/apps-android-commons/issues/503

* Changed the "Use previous title/description" button so that it does not delete the title and description edit text fields if there is no previous data.

* Changed the "Use previous title/description" button so that it does not delete the title and description edit text fields if there is no previous data.

* Split the if statement in two lines

* Move && to the beginning of the line

* Restore order of titleEdit and descEdit
This commit is contained in:
Vanethos 2017-06-24 12:44:10 +01:00 committed by Josephine Lim
parent 7e123464e6
commit e18c628a04

View file

@ -101,6 +101,12 @@ public class SingleUploadFragment extends Fragment {
prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
license = prefs.getString(Prefs.DEFAULT_LICENSE, Prefs.Licenses.CC_BY_SA_3);
// check if this is the first time we have uploaded
if (prefs.getString("Title", "").trim().length() == 0
&& prefs.getString("Desc", "").trim().length() == 0) {
titleDescButton.setVisibility(View.GONE);
}
Timber.d(license);
ArrayAdapter<String> adapter;