Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate all APIs to retrofit #3026

Closed
34 tasks done
maskaravivek opened this issue Jun 17, 2019 · 35 comments
Closed
34 tasks done

Migrate all APIs to retrofit #3026

maskaravivek opened this issue Jun 17, 2019 · 35 comments

Comments

@maskaravivek
Copy link
Member

maskaravivek commented Jun 17, 2019

Summary:

This is a subtask to track network layer refactoring as part of #1092.

  • getAuthCookie > PR raised
  • login > PR raised
  • getEditToken > PR raised
  • getWikidataCsrfToken > PR raised
  • getCentralAuthToken > PR raised
  • fileExistsWithName
  • pageExists
  • findThumbnailByFilename
  • getCategoryImages
  • getSubCategoryList
  • getParentCategoryList
  • searchCategory
  • uploadFile > PR raised
  • edit > PR raised
  • prependEdit > PR raised
  • appendEdit > PR raised
  • wikidatCreateClaim > PR raised
  • addWikidataEditTag > PR raised
  • fetchMediaByFilename
  • searchCategories
  • allCategories
  • getNotifications
  • markNotificationAsRead > PR raised
  • searchTitles
  • revisionsByFilename
  • existingFile
  • logEvents
  • isUserBlockedFromCommons

Suggested test flows (by misaochan) for backend-overhaul branch:

  • Log in, upload a picture. Make sure the upload does not fail and that it is associated with the correct account (check this in Commons). Log out, then log in to a different account. Repeat the process. Log out, then log back in to the original account. Repeat the process for the last time.
  • Test with 2FA account if you have one
  • Try uploading a file that already exists or a title that already exists
  • Test notifications
  • Test Achievements
  • (After Vivek reports this is fixed): Test Wikidata edits from Nearby
@ilgazer
Copy link
Collaborator

ilgazer commented Jul 4, 2019

Can I help with this or should I refrain from doing grant tasks?

@maskaravivek
Copy link
Member Author

You are most welcome to contribute. Our grant doesn't define the APIs specifically and given that we are supposed to overhaul the entire app, some help would be great. :)

You can pick any of the pending APIs. I have updated the comment to reflect which ones have a PR raised already. You can pick from the remaining ones.

It would be best to pick just 1 API at a time and raise a PR for it separately so that it can be merged quickly. Base your PR to backend-overhaul branch

@ilgazer
Copy link
Collaborator

ilgazer commented Jul 4, 2019

That's nice to hear!

@ilgazer
Copy link
Collaborator

ilgazer commented Jul 5, 2019

I also completed searchCategory :)

@misaochan
Copy link
Member

Added suggested test flows - if anyone wants to help with testing, we would greatly appreciate that, as more eyes are better. :) I will start testing soon.

@misaochan
Copy link
Member

misaochan commented Jul 10, 2019

Does the backend-overhaul branch work for anyone else at the moment? I tested the branch with a real device running Android 8.1. After logging in I cannot even test any of the upload flows, because my main screen is completely empty (as in, there isn't even the upload FAB, lol).
Screenshot_20190710-233321_Commons

Achievements screen loads but thinks that I have no uploads.
Screenshot_20190710-233528_Commons

Logging out and logging in to a different account had the same problem.

I submitted logs to the forum. The relevant parts are posted below:

2019-07-10 23:33:57,888     [DEBUG] [file-logging-thread-1] [LoginActivity] : Login to start!
2019-07-10 23:34:01,147     [ERROR] [file-logging-thread-1] [SessionManager] : User is not logged in
2019-07-10 23:34:01,181     [INFO ] [file-logging-thread-1] [OkHttpJsonApiClient] : Url https://tools.wmflabs.org/urbanecmbot/commonsmisc/feedback.py?user=misaochan
2019-07-10 23:34:01,396     [DEBUG] [file-logging-thread-1] [MainActivity] : Contributions activity notifications menu item is visible
2019-07-10 23:34:01,776     [DEBUG] [file-logging-thread-1] [MainActivity] : Number of notifications is 2
2019-07-10 23:34:01,985     [DEBUG] [file-logging-thread-1] [MainActivity] : Number of notifications is 2
2019-07-10 23:34:01,998     [DEBUG] [file-logging-thread-1] [CustomApiResult] : API response for method https://commons.wikimedia.org/w/api.php is
 <?xml version="1.0" encoding="UTF-8"?><api batchcomplete=""><query><userinfo id="0" name="IP address redacted" anon=""/></query></api>
2019-07-10 23:34:02,728     [DEBUG] [file-logging-thread-1] [OkHttpJsonApiClient] : Response for achievements is Content-type: application/json

@maskaravivek
Copy link
Member Author

@misaochan Can you test on a clean install?

@misaochan
Copy link
Member

@maskaravivek This is a clean install.

@neslihanturan
Copy link
Collaborator

Beta debug, API 26 emulator
-I was already logged in an uploaded an image successfully. But having no progressbar during upload seemed a little weird. I checked uploaded image page, everything seemed well to me.
Then I logged out and in, what I see is same with @misaochan :
Screenshot from 2019-07-11 00-45-37

Here are the logs I see on clicking home from navbar:

*.wiktionary.org *.wmflabs.org wikimediafoundation.org mediawiki.org *.mediawiki.org wss://tools.wmflabs.org; report-uri https://tools.wmflabs.org/csp-report/collect;
2019-07-11 00:47:39.803 9245-9962/fr.free.nrw.commons.beta V/OkHttp: 402
2019-07-11 00:47:39.804 9245-9962/fr.free.nrw.commons.beta V/OkHttp: <-- END HTTP (4-byte body)
2019-07-11 00:47:39.842 9245-10457/fr.free.nrw.commons.beta V/OkHttp: <-- 200 https://tools.wmflabs.org/urbanecmbot/commonsmisc/feedback.py?labs=commonswiki&user=Neslihan%20Test (597ms)
2019-07-11 00:47:39.842 9245-10457/fr.free.nrw.commons.beta V/OkHttp: server: nginx/1.13.6
2019-07-11 00:47:39.842 9245-10457/fr.free.nrw.commons.beta V/OkHttp: date: Wed, 10 Jul 2019 21:47:40 GMT
2019-07-11 00:47:39.842 9245-10457/fr.free.nrw.commons.beta V/OkHttp: content-length: 31
2019-07-11 00:47:39.842 9245-10457/fr.free.nrw.commons.beta V/OkHttp: access-control-allow-origin: *
2019-07-11 00:47:39.842 9245-10457/fr.free.nrw.commons.beta V/OkHttp: strict-transport-security: max-age=86400
2019-07-11 00:47:39.842 9245-10457/fr.free.nrw.commons.beta V/OkHttp: x-clacks-overhead: GNU Terry Pratchett
2019-07-11 00:47:39.842 9245-10457/fr.free.nrw.commons.beta V/OkHttp: content-security-policy-report-only: default-src 'self' 'unsafe-eval' 'unsafe-inline' blob: data: filesystem: mediastream: wikibooks.org *.wikibooks.org wikidata.org *.wikidata.org wikimedia.org *.wikimedia.org wikinews.org *.wikinews.org wikipedia.org *.wikipedia.org wikiquote.org *.wikiquote.org wikisource.org *.wikisource.org wikiversity.org *.wikiversity.org wikivoyage.org *.wikivoyage.org wiktionary.org *.wiktionary.org *.wmflabs.org wikimediafoundation.org mediawiki.org *.mediawiki.org wss://tools.wmflabs.org; report-uri https://tools.wmflabs.org/csp-report/collect;
2019-07-11 00:47:39.843 9245-10457/fr.free.nrw.commons.beta V/OkHttp: Content-type: application/json
2019-07-11 00:47:39.843 9245-10457/fr.free.nrw.commons.beta V/OkHttp: <-- END HTTP (31-byte body)
2019-07-11 00:47:39.844 9245-10457/fr.free.nrw.commons.beta D/OkHttpJsonApiClient: Response for achievements is Content-type: application/json
2019-07-11 00:47:39.844 9245-9283/fr.free.nrw.commons.beta D/EGL_emulation: eglMakeCurrent: 0xa27055a0: ver 2 0 (tinfo 0xa2703500)
2019-07-11 00:47:39.898 9245-10460/fr.free.nrw.commons.beta D/OkHttp: <-- 200 https://commons.wikimedia.beta.wmflabs.org/w/api.php?format=json&formatversion=2&errorformat=plaintext&action=query&meta=notifications&notformat=model&notlimit=max&notwikis=wikidatawiki%7Ccommonswiki%7Cenwiki&notfilter=%21read (656ms)
2019-07-11 00:47:39.898 9245-10460/fr.free.nrw.commons.beta D/OkHttp: date: Wed, 10 Jul 2019 21:47:40 GMT
2019-07-11 00:47:39.898 9245-10460/fr.free.nrw.commons.beta D/OkHttp: content-type: application/json; charset=utf-8
2019-07-11 00:47:39.898 9245-10460/fr.free.nrw.commons.beta D/OkHttp: server: deployment-mediawiki-09.deployment-prep.eqiad.wmflabs
2019-07-11 00:47:39.898 9245-10460/fr.free.nrw.commons.beta D/OkHttp: x-powered-by: HHVM/3.18.6-dev
2019-07-11 00:47:39.898 9245-10460/fr.free.nrw.commons.beta D/OkHttp: x-frame-options: DENY
2019-07-11 00:47:39.898 9245-10460/fr.free.nrw.commons.beta D/OkHttp: x-content-type-options: nosniff
2019-07-11 00:47:39.898 9245-10460/fr.free.nrw.commons.beta D/OkHttp: content-disposition: inline; filename=api-result.json
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: cache-control: private, must-revalidate, max-age=0
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: backend-timing: D=447017 t=1562795259908954
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: vary: Accept-Encoding,X-Seven
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: x-varnish: 223062829, 55652876
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: via: 1.1 varnish (Varnish/5.1), 1.1 varnish (Varnish/5.1)
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: accept-ranges: bytes
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: age: 0
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: x-cache: deployment-cache-text05 pass, deployment-cache-text05 pass
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: x-cache-status: pass
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: server-timing: cache;desc="pass"
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: x-analytics: WMF-Last-Access=10-Jul-2019;WMF-Last-Access-Global=10-Jul-2019;https=1
2019-07-11 00:47:39.899 9245-10460/fr.free.nrw.commons.beta D/OkHttp: x-client-ip: 88.230.48.157
2019-07-11 00:47:39.900 9245-10460/fr.free.nrw.commons.beta D/OkHttp: {"batchcomplete":true,"limits":{"notifications":50},"query":{"notifications":{"list":[{"wiki":"commonswiki","id":5919,"type":"edit-thank","category":"edit-thank","section":"message","timestamp":{"utciso8601":"2019-03-21T11:35:45Z","utcunix":"1553168145","unix":"1553168145","utcmw":"20190321113545","mw":"20190321113545","date":"21 March"},"title":{"full":"File:Deneme 2.jpg","namespace":"File","namespace-key":6,"text":"Deneme 2.jpg"},"agent":{"id":2265,"name":"Silky Priya 44"},"revid":106467,"targetpages":[],"*":{"header":"‪Silky Priya 44‬ thanked you for your creation of <strong>‪File:Deneme 2.jpg‬</strong>.","compactHeader":"‪Silky Priya 44‬ thanked you.","body":"Uploaded using [[COM:MOA|Commons Mobile App]]","icon":"thanks","links":{"primary":{"url":"https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=File:Deneme_2.jpg&oldid=prev&diff=106467&markasread=5919&markasreadwiki=commonswiki","label":"View edit"},"secondary":[{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/User:Silky_Priya_44","label":"‪Silky Priya 44‬","tooltip":"","description":"","icon":"userAvatar","prioritized":true},{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/File:Deneme_2.jpg","label":"‪Deneme 2.jpg‬","tooltip":"File:Deneme 2.jpg","description":null,"icon":"article","prioritized":true}]},"iconUrl":"/w/extensions/Thanks/userTalk-constructive-ltr.svg"}},{"wiki":"commonswiki","id":5956,"type":"edit-thank","category":"edit-thank","section":"message","timestamp":{"utciso8601":"2019-03-25T08:20:26Z","utcunix":"1553502026","unix":"1553502026","utcmw":"20190325082026","mw":"20190325082026","date":"25 March"},"title":{"full":"File:1 2.jpg","namespace":"File","namespace-key":6,"text":"1 2.jpg"},"agent":{"id":2218,"name":"Aanshika"},"revid":106442,"targetpages":[],"*":{"header":"‪Aanshika‬ thanked you for your creation of <strong>‪File:1 2.jpg‬</strong>.","compactHeader":"‪Aanshika‬ thanked you.","body":"Uploaded using [[COM:MOA|Commons Mobile App]]","icon":"thanks","links":{"primary":{"url":"https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=File:1_2.jpg&oldid=prev&diff=106442&markasread=5956&markasreadwiki=commonswiki","label":"View edit"},"secondary":[{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/User:Aanshika","label":"‪Aanshika‬","tooltip":"","description":"","icon":"userAvatar","prioritized":true},{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/File:1_2.jpg","label":"‪1 2.jpg‬","tooltip":"File:1 2.jpg","description":null,"icon":"article","prioritized":true}]},"iconUrl":"/w/extensions/Thanks/userTalk-constructive-ltr.svg"}},{"wiki":"commonswiki","id":5967,"type":"edit-thank","category":"edit-thank","section":"message","timestamp":{"utciso8601":"2019-03-25T08:41:07Z","utcunix":"1553503267","unix":"1553503267","utcmw":"20190325084107","mw":"20190325084107","date":"25 March"},"title":{"full":"File:Test2 3.jpg","namespace":"File","namespace-key":6,"text":"Test2 3.jpg"},"agent":{"id":2218,"name":"Aanshika"},"revid":106464,"targetpages":[],"*":{"header":"‪Aanshika‬ thanked you for your creation of <strong>‪File:Test2 3.jpg‬</strong>.","compactHeader":"‪Aanshika‬ thanked you.","body":"Uploaded using [[COM:MOA|Commons Mobile App]]","icon":"thanks","links":{"primary":{"url":"https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=File:Test2_3.jpg&oldid=prev&diff=106464&markasread=5967&markasreadwiki=commonswiki","label":"View edit"},"secondary":[{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/User:Aanshika","label":"‪Aanshika‬","tooltip":"","description":"","icon":"userAvatar","prioritized":true},{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/File:Test2_3.jpg","label":"‪Test2 3.jpg‬","tooltip":"File:Test2 3.jpg","description":null,"icon":"article","prioritized":true}]},"iconUrl":"/w/extensions/Thanks/userTalk-constructive-ltr.svg"}},{"wiki":"commonswiki","id":5974,"type":"edit-thank","category":"edit-thank","section":"message","timestamp":{"utciso8601":"2019-03-25T09:27:46Z","utcunix":"1553506066
2019-07-11 00:47:39.900 9245-10460/fr.free.nrw.commons.beta D/OkHttp: ,"unix":"1553506066","utcmw":"20190325092746","mw":"20190325092746","date":"25 March"},"title":{"full":"File:Tes.jpg","namespace":"File","namespace-key":6,"text":"Tes.jpg"},"agent":{"id":2218,"name":"Aanshika"},"revid":106441,"targetpages":[],"*":{"header":"‪Aanshika‬ thanked you for your creation of <strong>‪File:Tes.jpg‬</strong>.","compactHeader":"‪Aanshika‬ thanked you.","body":"Uploaded using [[COM:MOA|Commons Mobile App]]","icon":"thanks","links":{"primary":{"url":"https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=File:Tes.jpg&oldid=prev&diff=106441&markasread=5974&markasreadwiki=commonswiki","label":"View edit"},"secondary":[{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/User:Aanshika","label":"‪Aanshika‬","tooltip":"","description":"","icon":"userAvatar","prioritized":true},{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/File:Tes.jpg","label":"‪Tes.jpg‬","tooltip":"File:Tes.jpg","description":null,"icon":"article","prioritized":true}]},"iconUrl":"/w/extensions/Thanks/userTalk-constructive-ltr.svg"}},{"wiki":"commonswiki","id":6315,"type":"edit-thank","category":"edit-thank","section":"message","timestamp":{"utciso8601":"2019-04-25T12:48:42Z","utcunix":"1556196522","unix":"1556196522","utcmw":"20190425124842","mw":"20190425124842","date":"25 April"},"title":{"full":"File:Test 117.jpg","namespace":"File","namespace-key":6,"text":"Test 117.jpg"},"agent":{"id":2293,"name":"Nahid"},"revid":107410,"targetpages":[],"*":{"header":"‪Nahid‬ thanked you for your creation of <strong>‪File:Test 117.jpg‬</strong>.","compactHeader":"‪Nahid‬ thanked you.","body":"Uploaded using [[COM:MOA|Commons Mobile App]]","icon":"thanks","links":{"primary":{"url":"https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=File:Test_117.jpg&oldid=prev&diff=107410&markasread=6315&markasreadwiki=commonswiki","label":"View edit"},"secondary":[{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/User:Nahid","label":"‪Nahid‬","tooltip":"","description":"","icon":"userAvatar","prioritized":true},{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/File:Test_117.jpg","label":"‪Test 117.jpg‬","tooltip":"File:Test 117.jpg","description":null,"icon":"article","prioritized":true}]},"iconUrl":"/w/extensions/Thanks/userTalk-constructive-ltr.svg"}},{"wiki":"commonswiki","id":6320,"type":"edit-thank","category":"edit-thank","section":"message","timestamp":{"utciso8601":"2019-04-25T14:15:44Z","utcunix":"1556201744","unix":"1556201744","utcmw":"20190425141544","mw":"20190425141544","date":"25 April"},"title":{"full":"File:Test XMP on.jpg","namespace":"File","namespace-key":6,"text":"Test XMP on.jpg"},"agent":{"id":2293,"name":"Nahid"},"revid":108055,"targetpages":[],"*":{"header":"‪Nahid‬ thanked you for your creation of <strong>‪File:Test XMP on.jpg‬</strong>.","compactHeader":"‪Nahid‬ thanked you.","body":"Uploaded using [[COM:MOA|Commons Mobile App]]","icon":"thanks","links":{"primary":{"url":"https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=File:Test_XMP_on.jpg&oldid=prev&diff=108055&markasread=6320&markasreadwiki=commonswiki","label":"View edit"},"secondary":[{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/User:Nahid","label":"‪Nahid‬","tooltip":"","description":"","icon":"userAvatar","prioritized":true},{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/File:Test_XMP_on.jpg","label":"‪Test XMP on.jpg‬","tooltip":"File:Test XMP on.jpg","description":null,"icon":"article","prioritized":true}]},"iconUrl":"/w/extensions/Thanks/userTalk-constructive-ltr.svg"}},{"wiki":"commonswiki","id":6321,"type":"edit-thank","category":"edit-thank","section":"message","timestamp":{"utciso8601":"2019-04-25T14:19:18Z","utcunix":"1556201958","unix":"1556201958","utcmw":"20190425141918","mw":"20190425141918","date":"25 April"},"title":{"full":"File:Testing default exif values2.jpg","namespace":"File","namespace-key":6,"text":"Testing default exif values2.jpg"},"agent":{"id":2293,"name":"Nahid"},"revid":108050,"targetpage
2019-07-11 00:47:39.900 9245-10460/fr.free.nrw.commons.beta D/OkHttp: ":[],"*":{"header":"‪Nahid‬ thanked you for your creation of <strong>‪File:Testing default exif values2.jpg‬</strong>.","compactHeader":"‪Nahid‬ thanked you.","body":"Uploaded using [[COM:MOA|Commons Mobile App]]","icon":"thanks","links":{"primary":{"url":"https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=File:Testing_default_exif_values2.jpg&oldid=prev&diff=108050&markasread=6321&markasreadwiki=commonswiki","label":"View edit"},"secondary":[{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/User:Nahid","label":"‪Nahid‬","tooltip":"","description":"","icon":"userAvatar","prioritized":true},{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/File:Testing_default_exif_values2.jpg","label":"‪Testing default...‬","tooltip":"File:Testing default exif values2.jpg","description":null,"icon":"article","prioritized":true}]},"iconUrl":"/w/extensions/Thanks/userTalk-constructive-ltr.svg"}},{"wiki":"commonswiki","id":6797,"type":"login-fail-new","category":"login-fail","section":"alert","timestamp":{"utciso8601":"2019-06-10T09:22:06Z","utcunix":"1560158526","unix":"1560158526","utcmw":"20190610092206","mw":"20190610092206","date":"10 June"},"agent":{"id":1694,"name":"Neslihan Test"},"targetpages":[],"*":{"header":"There has been <b>a failed attempt</b> to log in to your account from a new device. Please make sure your account has a strong password.","compactHeader":"There has been <b>a failed attempt</b> to log in to your account from a new device. Please make sure your account has a strong password.","body":"","icon":"LoginNotify-user-avatar","links":{"primary":{"url":"https://mediawiki.org/wiki/Help:Login_notifications?markasread=6797&markasreadwiki=commonswiki","label":"Help"},"secondary":[{"url":"https://commons.wikimedia.beta.wmflabs.org/wiki/Special:ChangePassword","label":"Change password","description":"","icon":"lock","prioritized":true}]},"iconUrl":"/w/extensions/LoginNotify/UserAvatar.svg"}}],"continue":null}}}
2019-07-11 00:47:39.900 9245-10460/fr.free.nrw.commons.beta D/OkHttp: <-- END HTTP (10103-byte body)
2019-07-11 00:47:40.004 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7139808 , only wrote 7139520
2019-07-11 00:47:40.005 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7139530 , only wrote 7139520
2019-07-11 00:47:40.094 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7143819 , only wrote 7143120
2019-07-11 00:47:40.096 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7143220 , only wrote 7143120
2019-07-11 00:47:40.182 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7147256 , only wrote 7146720
2019-07-11 00:47:40.183 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7146726 , only wrote 7146720
2019-07-11 00:47:40.204 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7147759 , only wrote 7147440
2019-07-11 00:47:40.236 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7148964 , only wrote 7148160
2019-07-11 00:47:40.271 9245-9283/fr.free.nrw.commons.beta D/EGL_emulation: eglMakeCurrent: 0xa27055a0: ver 2 0 (tinfo 0xa2703500)
2019-07-11 00:47:40.286 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7150540 , only wrote 7150320
2019-07-11 00:47:40.299 9245-9245/fr.free.nrw.commons.beta D/MainActivity: Number of notifications is 8
2019-07-11 00:47:40.324 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7152146 , only wrote 7151760
2019-07-11 00:47:40.444 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7157538 , only wrote 7156800
2019-07-11 00:47:40.448 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7156993 , only wrote 7156800
2019-07-11 00:47:40.473 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7158007 , only wrote 7157520
2019-07-11 00:47:40.473 1436-6524/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7157525 , only wrote 7157520
2019-07-11 00:47:40.646 9245-9283/fr.free.nrw.commons.beta D/OpenGLRenderer: endAllActiveAnimators on 0x8b23a400 (NavigationMenuItemView) with handle 0x8e7d2c20
2019-07-11 00:47:41.355 1679-1697/system_process E/BatteryStatsService: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
2019-07-11 00:47:41.932 2231-9231/com.google.android.gms.persistent W/ctxmgr: [AclManager]No 2 for (accnt=account#-517948760#, com.google.android.gms(10013):IndoorOutdoorProducer, vrsn=13280000, 0, 3pPkg = null ,  3pMdlId = null ,  pid = 2231). Was: 3 for 57, account#-517948760#
2019-07-11 00:47:42.258 1436-1637/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 7327981 , only wrote 7243200
2019-07-11 00:47:45.687 9245-9271/fr.free.nrw.commons.beta I/zygote: Explicit concurrent copying GC freed 22305(1550KB) AllocSpace objects, 7(144KB) LOS objects, 49% free, 4MB/9MB, paused 143us total 19.445ms
2019-07-11 00:47:46.932 2231-9231/com.google.android.gms.persistent W/ctxmgr: [AclManager]No 2 for (accnt=account#-517948760#, com.google.android.gms(10013):IndoorOutdoorProducer, vrsn=13280000, 0, 3pPkg = null ,  3pMdlId = null ,  pid = 2231). Was: 3 for 57, account#-517948760#
2019-07-11 00:47:48.294 1450-1450/? I/boot-pipe: done populating /dev/random
  • Notifications activiy is correct but the notification bell number is wrong, it does not change even if after I read notificationsw (possibly not related with this PR).

  • Achievements worked fine on me:
    Screenshot from 2019-07-11 00-46-11

@misaochan
Copy link
Member

BTW, I also realized that we cannot rely on users doing a fresh install - most users will just be updating their app automatically, not uninstalling and reinstalling. So we must make sure that our final solution works regardless of fresh install or not.

@misaochan
Copy link
Member

misaochan commented Jul 16, 2019

Tested with real device running Android 8.1 today.

Successes:

Issues found with Contributions:

  • This screen is shown for a long time while contributions load, which may make users think that the app is buggy (alongside the 0 bug below)
    Screenshot_20190716-190923_Commons
  • My "Contributions" tab always says (0) even after contributions have been loaded
  • Very interesting bug - as you can see, these image titles do not match the images. This happened after I logged out of misaochan and onto misaochan2. So the titles are the titles of misaochan2's uploads, but the images are the images of misaochan's uploads.
    Screenshot_20190716-191158_Commons
  • Furthermore, after logging back into misaochan, the images are mine and the titles are mine, but out of sync. So the first image has the title of the most recent image uploaded, but the image shown is actually the one that belongs to an upload that is 4 items down.

Issues found with single uploads (with Android stock gallery):

Issues found with multiple uploads (with Android stock gallery):

  • Unable to select more than 1 image in Android stock gallery. It works for Google Photos.

Issues found with multiple uploads (with Google Photos):

  • My description defaulted to Afrikaans even though "en" was the default desc language

Achievements:

  • Does not work, 0 for everything

Other issues:

@neslihanturan
Copy link
Collaborator

For me, similar to @misaochan 's. Achievements is blank screen:
Screenshot from 2019-07-16 16-13-12

  • Contributions loads this time.
  • Uploads works.
  • Potential upload issue warnings displayed.
  • Nearest place notification permission is requested after selecting nearby tab and coming back to contributions tab, it didn't ask on start (possibly irrelevant)
  • Contributions is not zero for me, it says 100 in my case

Logs:

2019-07-16 16:12:05.565 7851-7851/fr.free.nrw.commons.beta E/DialogUtil: Could not show dialog.
    java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
        at android.view.ViewGroup.addViewInner(ViewGroup.java:4915)
        at android.view.ViewGroup.addView(ViewGroup.java:4746)
        at android.view.ViewGroup.addView(ViewGroup.java:4718)
        at com.android.internal.app.AlertController.setupCustomContent(AlertController.java:606)
        at com.android.internal.app.AlertController.setupView(AlertController.java:500)
        at com.android.internal.app.AlertController.installContent(AlertController.java:258)
        at android.app.AlertDialog.onCreate(AlertDialog.java:425)
        at android.app.Dialog.dispatchOnCreate(Dialog.java:403)
        at android.app.Dialog.show(Dialog.java:302)
        at fr.free.nrw.commons.utils.DialogUtil.showSafely(DialogUtil.java:33)
        at fr.free.nrw.commons.utils.DialogUtil.showAlertDialog(DialogUtil.java:140)
        at fr.free.nrw.commons.utils.DialogUtil.showAlertDialog(DialogUtil.java:96)
        at fr.free.nrw.commons.contributions.ContributionsFragment.showNearbyCardPermissionRationale(ContributionsFragment.java:508)
        at fr.free.nrw.commons.contributions.ContributionsFragment.checkPermissionsAndShowNearbyCardView(ContributionsFragment.java:489)
        at fr.free.nrw.commons.contributions.ContributionsFragment.onResume(ContributionsFragment.java:469)
        at androidx.fragment.app.Fragment.performResume(Fragment.java:2499)
        at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:926)
        at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1229)
        at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1295)
        at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManagerImpl.java:2605)
        at androidx.fragment.app.FragmentManagerImpl.dispatchResume(FragmentManagerImpl.java:2577)
        at androidx.fragment.app.FragmentController.dispatchResume(FragmentController.java:267)
        at androidx.fragment.app.FragmentActivity.onResumeFragments(FragmentActivity.java:463)
        at androidx.fragment.app.FragmentActivity.onPostResume(FragmentActivity.java:453)
        at androidx.appcompat.app.AppCompatActivity.onPostResume(AppCompatActivity.java:173)
        at android.app.Activity.performResume(Activity.java:7103)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3620)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3685)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1643)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6541)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
2019-07-16 16:12:05.567 7851-7851/fr.free.nrw.commons.beta E/ContributionsFragment: onFragmentResumed fr.free.nrw.commons.contributions.ContributionsListFragment
2019-07-16 16:12:06.551 7851-7851/fr.free.nrw.commons.beta E/QuizChecker: Fetching upload count failed
    java.lang.IllegalStateException: closed
        at okio.RealBufferedSource.rangeEquals(RealBufferedSource.java:407)
        at okio.RealBufferedSource.rangeEquals(RealBufferedSource.java:401)
        at okhttp3.internal.Util.bomAwareCharset(Util.java:471)
        at okhttp3.ResponseBody.string(ResponseBody.java:175)
        at fr.free.nrw.commons.mwapi.OkHttpJsonApiClient.lambda$getUploadCount$0(OkHttpJsonApiClient.java:102)
        at fr.free.nrw.commons.mwapi.-$$Lambda$OkHttpJsonApiClient$9ZpGX0U5Zngts_jcRCFls7FtEIM.call(Unknown Source:4)
        at io.reactivex.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:44)
        at io.reactivex.Single.subscribe(Single.java:3438)
        at io.reactivex.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
        at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
        at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
        at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)

@ilgazer
Copy link
Collaborator

ilgazer commented Jul 22, 2019

Can you also update the list?

@ilgazer
Copy link
Collaborator

ilgazer commented Jul 23, 2019

These are both waiting for wikimedia-android-data-client PR's

@misaochan
Copy link
Member

Can you also update the list?

Which list do you mean?

These are both waiting for wikimedia-android-data-client PR's

Thanks for your help with all this @ilgazer ! :) Let me know if it hasn't been merged after a week or so and I'll try to ping the maintainer.

@ilgazer
Copy link
Collaborator

ilgazer commented Jul 26, 2019

Which list do you mean?

The one above

These are both waiting for wikimedia-android-data-client PR's

They no longer are! Their PR's are waiting for merge, but a completely unrelated test is failing for some reason.

@ashishkumar468
Copy link
Collaborator

I think @ilgazer 's PR can be merged, I have tried testing them locally and both seem to work fine on my machine. What do you say @maskaravivek ?

@maskaravivek
Copy link
Member Author

@ashishkumar468 Yes, lets merge @ilgazer PRs.

@ashishkumar468
Copy link
Collaborator

Other than the contributions (upload count and possible display inconsistency), and notification progress issue and the achievements bug, is there anything else remaining in this PR ?

@ilgazer
Copy link
Collaborator

ilgazer commented Sep 14, 2019 via email

@ashishkumar468
Copy link
Collaborator

Thanks @ilgazer :)

@maskaravivek
Copy link
Member Author

Other than the contributions (upload count and possible display inconsistency), and notification progress issue and the achievements bug, is there anything else remaining in this PR ?

Wikidata edits is still not sorted. We might need external help for it.

@misaochan
Copy link
Member

misaochan commented Sep 19, 2019

Other than the contributions (upload count and possible display inconsistency), and notification progress issue and the achievements bug, is there anything else remaining in this PR ?

Thanks for fixing the Achievements and wrong upload count in #3151 @ashishkumar468 . :) Based on
#3026 (comment) , it seems like the remaining issues are:

  • Display issue: Very interesting bug - as you can see, these image titles do not match the images. This happened after I logged out of misaochan and onto misaochan2. So the titles are the titles of misaochan2's uploads, but the images are the images of misaochan's uploads. <- Fixed by clear image cache on logout #3168

Furthermore, after logging back into misaochan, the images are mine and the titles are mine, but out of sync. So the first image has the title of the most recent image uploaded, but the image shown is actually the one that belongs to an upload that is 4 items down.
Issues found with single uploads (with Android stock gallery):

@ilgazer
Copy link
Collaborator

ilgazer commented Sep 19, 2019

Wrong dates: Dates appear to be using the upload date again instead of the date taken - the picture above was taken on 15 Jul

IMO we should rewrite FileProcessor and the weird code surrounding it. That will probably also resolve this bug. I've started working on it.

@ashishkumar468
Copy link
Collaborator

ashishkumar468 commented Oct 6, 2019

@misaochan I am not able to reproduce this . "Issues found with multiple uploads (with Android stock gallery): Unable to select more than 1 image in Android stock gallery. It works for Google Photos.". Can you reverify this on the latest commit form this branch, a screenshot for the same would be better, could be a device-specific issue. Just to confirm that is is a bug added by this branch, can you see if the same works for you on master. Has anyone else also faced this issue @maskaravivek @neslihanturan.

@ashishkumar468
Copy link
Collaborator

@misaochan About this " Dates appear to be using the upload date again instead of the date taken - the picture above was taken on 15 Jul", I am not able to reproduce this as well, I uploaded one of the images you had sent me (created date 20/05/2016), which seems to show up correctly the web app as well. Attaching the screenshot for the same
device-2019-10-06-120905

@misaochan
Copy link
Member

@ashishkumar468 I can't quite figure out the date bug. Upon testing the current version of backend-overhaul, I now get a completely unrelated date.

For instance, I uploaded https://commons.wikimedia.org/wiki/File:Jacaranda_in_bloom.jpg from Google Photos single upload. The template says the photo's date is 7 September, but I definitely took it on 7 October. The EXIF information on Google Photos corresponds to that.
Screenshot_1570553236

@ashishkumar468
Copy link
Collaborator

Hi @misaochan , If this is the case, I am sure this must be there on master as well, if that comes out to be true, can we take that separately?

@misaochan
Copy link
Member

Sure, I'm OK with merging backend-overhaul to master with this bug present (might be easier than trying to fix everything before merging), but we still have to fix it before releasing v2.12 with it. :)

@misaochan
Copy link
Member

@misaochan I am not able to reproduce this . "Issues found with multiple uploads (with Android stock gallery): Unable to select more than 1 image in Android stock gallery. It works for Google Photos.". Can you reverify this on the latest commit form this branch, a screenshot for the same would be better, could be a device-specific issue.

Yes, the problem still occurs for me on the latest commit. I tested using a Samsung Galaxy s9 running Android 9.0.

This is the stock Android gallery after tapping the FAB "+" button > Gallery. Long-pressing on any image does not initiate multiple selection.

Screenshot_20191009-025410_Gallery

This is the Google Photos gallery after tapping the FAB "+" button > Photos.
Screenshot_20191009-025429_Photos

I recall encountering a similar problem when we were selecting an image picker library to implement #604 (see also #2286)

@ashishkumar468
Copy link
Collaborator

Hi @misaochan, Can you verify if this is happening to you on master as well ?

@misaochan
Copy link
Member

misaochan commented Oct 9, 2019

Oops, another bug... when I was testing #3166 I uploaded a file titled "Story Bridge". The app warned me that the file exists, as it should, but it did not add a numbered suffix as it usually does. Instead, it overwrote https://commons.wikimedia.org/wiki/File:Story_Bridge.jpg

(Tested master for the multiple uploads bug. Does not work for me on master either. :/)

@ashishkumar468
Copy link
Collaborator

@misaochan So if it does not work for you on master as well, we should probably create a separate issue for that. I am sure this is something device-specific (weird though). Thanks for finding the other bug JO, I will look into that, so other than cross-wiki thing, only this is left on backend-ovberhaul, right ?

@misaochan
Copy link
Member

Yeah, if it works on your device, I think it's OK to address it separately. In order to be considered complete, the backend overhaul task needs 2FA logins to work in addition to the overwrite bug and cross-wiki calls. But it should be fine to merge the backend-overhaul branch to master after the overwrite bug is fixed, so that alpha testers can try it asap.

ashishkumar468 pushed a commit that referenced this issue Nov 6, 2019
* Migrated logEvents to retrofit (#3087)

* Switched wikimedia-android-data-client for new features

* Added UserCLient and UserInterface

* Migrated ContributionsSyncAdapter to UserClient
Fixed sync related bugs

* Removed unused code

* Removed unused code

* Updated wikimedia-android-data-client to new version

* Update library for data client (#3131)

* Backend overhaul fetch media by filename (#3081)

* Added class MwParseResponse and MwParseResult for receiving parse output

* Migrated fetchMediaByFilename to retrofit

* Removed unused code

* Added tests

* Migrated isUserBlockedFromCommons to retrofit (#3085)

* Switched wikimedia-android-data-client for new features

* Added UserCLient and UserInterface

* Migrated isUserBlockedFromCommons to retrofit

* Added tests and removed dead code

* Implemented ban checking functionality in UploadActivity

* Removed unused class AuthenticatedActivity

* Fixed tests

* Fixed NullPointerException when a user accessed image details without logging in.

* * Login the login token way, handle LoginResult minutely, add account based on LoginResult (#3151)

* Added progress updater in UploadService to show upload progress in no… (#3156)

* added progress updater in UploadService to show upload progress in notification

* formatting changes

* [Dependency: Quadtree] Remove unused code from cache controller (#3163)

* Basic logging with redacted sensitive headers (#3159)

* As per #3026, removed the obsolete classes in package mwapi (#3150)

* fixed compile time error (#3165)

* [Dependency fluent]: Remove unused dependency fluent (#3164)

* Donot init quiz checker in onResume (#3167)

* clear image cache on logout (#3168)

* Fixed default locale and upload locales in descrptions (#3166)

* Fix 2FA login (#3170)

* Fix build (#3172)

* Localisation updates from https://translatewiki.net.

* Closes #3094 (#3095)

* BugFix in SpinnerDescriptionsAdapter and SpinnerLanguagesAdapter (use the langguage code provided by the spinner, donot set the language to the one returned by the locale)

* Update changelog.md

* Versioning for v2.11.0

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Center map on location clicked in nearby list and notification card(#2060) (#2366)

* center map on location clicked in nearby (#2060)

* improved animation

* Center map on location clicked in nearby list

* removed unnecessary methods

* center map on location clicked in nearby notification card

* some minor changes

* travis build error

* resolved errors

* Tidy up PR

* removed swipe to delete (#2589)

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* edited CREDITS file (#3145)

* Unused dependencies are removed (#3141)

Part of #3128

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Working with #3129 issue (#3146)

* Replace Hard-Coded strings with those from strings.xml.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* delete res/values-en-gb (#3153)

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* First commit (#3093)

Fixes info icon color is Review

* Solution #3126 (#3155)

Fixed wrong upload dates after image upload

* Bugfix/fix upload presenter tests (#3158)

* Revert "Merge branch 'backend-overhaul' into master"

This reverts commit 0090f24, reversing
changes made to 9bccbfe.

* * Fixed upload presenter tests
* Deleted app/src/main/res/values-en-gb/error.xml

* Localisation updates from https://translatewiki.net.

* Remove dependency on Exif parsing library. (#2947)

* Remove dependency on Exif parsing library.

* Fix test.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Refactor nearby classes mvp (#2969)

* Create parent contract

* Create map child contract and fill methods

* Add javadocs and specific interfaces for list

* Move general method to parent and add javadocs for parent

* Add explanation for keeping an emty View interface under NearbyListContract

* Move constracts under contract package

* Create presenters for map and list and implement user actions accordingly

* Add javadocs

* Add presenter, contract and fragment for parent Fragment of both NearyListFragment and NearbyMapFragment

* Implement missing methods

* Fix typo

* Add main views on fragment

* İmplement child fragment logic and their retain

* Relate parent presenter with parent fragment

* Add all location permission related methods to view contract and implement in fragment. Call them from presenter by passing locationServiceManager parameter

* Define refreshView method as updateMapAndList which is a better naming. Define it at presenter part.

* Define a presenter variable in fragment and call updateMapAndList method from there, if permissions are okay

* Add lock neabry method to unlisten nearby operations during updates

* Add network connection established check on view side, check it from presenter

* try to simplify previous method during refactor

* Add missing methods for NearbyMap

* Connect child fragment and prent fragment with presenter

* Change nearby design, first create views then register listeners

* AddnetworkBroadcatsReceiver on view side, call it from presenter

* Add comments

* Change the old NearbyFragment by our new NearbyParentFragment for first tests

* Prevent crash caused child fragment is actually null by checking if it is attached or not.

* Makes sure that initialize nearby operations method is called just after all views and fragments are ready and attached

* Make sure updateMAoAndList method is called when everything ready

* Rename a method with prepoer name

* Call update map and add required markers

* Find out zoom level problem

* Implement add nearby markers and add current marker methods

* remove unneeded codes copied from previous implementation

* Revert "remove unneeded codes copied from previous implementation"

This reverts commit 4253965.

* add some commits and clear code

* Remove location listener implementation from view, handle them in presenter instead. And add timber debug notes and required method calls

* Style ,issues

* Refactor a variable name to camel case and bind search this area view

* Search this area button action is added

* Mostly implement search this area methods, not tested yet even once

* Make sure everything is called in required order and seach this area method basically works

* Rename methods accordingly and add Javadocs

* Add current location marker and remove circle around it

* Remove unused methods

* Add current location marker with object animator and remove previous marker is exists

* include clear map into add markers method and reorder methods

* Make search this area button appear at correct time

* Try to load un search this area is called

* Clear logs

* Add changes for permission made by Vivek to newly added fragments along with our nearby classes

* Add a view to nearby map ragment and insert map view as an item inside it

* Add logs to uınderstand why on meap ready callback is never called

* Add list item clicked and bottom sheet for list of nearby items is expanded

* Make nearby map ready callback came

* Add required methods to be called after map view is ready

* State: Map ready call is not called but permissions and methods are in correct order

* Remove unused logs

* Try to use SupportMapFragment instead, still no success...

* use SupportMapFragment instead

* Remove unused Near

* Upgrade mapbox sdk versions

* Remove Style import from fragment/NearbyMapFragment

* Remove Style import from **fragments/NearbyParentFragment

* Remove nearby/NearbyMapFragment

* Remove unused/old NearbyFragment and NearbyMapFragment

* Remove import of already removed class

* Make sure you removed everything related with mapbox implementation

* Update mapbox map

* Remove unused classes, do not forget centerMapToPlace doesn't work on this branch

* Remove Style class it required updated version of mapbox map

* Add base codes for new activity

* Prove that our mapbox sdk let us implement the map directly inside the activity

* Add base codes for testing mapbox activity in a single fragment inside activity

* Add codes from mapbox demo repository to test support fragment, map works in a single layer fragment

* Add base codes for test layered fragment activity

* Add Support fragment inside a fragment and proves that layered fragmentw with map works

* Test view pager and tab layout with support map fragment to see it works, it works!

* Move Contributions Fragment related codes to test activity

* Move nearby card methods

* Inject location manager and implement NerabyParentFragmentContract.View on test fragment

* Coppy the content of SupportMapFragment from mapbox repository, use this code to modify later. This method war suggested by mapbox team instead of extending the class

* Implement NearbyMapContract.View on our new SupportMapFragment

* Start to mplement logic of checking permissions

* Fix small dagger issue to inject location manager properly

* Request permission for nearby places if fragment is loaded and tab is selected

* Initialize map operations if map ready and tab is selected

* Markers loads at correct time

* Style the map according to new version of mapbox map

* Add some map elements like FABs and give their actions

* Implement map marker click actions

* Implement nearby Fabs logic with a small issue

* fix FABs are not closing problem

* Unkown problem occurs at map load when I try to use MainActivity again.

* Revert "Unkown problem occurs at map load when I try to use MainActivity again."

This reverts commit 3dc0844.

* Search this area buttons are added but button function does not work and button visibility is problematic

* Fix issue with MainActivity with the help of Ashish

* Fix search this area button visibility issue

* Fix the issues with updating search nearby markers and camera position together

* Fix progress bar visibility issue

* Prevent loding map each time tab selected

* Take toolbar back

* Implement back button with presenter

* Add click actoion to bottom sheet details

* Add nearby list into bottom sheeet

* Make reuse existing fragments if there is any

* Code cleanup

* Cleanup

* Code cleanup

* Add lifecyle codes to prevent leaks

* Cleanup

* Code cleanup

* cleanup

* Make list item clicked and map focus to same place

* Add bookmark from list fragment

* Make nearby card click action work

* Revert "Fix conflicts"

This reverts commit f345174, reversing
changes made to c5d4d55.

* Code cleanup

* Cleanup

* Make recenter button work when list sheet is expanded

* Cleanup

* Code cleanups

* NPE issue is not detected for now, can be solved on seperate PR

* Update map after Wikidata edit

* Cherry picked previously reverted merge, hoping this will fix enourmus amounts of diff files

* Previous merge bringed an file which should be deleted. Delete it.

* Revert irrelevant changes on build.gradle

* Revert irrelevant changes

* Jetbrains annotation is not included to build gradle, this issue caused build issues on my branch so I removed it to be able to build

* Rename ListView

* Use a singleton to access the presenter, instead of passing it to a variable inside fragment

* Fix code style issues

* Move hardcoded colors to colors.xml file

* Make larger methods smaller

* Make current location marker follow

* Do not track users position if user is searching around

* Revert irrelevant shanges at build gradle

* Remove unneeded variable

* Remove mvp directory, add sub directories directly under nearby directory instead

* Remove unneeded public definiton

* Remove unneeded namespace

* Add public defiiton, it is needed to reach the constructor.

* On Logout, fetch the CSRF token and then make the post logout call (#3182)

* Api call for logout

* call clear cached onCompleteSessionLogout

* Correction is passed file name to checkPageExistsUsingTitle, function expects file name prefixed with File: (#3194)

* Merge master (#3196)

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Mapped values-en-gb to values-en-rGB (#3161)

Fixes "Error: Invalid resource directory name" bug.

* Localisation updates from https://translatewiki.net.

* Removes the "Other" deletion option mentioned in #3174 (#3183)

* Localisation updates from https://translatewiki.net.

* Renamed resource file to prevent build from failing (#3189)

* Localisation updates from https://translatewiki.net.

* Removed some jargon/slang from strings.xml (#3162)

* Localisation updates from https://translatewiki.net.

* solve issue Avoid 'form movements' in the login screen #1107 (#2936)

* Disabled review buttons while an image is being loaded (#3185)

* Disabled review buttons while an image is being loaded

* Added javadocs for the new methods

* Fix build
@maskaravivek
Copy link
Member Author

All the items in this task have now been completed. Closing this issue now. :)

Thank you, everyone, for your contributions. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants