Commit graph

4230 commits

Author SHA1 Message Date
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
Josephine Lim
ff9f43ef8b Only do http logging if a debug build is run (#1795) 2018-08-04 21:13:10 +05:30
misaochan
f46da6639c Merge branch 'master' of https://github.com/commons-app/apps-android-commons 2018-08-04 19:29:55 +10:00
misaochan
18fbd47535 Merge remote-tracking branch 'refs/remotes/origin/2.8-release' 2018-08-04 19:29:50 +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
Mansi449
e4c518ccce removed repeated implementation statements 2018-08-03 11:48:01 +09:00
Mansi449
32610464f4 updated readme to include list of libraries used 2018-08-03 11:48:01 +09:00
VaishSiddharth
d7792d5861 In media search results, rotating screen triggers crash fixed #1753 2018-08-03 11:46:07 +09:00
Mansi449
781cfac7b1 changed 'login' to 'log in' 2018-08-03 11:41:27 +09:00
Ujjwal Agrawal
bf58fcab59 Fixed upload from gallery 2018-08-02 15:02:23 +05:30
Siddharth Vaish
911873379b Alignment of language selection dialog in About>Translate #1713 (#1776) 2018-08-02 19:14:56 +10:00
translatewiki.net
b0e962c85c Localisation updates from https://translatewiki.net. 2018-08-02 10:12:47 +02:00
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
Josephine Lim
22d2b1795c
Remove wrong imports that cause failed build (#1775) 2018-08-02 00:51:31 +10:00
albendz
0678410eea Add a string to tell the user to name their multi image set 2018-08-01 12:07:24 +09:00
Ujjwal Agrawal
23a195f486 Share from gallery for not loggedin fixed 2018-08-01 02:55:07 +05:30
Ujjwal Agrawal
67563e01df Changed skip login default value to false 2018-07-31 12:45:13 +05:30
Ujjwal Agrawal
987fff0c38 Javadocs added 2018-07-31 12:40:12 +05:30
Ujjwal Agrawal
8732c79f14 Removed extra logo 2018-07-31 12:10:55 +05:30
Ujjwal Agrawal
a4741974f1 Indentation fix 2018-07-31 12:08:51 +05:30
Ujjwal Agrawal
68165c7ea6 redirecting to category images Actovoty instead of Nearby now 2018-07-31 12:05:48 +05:30
albendz
6aa0f250f3 Provide toast to request title in multi upload share when title is empty 2018-07-30 11:57:01 -07:00
albendz
7ee6691120 Merge remote-tracking branch 'upstream/master' 2018-07-30 10:33:32 -07:00
translatewiki.net
3e5a6634cf Localisation updates from https://translatewiki.net. 2018-07-30 08:18:28 +02:00
tanvidadu
6f7793e5b0 Reworded the question 2018-07-30 11:28:22 +09:00
tanvidadu
ff2a89a054 Added space 2018-07-30 11:27:08 +09:00
Tanvi Dadu
b7f5c45b57 changed Icon (#1759) 2018-07-29 00:58:39 +05:30
tanvidadu
000c6085a7 Added more levels 2018-07-28 23:21:15 +09: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
misaochan
c64b7e6de3 Merge remote-tracking branch 'refs/remotes/origin/master' into 2.8-release 2018-07-28 22:59:49 +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
maskara
dac91fe8cc Add javadocs 2018-07-27 00:08:20 +05:30
maskara
c7000b7565 Remove unused imports 2018-07-27 00:06:49 +05:30
maskara
deb6e5b390 With http network logs 2018-07-27 00:03:03 +05:30
Ujjwal Agrawal
80068f7e9f Removed extra space 2018-07-26 18:32:56 +09:00
Ujjwal Agrawal
63fd945662 Handler for 0.01sec added 2018-07-26 18:32:56 +09:00
translatewiki.net
93b5c23ac8 Localisation updates from https://translatewiki.net. 2018-07-26 10:02:34 +02:00
Tanvi Dadu
e9c0aa22ea Feedback module (#1742)
*  Implemented Statistics

*  Basic Structure Implemented

*  Layout made screen independent and menu inflated

*  Share Screenshot using cache

*  Improved the Image Bound and added strings

*  Improved the quality of Pr

*  Wired to navigation drawer

*  Changed the bounds of the image

*  Added Info icon

* Removed the unecessary functionality

*  Updated JavaDocs and fetch the username

*  Fetch JsonObject from the api using JavaRx and OkHttp

* Added JavaDocs and improved quality

* fixed strings file

*  Improved the quality of pr

*  Render thanks , images used in articles on screen

*  fetch and rendered the upload count

*  FeaturedImages statistics rendered and Javadocs added

*  added ProgressBar

*  Added Class for calculating level

*  added level info and returned level info

*  level up info rendered on achievement activity

*  Inflated Level Number

*  Added the structure for badge

*  Added LevelUpInfo Programmetically on Drawable

*  aligned the text

*  changed the text

*  Implemented the structure for changing colour of drawable

*  Added functionality to change colours of badge during runtime

*  Added custom alert for share option

*  Improved the UI of screen

*  Added the alertDialog for info button

*  Improved the quality of PR

*  Added Builder model

*  Added Enum Model and increased levels to 15

* removed redundant class

*  Changed strings and added subtext

* Feedback Module: Add reverts rate parameter (#1649)

* Fetched Revert Count

* Refactored Achievements class and display the fetched results

* Refactored the levelController to include revert as parameter

*  Fixed error

*  Fixed bug

*  Added information for parameters and improved code quality

*  Javadocs added

*  Added null check and javadocs

*  Removed extra spaces
2018-07-26 13:12:51 +05:30
Ujjwal Agrawal
86878fb62d Add feature to Browse commons via app (#1716)
* Search activity, image search fragment added

* Removed explore icon xml

* Updated Javadocs for search Activity and Navigation Base Activity

* SearchImageItem class updated

* Javadocs added for search activity

* removed redundant code and added javadocs for search image modules

* Javadocs added for updateImageList  method

* Rename featuredImage to explore

* Fixed null query issue

* changed cisibility to gone in case of successful Fetch

* Consolidate the networking libraries - drop volley in favor of OkHttp

* Extracted a few networking related items into a new Dagger module and finished the process of mocking the main component for tests.

* Refactoring to extract GpsCategoryModel and ensure single-responsibility-principle is maintained in CategoryApi.

* fixed featured image back bug

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

* Javadocs added

* Add option to set image as wallpaper (#1535)

* Add option to set image as wallpaper

* Added java docs

* Toast message on setting the wallpaper successfully

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

* SearchHistory Fragment added

* Search History Item added

* Content Provider, RecentSearchesDao added

* Database version changed to 7 and added methods for find, save ,..

* Delete icon deleted

* Reverted changes in gradle files

* Reverted changes in gradle files 2

* Optimized Improts

* reverted refractor for container name

* Refactored packagename, changed name to query in POJO class.

* Updated lastUsed to lastSearched

* Javadocs updated

* Check if user has been in search page for 5 seconds if yes then save it to history

* If else indentation updated

* added import in test

* edittext replaced with Searchview

* RxSearchview added

* Added support for API 21+

* Snackbar removed on success

* Improved code

* Pagination added

* Removed unnecessary toast

* Comment added in method

* Support for landscape mode added

* Fixed screen rotation issue on Explore and Search activity

* Clear focus added

* Delete all function added in Content Provider and called from fragment

* Scrollbar Recyclerview added

* Share Icon changed to 32 dp and back button added in explore, search activity.

* Removed unnecessary code

* Wrote and run tests for Recent Searches
 (creating db, migrating from versions, deletion, finding,..

* Category Search Fragment added

* Adapter factory added

* Renderer added

* Improvements

* Viewpager adapter added

* Updated XML

* Improvements in category card design

* tabs colors changed

* renamed images to media

* Java docs improved

* Javadoc added for setTabs

* JavaDoc for ViewPagerAdapter added

* Refreshed listview after delete

* Added mediaContainer

* Fixed ghost issue in image search fragment

* Ghost issue for categories fixed

* Removed Calling API call onback press

* Category Details activity added

* Menu added in category details activity

* back button added

* back button bugs

* Improvements in category images fragment

* JavaDoc added for some methods

* trimming added, Tab layout hided, recent searches refreshed

* SubCategory list fragment added, API added to extract subCategory Details

* API params updated to get more precise results

* Javadocs added for MWAPI method

* Pagination removed

* Fix API for fetching images inside category

* Parent category API added

* Fix #1704

* Fix #1704 corrected

* Fix #1702

* Fix #1702 and #1704

* added try catch statements

* Optimimzed imports

* loops replaced with Functions

* Javadocs for various methods added

* Fix java docs for Dao

* Javadocs for various methods added

* Fix java docs for Dao

* More javadocs added for explore Feature

* Javadocs added

* Javadocs added

* Improvements in indentation (#1739)
2018-07-24 10:17:24 +03:00
Martin Urbanec
2171b6846d Get rid of legacy URL (#1646)
This URL still works but intended as legacy.
As there are more separate API endpoints,
I've renamed the folder to commonsmisc to
enable me to add all endpoints to one folder
and to reduce potentional damage that can be caused
by fogotting the symlink is there for a reason,
I'm renaming it in the Commons app as well
2018-07-23 12:05:11 +03:00
translatewiki.net
e872e5b82e Localisation updates from https://translatewiki.net. 2018-07-23 09:32:17 +02:00
seannemann21
1bf5dda4b2 Allow for settings titles to expand across multiple lines instead of being truncated (#1671)
* Added preference classes that allow for titles with multiple lines for settings with long titles

* Added null checks to ensure the title TextView isn't null
2018-07-23 08:50:46 +03:00
Vivek Maskara
5cfe709281 Fix view util methods to always execute on UI thread (#1728) 2018-07-22 18:51:41 +03:00
albendz
7b5b9169db Fix preview crash on local files during upload (#1696)
* Try to get the localized version of the wikipedia article before defaulting to the English version.

Tested with Spanish on physical Android device.

Other notes:
Difficulties building with gradle due to dexcount plugin: https://github.com/KeepSafe/dexcount-gradle-plugin/issues/234. In testing, disabled the plugin.

* Update article fetch to not include unnecessary SERVICE line

* Add checks for local file, check for string length
2018-07-22 17:43:33 +03:00
Kaartic Sivaraam
369fe3183c Give a useful label for the share intent (#1680)
It's better to give a useful label that would indicate what would
happen when sharing using the app rather than letting it default
to the app name.
2018-07-22 16:56:17 +03:00
neslihanturan
b520babb13
Merge pull request #1662 from sivaraam/commit-guidelines-blog-link
CONTRIBUTING: link to a blog about good commit messages
2018-07-22 16:22:22 +03:00
neslihanturan
faee423105
Merge pull request #1596 from tanvidadu/imageLicense
Introducing a brief exp of Image License
2018-07-22 15:33:55 +03:00
neslihanturan
b4d556a648
Merge pull request #1573 from seannemann21/show-block-status
Show Block Status if use is blocked
2018-07-22 15:29:05 +03:00
translatewiki.net
8069bb4ca6 Localisation updates from https://translatewiki.net. 2018-07-20 15:00:13 +02:00
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