Commit graph

231 commits

Author SHA1 Message Date
Rulino
2af57fc594 Empty screen if no upload fix (#1940)
* Updated contribution screen to show message for no uploads by default, message gets wiped after any picture is inserted into the list

* Changed string as suggested

* Added margin
2018-10-20 20:30:02 +05:30
Edward Savage
e36a71a584 Optimize imports (#1927) 2018-10-13 18:31:25 +11:00
Dmitry Brant
e945d45558 Work towards eliminating string literals from code. (#1861)
String literals are being used in many places in the code, instead of
proper string resources which are automatically localized. This PR
replaces many of the string literals with pre-packaged resources, or will
add the appropriate string if necessary.
2018-08-27 19:10:50 +10:00
misaochan
23014e07c8 Merge remote-tracking branch 'refs/remotes/origin/2.8-release' 2018-08-06 18:36:35 +10:00
Josephine Lim
e32f8d3d36 Fix title/desc prefill bug (#1794)
* Move isDirectUpload putExtra above Wikidata edits try catch block

* Check value of boolean isDirectUpload in intent

* Change to getBooleanExtra to prevent NPE

* Fix whitespaces, logging, and lint issues
2018-08-04 21:33:31 +05:30
misaochan
f46da6639c Merge branch 'master' of https://github.com/commons-app/apps-android-commons 2018-08-04 19:29:55 +10:00
Ashish Kumar
12a83da3a2 Feature/localised image descriptions (#1634)
* wip

* Changes for adding descriptions in multipe languages[issue #1501]

* Added callback for the adapter

* Codacy suggested changes

* Sort the languages in the spinner in alphabetical order

* scroll view nested scrolling enabled false

* Nested scrolling enabled false [Allow rv to expand]

* rebased to master, resolved conflicts

* replaced setCompoundDrawables with setCompoundDrawablesWithIntrinsicBounds [the former dint used to work on all devices]

*     replaced setCompoundDrawables with setCompoundDrawablesWithIntrinsicBounds [the former dint used to work on all devices]
2018-08-03 18:09:37 +05:30
neslihanturan
d29aa2e2e5 Fix urgent crashes A and E (#1749)
* Create utility class for contribution process

* implement method to save five from given URİ

* Add file utilities for directory checks

* Add ContributionUtils for saving file during upload

* Change method call acordingly with handleImagePicked() method

* Call method to save file temproarily when a photo to upload is chosen from contributions list.

* Call method to save file temproarily when a photo to upload is chosen from nearby list and map

* Arrange method call

* Write a method to save file temporarily during upload process. It will save the file to a internal path and it will be deleted by another method after upload process is done.

* Add a method to save a file to a given path from a content provider Uri

* On openAssetFileDescriptor method, use URi from temporarily saved file, instead of Contributions.getLocalUri which was Uri from content provider

* Edit uploadContribution method so that it will use FileInputStream from temporarily saved file, insdeat of the Uri from content provider.

* Make it work

* Code cleanup

* Add directory cleaner method

* Call temp directory cleaner method at the end of uplpoad process

* Use FileInputStream insted

* Add directory cleaner method

* Add file removal method

* Use external directory instead

* Make destination file name flexible

* Make it work with share action coming from another activity

* Make it work for Multiple hare Activity

* Code cleanup

* Solve camera issue

* Fix camera crash

* Cleanup

* Revert change of commenting out posibly useles code, because I am not sure if it is useless or not. Requires discussion

* Use timestamp in temoorary file names, so that we wont never create same file and access old file reference. It was a weird problem though

* Code cleanup

* Add nullable annotation to handleImagePicked method uri parameter

* Add Nullable anotation to method

* Code cleanup

* Bugfix: use uri.getPath() instead uri.toString

* Remove unecesarry file saving operation, which was added accidentally

* Fix travis fail

* Remove temp file if upload gets failed and file is still there

* Code cleanup:Remove unused parameters from removeTempFile method

* Empty temp directory on app create, in case some of files are still there

* Add null check to array to prevent NPE on first run

* Fix multiple uploads bug

* Remove file if upload is succeed

* Add external storage utility methods

* Check external file permission before saving files temporarily

* finish activity if permission is not granted

* Add log lines

* Remove files even if user decides to go back without sharing

* Add easy null check

* Change storage permission settings in singe upload fragment too

* Finish app if permission is not granted

* Code optimisation

* Remove temp file if upload process never is finalised on activity stop

* Bugfix maybe contribution is never created

* Fix travis build
2018-08-02 06:24:08 +10:00
misaochan
d05cf395d8 Merge remote-tracking branch 'origin/2.8-release' into 2.8-release
# Conflicts:
#	app/build.gradle
#	app/src/main/java/fr/free/nrw/commons/di/CommonsApplicationModule.java
2018-07-28 23:39:15 +10:00
Vivek Maskara
386bd0a106
Merge gamification branch with master (#1752)
* Quiz  (#1629)

*  Layout inflated

*  Layout for mcq added

*  Inflated Basic Layout

*  Implemented basic flow

*  Added the basic implementation pf score

*  Added the result layout

*  Added the result layout

*  Added functionality to set result

*  Changed the launcher intent to Quiz Activity for testing purpose

*  Explanations of answers added

*  Improved the layout of quiz result a bit

*  Fixed some minor issues

*  Fixed build issues

* Api Added and basic structure for calling implemented

* Added intents

*  Added the title

*  Fixed image error and improved quality of pr

*  Made separate class for checking quiz

*  Added counter

* Implemented back and next for quiz result

*  Added back functionality to quiz

*  Added progressBar

*  Fixed bugs

*  Improved code quality

*  Imporved code Quality

*  Updated strings

*  Added share screenshot function

*  Added checks and improved UI

*  Removed unused string

*  Removed unused string

* Adding checks and improving code quality

* Changed string

* Improved code quality

* Update strings.xml

* Update MediaWikiApi.java

* Fix build
2018-07-28 01:09:23 +05:30
Vivek Maskara
25b463901f Fix conflict between different product flavors (#1726)
* Fix conflict between different product flavors so that beta and prod apps could coexist

* Fix category content provider
2018-07-20 02:03:28 +10:00
misaochan
f1f41e59f7 Merge remote-tracking branch 'refs/remotes/origin/2.8-release' 2018-07-11 00:45:02 +10:00
Vivek Maskara
b2a150a3ae Fix issue where Wikidata edits were not happening (#1682)
* Added logs to debug wikidata edits

* Minor changes in logs
2018-07-05 20:13:37 +10:00
misaochan
43d9f0db07 Merge branch 'master' of https://github.com/commons-app/apps-android-commons 2018-06-23 20:35:17 +10:00
misaochan
54246fda6b Merge remote-tracking branch 'refs/remotes/origin/2.8-release' 2018-06-23 20:35:10 +10:00
dlsrks1021
e8b2dd7163 remove unused imports (#1606) 2018-06-21 07:28:27 +09:00
Vivek Maskara
1dc0a7c257 Fix resource not found exception with null checks (#1628) 2018-06-14 19:12:46 +10:00
misaochan
699d150fed Merge remote-tracking branch 'refs/remotes/origin/2.7.x-release' 2018-06-12 19:43:21 +10:00
Josephine Lim
1adb052705
Revert "Fix issue #1332 : Contribution Image auto/manual refresh if fetching fails" (#1609)
* Revert "Modify allow_gps_summary string (#1608)"

This reverts commit 3b6c94c8d6.

* Revert "Fix issue #1332 : Contribution Image auto/manual refresh if fetching fails"

This reverts commit 5aba7459bd.
2018-06-11 16:53:23 +10:00
misaochan
a458b8ad06 Merge branch 'master' of https://github.com/commons-app/apps-android-commons 2018-06-06 18:59:37 +10:00
Vivek Maskara
4815e93fc9 Make P18 edits to corresponding wikidata entity on uploading from Nearby (#1495)
* Localisation updates from https://translatewiki.net.

* Integrate API for displaying featured images (#1456)

* Integrate API for displaying featured images

* Add pagination and refactor code so that it can be reused for category images

* Add license info to the images

* Fix author view

* Remove unused values

* Fix minor issues with featured images

* Fix null license url issue

* Remove some log lines

* Fix back navigation issue

* fix tests

* fix test inits

* Gracefully handling various error situations

* Added java docs

* Update pull_request_template.md (#1476)

* Update pull_request_template.md

* Remove Javadocs mention

* Added required/optional notes

* resolves #1464 : MediaDataExtractor is making inefficient (redundant) server calls (#1496)

* Open map of place where picture was taken (#1360)

* Intent to map added

*  Merge conflicts resolved

*  Added the functionality to hide FAB incase of null coordinate

*  Merge Conflict resolved

*  Improve pr quality

* Improve Quality

*  Added nested FAB animations

* Nested FAB implemented

*  Improve Quality

*  Added up arrow

*  Javadocs Added

* Add nearby tutorial (#1467)

* Add dependency for MaterialShowcase

* Add actionview class to get a reference to material showcase

* Create a NearbyMaterialShowcaseSequence class

* Apply sequence steps

* Add first three steps of nearby showcase

* Add sequence id constants to make sure they will be displayed only once

* Add last step of sequence to explain plus fab

* Create an object to prevent customize all sequences every time

* Fix typo

* Code cleanup

* Add strings to strings.xml

* Code cleanup

* Revert irrelevant change

* Revert irrelevant change

* Remove showcaseview for recenter button

* Use single showcaseView instead of sequence

* Add single showcase view insted of sequence to be able to edit text style

* Make sure it will be displayed only once

* Cleanup

* Update strings

* Change dismiss text style

* CONTRIBUTING: fix formatting of the gist of the guidelines (#1453)

* CONTRIBUTING: fix formatting of the gist of the guidelines

First level headings for a gist seems to be overkill.

So, replace first level headings with an ordered-list which
sounds more meaningful.

* CONTRIBUTING: specify clearly that 'blame' is a feature of "Git"

The contributing file specifies about the ability to know who wrote
something without the need of @author javadoc tags but incorrectly
attributes the feature to GitHub.

Correctly attribute the feature to where it belongs, Git, and specify
the name of the feature to help users easily take advantage of it.

* Feature/switch to butterknife (#1494)

* Implemented butterknife in MediaDetailFragment [issue #1491]

* Implemented butterknife in MediaDetailPagerFragment [[issue #1491]]

* post merge upstream master wip [[issue #1491]]

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

* Bug fix #1504 (#1506)

* Bug fix #1504

* Filtered messages with ConnectException [issue #1504]

* A generalised message for exceptions in Nearby Activity [issue #1504]

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

* Fix security exception crash while accessing network location provider (#1498)

* Fix security exception crash while accessing network location provider

* Added java docs

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

* Log P18 edits to wikidata corresponding wikidata entity on uploading a nearby image

* Added java docs

* Fix test build

* Refresh nearby

* Refresh nearby list on successful edit

* Java docs

* Make authenticated wikidata edits

* Updated toast message to show entity name that was edited
2018-05-31 11:00:17 +10:00
Aarnav Jindal
5aba7459bd Fix issue #1332 : Contribution Image auto/manual refresh if fetching fails 2018-04-30 14:22:50 +03:00
Vivek Maskara
50d9cff8c6
Merge branch 'master' into directNearbyUploadsNew 2018-03-21 17:54:03 +05:30
neslihanturan
bad68d9499
Merge pull request #1265 from knight-shade/Fixes-#1262
Fixes #1262 Show correct image upload count in beta build variants.
2018-03-16 12:55:27 +02:00
neslihanturan
eaba96b509
Merge pull request #1176 from hismaeel/1119
Fixed Hard Coded Column issue. #1119
2018-03-16 11:09:47 +02:00
knightshade
cc02da8582 Removed debug logs used in development. 2018-03-11 11:03:14 +05:30
knightshade
2ae46a4c33 Modified the code to only function in beta build variant. 2018-03-07 16:06:36 +05:30
knightshade
7c32f57c31 Fixed upload count to show correct number of pictures upload by user in beta version of app.
Fixes #1262
2018-03-06 23:05:01 +05:30
neslihanturan
41494bea5b Fix conflicts 2018-03-06 20:32:28 +03:00
neslihanturan
5b88111289 Fix conflicts 2018-03-06 19:47:18 +03:00
misaochan
56d20106a3 Tidy up comments 2018-03-03 00:02:20 +05:30
misaochan
4f74aaed15 Improve debug logging in ContributionController 2018-03-03 00:01:11 +05:30
misaochan
5a50e63142 Add comment explaining fix 2018-03-03 00:00:48 +05:30
misaochan
1167837b9f Check that fragment is added to activity to prevent crash 2018-03-03 00:00:48 +05:30
misaochan
6cdf153bc1 Add TODO to fix IllegalStateException 2018-03-03 00:00:48 +05:30
misaochan
970df6e751 Send sharedprefs to handleImagePicked() camera case 2018-03-02 23:57:32 +05:30
misaochan
bbe58f003f Make controller method public and add call to initiateCameraUpload() in NearbyMapFragment 2018-03-02 23:57:32 +05:30
misaochan
13a73fdcac Create boolean for isDirectUpload and pass shared prefs to ShareActivity.java 2018-03-02 23:53:07 +05:30
misaochan
4e971eb708 Image handling now works 2018-03-02 23:52:32 +05:30
misaochan
da7916069f Implement onActivityResult() in map fragment 2018-03-02 23:52:32 +05:30
misaochan
1a7ea256cc Create ContributionController object 2018-03-02 23:52:32 +05:30
hismaeel
c54be08845 Fixed Hard Coded Column issue. #1119 2018-02-21 13:39:26 -05:00
Vishan Seru
4fc3040d52 Synced branch with master 2018-02-18 00:32:25 +05:30
Manuel Lorenzo
304bf51f5f Fixing some lint issues for #171 2018-02-07 11:32:24 +01:00
misaochan
f9c6240eaa Add comment explaining fix 2018-01-25 03:38:08 +10:00
misaochan
dc06fe789f Check that fragment is added to activity to prevent crash 2018-01-25 03:35:12 +10:00
misaochan
05044d4b9a Add TODO to fix IllegalStateException 2018-01-25 03:30:16 +10:00
maskara
7c54e95321 More cleanup based on comments 2018-01-14 02:09:32 +05:30
maskara
eb3e448452 Refactoring based on comments 2018-01-13 23:59:45 +05:30
maskara
e1afa6081e Refactor usage of dagger application with fixed dagger application 2018-01-13 16:16:47 +05:30