mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
resolve Unresolved reference by replacing setImageToBeUploaded with direct field assignments (#6404)
This commit is contained in:
parent
dc80e07ffd
commit
4e70e4f91c
1 changed files with 12 additions and 13 deletions
|
|
@ -508,24 +508,17 @@ class UploadActivity : BaseActivity(), UploadContract.View, UploadBaseFragment.C
|
|||
fragments = mutableListOf()
|
||||
}
|
||||
|
||||
|
||||
for (uploadableFile in uploadableFiles) {
|
||||
val uploadMediaDetailFragment = UploadMediaDetailFragment()
|
||||
|
||||
if (!uploadIsOfAPlace) {
|
||||
// set fragment properties but defer initialization
|
||||
uploadMediaDetailFragment.uploadableFile = uploadableFile
|
||||
uploadMediaDetailFragment.place = place
|
||||
uploadMediaDetailFragment.inAppPictureLocation = if (!uploadIsOfAPlace) {
|
||||
handleLocation()
|
||||
uploadMediaDetailFragment.setImageToBeUploaded(
|
||||
uploadableFile,
|
||||
place,
|
||||
currLocation
|
||||
)
|
||||
locationManager!!.unregisterLocationManager()
|
||||
currLocation
|
||||
} else {
|
||||
uploadMediaDetailFragment.setImageToBeUploaded(
|
||||
uploadableFile,
|
||||
place,
|
||||
currLocation
|
||||
)
|
||||
currLocation
|
||||
}
|
||||
|
||||
val uploadMediaDetailFragmentCallback: UploadMediaDetailFragmentCallback =
|
||||
|
|
@ -580,12 +573,18 @@ class UploadActivity : BaseActivity(), UploadContract.View, UploadBaseFragment.C
|
|||
if (isFragmentsSaved) {
|
||||
val fragment = fragments!![0] as UploadMediaDetailFragment?
|
||||
fragment!!.fragmentCallback = uploadMediaDetailFragmentCallback
|
||||
fragment.initializeFragment()
|
||||
} else {
|
||||
uploadMediaDetailFragment.fragmentCallback = uploadMediaDetailFragmentCallback
|
||||
fragments!!.add(uploadMediaDetailFragment)
|
||||
}
|
||||
}
|
||||
|
||||
// unregisteer location manager after loop if needed
|
||||
if (!uploadIsOfAPlace) {
|
||||
locationManager!!.unregisterLocationManager()
|
||||
}
|
||||
|
||||
//If fragments are not created, create them and add them to the fragments ArrayList
|
||||
if (!isFragmentsSaved) {
|
||||
uploadCategoriesFragment = UploadCategoriesFragment()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue