apps-android-commons: [Bug]: "copy the wikitext to the clipboard" produces different results depending on timing
Summary
Pressing the button copy the wikitext to the clipboard produces a different result depending if the upload is still in progress (wrong result), or whether the upload has finished (correct result).
Steps to reproduce
- have a slow network connection
- add new picture, fill metadata and submit
- while the picture is still uploading (i.e. a progress bar is being shown), click on the
copy the wikitext to the clipboardbutton and paste the result somewhere - wait until the upload finishes
- click on the
copy the wikitext to the clipboardbutton again and paste the result somewhere
Expected behaviour
the first and second value copied are the same.
Actual behaviour
The first and second results differ. For example, for this file: https://commons.wikimedia.org/wiki/File:Knafelčeva_markacija_na_odrezanoj_grani,_Prvić.jpg the first copy/paste produces:
[[Knafelčeva markacija na odrezanoj grani, Prvić.jpg|thumb|]]
(which is wrong) while the second copy/paste produces (correct!):
[[File:Knafelčeva markacija na odrezanoj grani, Prvić.jpg|thumb|]]
i.e. the first one misses File: (which then makes problems when one pastes it to the app that expects standard commons format, like e.g. EveryDoor). Especially annoying when the mobile internet is slow, as one is forced to either wait a long time, or manually fix every image name.
Device name
Huawei P30Pro
Android version
Android 10 (EMUI 12)
Commons app version
4.1.0 (latest f-droid)
Device logs
No response
Screen-shots
Would you like to work on the issue?
None
About this issue
- Original URL
- State: open
- Created 9 months ago
- Comments: 21 (12 by maintainers)
my exam r over now, i m all good to go now, i will finish this as soon as i can. thank u!
actually my exams are ongoing ryt now, so i am giveing as much as free time i have on this. so my response might be delay hope you understand.
i did find this code that casing the issue, i m workng on it. thanks you
file ->
fr.free.nrw.commons.media.MediaDetailFragment@axelthepony27 well, I don’t really know (I don’t even have local Android SDK installed - I just use GitHub to build it).
But:
menu > Tools > SDK Manager? As shown in screenshot herehello @nicolas-raoul, i am new to the project and exploring the project. Since it is a good-first-issue, can i give it a try?
@mnalis Thanks! Indeed, the problem was solved by installing the correct SDK. I’ll get to work on the issue now, it does appear to concern to the fragment of code that @Kshitiz-Mhto mentioned.
@axelthepony27 And what happens when you try to compile? Do you get some error, or does it just work?
For me, GitHub workflow seems to compile latest
mainjust fine, e.g. https://github.com/mnalis/apps-android-commons/actions/runs/7346949892/job/20002559077@axelthepony27 It is yours, please let us know about your progress every week or so, thanks! 🙂
Any luck @Kshitiz-Mhto ?
@Kshitiz-Mhto Sure no worries, please focus on your exams, letting us know every 2 weeks is fine. 😃
@Kshitiz-Mhto It is yours, thanks! Please let us know about your progress every few days. 🙂