Commit graph

1171 commits

Author SHA1 Message Date
Kaartic Sivaraam
ed51d8b871 Rephrase misleading statement shown when skipping login (#2249)
* Rephrase misleading statement shown when skipping login

The previous statement was misleading as it could also
mean that the user could never upload pictures if he
skips login. This not the case because after skipping
the login he could login again if he wants to upload
pictures.

Clarify it by using a statement which states that he
would have to login in future in case he wants to
upload pictures.

* Rephrase with a better statement

The old statement doesn't read so well.
Rephrase it with a  better statement.
2019-01-04 00:07:45 +10:00
Vivek Maskara
be98a56ba0 Improve text for receiving shared images (#2266) 2019-01-04 00:05:00 +10:00
Vivek Maskara
a48a09a785 Use dexter for requesting storage permissions (#2258)
* Use dexter for requesting storage permissions

* minor changes

* Fix minor issue
2019-01-02 18:11:19 +02:00
Adam Jones
5317063689 Fix night mode issues with search and categories (#2213) 2019-01-01 16:25:46 +05:30
Zhao Gang
af291a5fcc Fix #2163: Hide subtitle message when uploading a single image (#2169)
* Hide subtitle message when uploading a single image (#2163)

* updateSubtitleVisibility: Javadoc and replace if with ternary operator

* updateSubtitleVisibility: change findViewById to BindView

* Remove null checks for views

Null check is not required while binding views with butterknife.
2019-01-01 16:08:12 +05:30
Adam Jones
5c8a0cdd93 Add WhiteSearchBarTheme to styles.xml (#2211) 2019-01-01 15:55:34 +05:30
translatewiki.net
774436ce7b Localisation updates from https://translatewiki.net. 2018-12-31 17:52:23 +01:00
translatewiki.net
da36d2cda3 Localisation updates from https://translatewiki.net. 2018-12-27 10:46:23 +01:00
Adam Jones
96d540372a Improve search UI (#2189)
* Improve search UI

* Undo irrelevant parts of commit
2018-12-21 17:24:48 +02:00
Adam Jones
fb3136ab19 Spelling mistake fixes (#2151)
* Spelling mistake fixes

* Spelling mistake fix
2018-12-21 15:20:52 +02:00
Adam Jones
d31574f6cd Fix #2197: Links on about page in night mode are correct color (#2199) 2018-12-21 14:26:30 +02:00
Hariharan
8e967a3698 UploadController: Added support for using author names. Fixes #1707. (#1856)
* UploadController: Added support for using author names. Fixes #1707.

* Minor PR tidy-up

* Reword preference item

* Null check to pass startUpload test
2018-12-21 12:52:59 +02:00
Ojonathan
f521e8886d Fix night mode accent color (#2098) 2018-12-20 18:20:21 +00:00
neslihanturan
5a584545a0 Fixes #2014 After re-logging, notifications bell icon is empty (#2173)
* Fix white background on notification bell icon issue

* Fix icon size to 36
2018-12-19 18:18:38 +00:00
Vivek Maskara
f3b450e020 Merge 2.9 release with master (#2174)
* Fix memory leak due to wikidata edit listener (#2048)

* Fix bookmark crash fix (#2047)

* Fix bookmark crash fix

* Fix check for bookmark creator

* Bug fix #2042 (#2056)

* Bug fix #2042
* Added a snack with retry when api in AA fails
* Increased connection timeouts in okhttpclient builder

* added missing string resource

* Bugfix/duplicate categories (#2080)

* Increased timeout to 60 seconds

* Bug fix #1550
* filter duplicate categories

* Fix crash because of inactive fragment UI (#2046)

* Fix crash because of inactive fragment UI

* Add java docs

* Add information icon action Fiixes #2055 2.9.0: the 'i' icon in nearby doesn't do anything (#2057)

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

* Remove unused mediawiki api dependency (#1991)

* Categories with pipe suffix (#1873)

* Bug fix issue #1826
Changes made :
-Certain category names used to show suffixed with strings prefixed with pipe '|'. Removed everything after the pipe. As per the discussion on the thread, its safe to remove everything after the pipe, including the pipe

* review suggested changes
*Code formatting
*Extracted out the index of pipe in a variable
*Added issue link in comments

* Remove libraries section from README (#1988)

* Remove libraries section from README

* Add wiki link to "libraries used" to README

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

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

* Use alert dialog instead of popup window, for nearby information

* Revert irrelevant changes, sorry
2018-12-19 18:59:49 +02:00
Josephine Lim
21edcb7cbe
Retry failed uploads - #1556 Allow users to easily re-upload failed uploads... (#2112)
* Add cancel and retry buttons on layout contribution

* Make sure your retry logic works

* Add cancel method too

* Add javadocs and remove debug logs

* Remove two unused methods

* Remove old and unused retry buttons as we do for their functions

* Check internet connection before button function, since function requires internet connection

* Remove unused variable

* Display possible solution for badtoken error

* Fix string
2018-12-20 02:56:00 +10:00
Adam Jones
0f69deab84 Fix #2147: Remove strings from notification and place layouts (#2150) 2018-12-19 01:33:48 +05:30
Zhao Gang
db38174eb4 Fix #2156: Add plural support for share_license_summary string (#2161) 2018-12-18 17:29:11 +00:00
Adam Jones
525eb9ab50 Remove unused readmoretextview dependency (#2160) 2018-12-18 14:36:17 +02:00
HectorRoblesWolf
790bb3c19e Issue #1981 fixed (#1998)
* notification: replaced ReadMoreTextView by TextView

* removed com.borjabravo:readmoretextview:2.1.0 package

* Update build.gradle

Re-add implementation 'com.borjabravo:readmoretextview:2.1.0' to prevent travis fail
2018-12-18 13:59:33 +02:00
Adam Jones
1213678040 Use fitCenter instead of centerCrop where sensible (#2149) 2018-12-17 15:53:47 +02:00
Divyanshu Shukla
83b52fc1b9 Fixed #1948 Search feature is light in dark theme (#1951)
* Fixed #1930 Achievements activity is crashing on Android 8.1

* Fixed #1930 Achievements activity is crashing on Android 8.1

* Delete gradle-wrapper.properties

* Update build.gradle

* Create gradle-wrapper.properties

* fixed #1948 Search feature is light in dark theme

* Update FileUtils.java

* Update FileUtils.java

* Update FileUtils.java

* Fixed #1948 Search feature is light in dark theme

* changed files for the build

* Made the changes asked for

* Made the changes asked for

* Update gradle.properties

* Update gradle.properties

* Made changes in RecentSearchFragment
2018-12-17 13:43:58 +02:00
Mojtaba Rahimy
f79456ec8e "Skip Tutorial" button moved to parent view so that it does not animate by swipes. (#1945)
* Update WelcomeActivity.java

Now it starts welcome screen after not finishing the pager. Moved "Skip Tutorial" button here so it does not animate by swipe.

* Update activity_welcome.xml

Putting  "Skip Tutorial" button here so that it does not animate by swipes.

* Update LoginActivity.java

Removing the set of "first run " flag from here. we set it after the buttons press or on WelcomeActivity's finish()

* Update welcome_do_upload.xml

removing "skip tut" button from here.

* Update welcome_dont_upload.xml

Removing  "Skip Tutorial" button from here so that it does not animate by swipes.

* Update welcome_image_details.xml

Removing  "Skip Tutorial" button from here so that it does not animate by swipes.

* Update welcome_wikipedia.xml

Removing  "Skip Tutorial" button from here so that it does not animate by swipes.

* Update WelcomePagerAdapter.java

the "welcomyesButton" is removed from the child views in pager, so it is optional now.

* Add JavaDoc to WelcomeActivity.onBackPressed()

* Fix #2103: Remove welcomeYesButton from landscape layout

* Refactor WelcomePagerAdapter
2018-12-17 13:20:13 +02:00
sp2710
11e5c3c01a Defined SearchActivity tab names into strings.xml file(#2136) (#2137)
* Defined SearchActivity tab names into strings.xml file(#2136)
2018-12-17 11:08:04 +00:00
translatewiki.net
174e58c49f Localisation updates from https://translatewiki.net. 2018-12-17 08:49:29 +01:00
Shrey
78ca1fe64e Update app icon (Fixes #868) (#2022)
* Add new logo

* Revert changes affected by merge

* Add adaptive icon for beta version
2018-12-17 11:13:46 +05:30
sp2710
102b2d7e56 Fix #2134: Remove formatting characters from upload_problem strings (#2135) 2018-12-17 00:40:24 +00:00
neslihanturan
47f10cb6c8 Fix string 2018-12-16 15:47:36 +03:00
neslihanturan
718ad3a12c Fixes #945 Check image coordinates for direct Nearby uploads in locations that the user is not currently in (#2099)
* Add getGeolocation method to geolocation from file path

* Add geolocation check to receiveDirect method checks, means it will be checked durimg nearby direct uploads

* Create method body for geolocation and nearby place coordinate comparaison, this method will be filled on consequent commits

* Add a method to find location missmatch

* app/src/main/java/fr/free/nrw/commons/utils/ImageUtils.java

* Add if check to upload activity to detect pictures with wrong location, and save it to shared prefs

* Do not edit wikidata item if picture has wrong location info

* Add one more bitwise operand to possible warning reasons for wrong location case

* Add a bitwise variable for wrong locatio case

* Share nearby place location just like wikidataEntityId, so that we can compare

* Implement check image geolocation is different method by comparing nearby location and file EXIF geolocation

* Add Javadocs

* Remove logs

* Fix all taken on wrong phrases as taken at

* Fix typo on logs

* Simplify if logic

* Fix string issues
2018-12-16 22:26:44 +10:00
Ashish Kumar
1b01c6517f Show campaigns (#2113)
* Show campaigns
* Added a ui util class SwipableCardView which passes the onSwipe event to its children
* NearbyCardView & CampaignView extend SwipableCardView
* Fetch campaigns in ContributionsFragment
* Added an option to enable disable campaign in Settings/Preferences

* synced strings with master

* removed duplicate initialsation of CampaignPresenter
2018-12-15 02:55:53 +10:00
neslihanturan
ce4a0c1194 Display possible solution for badtoken error 2018-12-14 18:03:26 +03:00
neslihanturan
2569bb45f7 Check internet connection before button function, since function requires internet connection 2018-12-13 20:22:20 +03:00
neslihanturan
f3818c6e23 Remove old and unused retry buttons as we do for their functions 2018-12-13 18:07:50 +03:00
Shridhar Goel
2175ba2d89 Fix #2104 by removing delete recent searches button when list is empty (#2105)
* Fix #2104 by removing delete recent searches button when list is empty
* Changed text to 'No recent searches' when the list is empty
2018-12-13 13:04:29 +00:00
translatewiki.net
2cd485359d Localisation updates from https://translatewiki.net. 2018-12-13 09:02:03 +01:00
neslihanturan
c7f6849cef Add cancel and retry buttons on layout contribution 2018-12-12 17:15:15 +03:00
Vivek Maskara
f3a90c004c Upload tests (#2086)
* Add unit tests for upload flows

* Tests for upload model

* Test fixes

* Remove empty test cases

* Changes based on comments
2018-12-11 02:15:24 +10:00
translatewiki.net
1070137741 Localisation updates from https://translatewiki.net. 2018-12-10 08:06:17 +01:00
neslihanturan
677e0099af Search this area (#2051)
* Recognize user is moving on the map and show a button

* Use variable from strings xml instead of hardcoded string

* Change search this area button location in xml file

* Add location util file to convert mapbox LatLng to commons Latlng and viceversa

* Populate places around searched area

* Update narby map according to new points came from searched area

* Add searchThisAreaMode boolean to stop nearby map updated when we try to search nearby areas.

* Lock auto nearby operations during serch this area mode, with a more modular method and decrease code repetition

* Add an if clausse to prevent multiple refresh view calls, while map is moving

* Disable map gestures during search this area operation, re-eable them on operation is done

* Add progress bar during search this area operation

* Make sure you locked the map during search nearby map process

* Implement recenter map view button

* Fix logic problem and make sure you refreshed the view on coming back to previous position

* Use custom refresh method instead

* Use latest updated location from location manager isntead

* Update ListFragment accordingly too

* Do not update camera target according to bottom sheet status or do not follow users location with camera, if search this area mode is on

* Add javadocs, sorry forgotten previously

* Remove unused method

* Threat both or search this area and regular search in same way

* Make sure distances are correct

* Seperate cutom location updates and current location updates from each other to continue other operations

* Remove all logs, and make sure search this are button is not visible for no reason while around of current location is already loaded

* Notify load attractions from location method about search status, current location of custom location

* Make sure we calculate searched area and display search this area button when we are out of 3/4 of total searched area
2018-12-06 03:06:50 +10:00
HectorRoblesWolf
57c7fd384a added new icon and download button now visible (#2005) 2018-12-03 20:52:55 +02:00
translatewiki.net
43c80e3fb0 Localisation updates from https://translatewiki.net. 2018-12-03 07:38:14 +01:00
translatewiki.net
c2addd902a Localisation updates from https://translatewiki.net. 2018-11-29 17:48:02 +01:00
maskara
0771a28e94 fix string resources 2018-11-27 22:38:47 +05:30
maskara
4a2cdb70b9 Merge branch '2.9-release' 2018-11-27 22:38:20 +05:30
translatewiki.net
7d238dc65b Localisation updates from https://translatewiki.net. 2018-11-26 07:52:48 +01:00
Vivek Maskara
a248e6114c Fix desc icon clickable area (#2025)
* Fix desc icon clickable area

* Added java docs
2018-11-26 04:08:15 +10:00
neslihanturan
d62a7586e0 Fixes #2001 New main UI - progress bar in Nearby card view sometimes runs forever. (#2021)
* Localisation updates from https://translatewiki.net.

* Remove unused mediawiki api dependency (#1991)

* Categories with pipe suffix (#1873)

* Bug fix issue #1826
Changes made :
-Certain category names used to show suffixed with strings prefixed with pipe '|'. Removed everything after the pipe. As per the discussion on the thread, its safe to remove everything after the pipe, including the pipe

* review suggested changes
*Code formatting
*Extracted out the index of pipe in a variable
*Added issue link in comments

* Remove libraries section from README (#1988)

* Remove libraries section from README

* Add wiki link to "libraries used" to README

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

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

* Display nearby notification only if it is loaded

* Cover don't ask again checkbox is selected posibility

* Clean commented out codes

* Add strings to string.xml

* Add unable to display text to strings xml

* Fix nearby card permission explanation string

* Add never ask again checkbox to dialogbox

* Add action to never display checkbox

* Implement a setting on settings page, to be able to enable this setting later

* Revert unnecessary changes
2018-11-26 03:47:41 +10:00
translatewiki.net
38891269fa Localisation updates from https://translatewiki.net. 2018-11-22 07:25:01 +01:00
Vivek Maskara
2bcc8c10b6
Merge branch 'master' into addedReasonList 2018-11-20 21:16:51 +05:30
Vivek Maskara
f607c1c14d Multiple uploads with over haul (#1968)
* Added new upload activity that receives shared files from the gallery.  Cards show and hide, plus titles are correct.  Displayed thumbnails for the shared images

* Better handling of the view paging plus error handling for required fields.

* Code cleanup to make things more readable.

* Extracted a model from the category search fragment that can possibly be shared with the new upload activity.

* Added category selection to the combined upload screen.

* Cleanup before the home-stretch on the GUI.

* Adding license selection.

* Fixed build warnings + cleanup

* Start to support the dark theme.

* Work in progress to add quality checking.

* Fixing merge.

* GPSExtractor: optimized away the EXifInterface object

* Implemented submit functionality, temporarily fixed jacoco crash by disabling DUMMY UploadView object.

* Implemented uploading of categories along with the picture. The category screen now displays GPS and recent categories when nothing is searched.

* Implemented caching of files. Did some work on picture quality detection.

* Implemented too dark picture detection.

* Added a side card for zoom and map buttons along with pretty animations for stuff.

* Added duplicate image on commons checking and fixed files not getting proper file extensions in several places.

* Added support for map button and switched in-app upload buttons to UploadActivity

* Pretty pretty animations!

* Implemented zoom functionality for th background image. Just pinching on the image works instead of requiring buttons.

* Added multi-language descriptions with categories by region.

* Reimplemented the duplicate title checker and implemented a check against putting the same language twice in the description.

* Javadocs for Description and UploadPresenter, plus some general cleanup.

* Small code changes.

* Implemented login checks for the Upload screen.

* Implement receiving data from Nearby.

* Feature/permissions library (#1855)

* Added permission for Dexter, the runtime permission handling library

* [Preparing fir issue #1773] Added a utility function which would take the user to app settings screen where he could manually give us the required permission

* Added an alert dialog with positive and negative callback [Preparing fir issue #1773]

* Improvements in the way External Storage Permission is handled in MultipleShareActivity[Bug fix #1697]
1. Used dexter to handle the external storage permission
2. Behaviour changes : When user tries to share(uppload) images to commons via MultipleShareActivity, following decision tree is followed
	a. If the app has permission for external storage, normal upload operation is followed
	b. If the app does not has the permission for external storage, dexter is used to ask for the same
	c. If the user gives us the required permission, normal upload flow is proceeded
	d. If the doesnot gives us the required permission a rationale dialog is shown with the appropriate message to let him know why we need the permission
	e. If he presses okay, steps a-c are followed and if he presses cancel, we close the app.
	f. If while asking for permission, the user chooses never ask again, then next time he tries to upload an image via MSA, the rational dialog follows the app setting screen where he could manually give us the required permission and the onActivityResult of same is handled

* Added a Constants class to handle request and result codes from one place and other related constants common to the all app elements

* replaced hardcoded strings ok and cancel in DialogUtil to string resources

* init permission rationale dialog in activities onCreate

* Code formatting, updated access modifiers wherever required, added javadocs for new methods created

* *shifted constants to app class
*Added JavaDocs in PermissionUtils

* removed class REQUEST_CODES from CommonsApplication and instead put the enclosing constants in the App class itself

* Made Codacy happy.

* Abstarcted permission acquisition into new class DexterPermissionObtainer

* Fixed Nearby upload detection

* Migrated bad picture detection from AsyncTask to RxJava.

* Removed ShareActivity and related dead code

* Removed dead or duplicate code from FileProcessor

* Added info button to title EditText

* Fixed the add description button not disappearing.
Added "Starting Upload" toast.
Added link to the license on final screen.
Made it so that the map button is hidden when image lacks gps coords.

* Support in app multiple uploads

* Minor changes to fix build

* Changes to fix pending issues with upload flow

* Fix display of similar image fragment

* When uploading several files at once the date is missing #1854 (#2)

* Bug fix issue #1854
* updated ContributionsDao to save create date, which it was not doing currently [it was instead saving current date]
* UploadItem accepts are dateCreated param
* Added a function in UploadModel, getFileCreatedDate which tries to fetched the file creaction date from all possible content providers.

* Fix pending issues in upload flow

* Make multiple uploads work for Google Photos

* Fix default state for upload activity

* Fix keyboard state for license screen

* Fix descriptions for uploads

* wip

* Fix language spinner
2018-11-19 17:00:32 +05:30