Fixes 4922 : Crash when trying to edit description (in Media details) (#4929)

* DescriptionEditActivity handled

* Minor change

* Minor changes
This commit is contained in:
Ayan Sarkar 2022-04-11 17:44:26 +05:30 committed by GitHub
parent 644cd473f8
commit 7655562272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 16 deletions

View file

@ -76,6 +76,7 @@ import fr.free.nrw.commons.explore.depictions.WikidataItemDetailsActivity;
import fr.free.nrw.commons.kvstore.JsonKvStore;
import fr.free.nrw.commons.location.LocationServiceManager;
import fr.free.nrw.commons.profile.ProfileActivity;
import fr.free.nrw.commons.settings.Prefs;
import fr.free.nrw.commons.ui.widget.HtmlTextView;
import fr.free.nrw.commons.upload.categories.UploadCategoriesFragment;
import fr.free.nrw.commons.upload.depicts.DepictsFragment;
@ -899,6 +900,7 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
final Bundle bundle = new Bundle();
bundle.putParcelableArrayList(LIST_OF_DESCRIPTION_AND_CAPTION, descriptionAndCaptions);
bundle.putString(WIKITEXT, s);
bundle.putString(Prefs.DESCRIPTION_LANGUAGE, applicationKvStore.getString(Prefs.DESCRIPTION_LANGUAGE, ""));
intent.putExtras(bundle);
startActivityForResult(intent, REQUEST_CODE_EDIT_DESCRIPTION);
}