Skip to content

Main screen UI overhaul #725

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

Closed
misaochan opened this issue Jun 5, 2017 · 64 comments
Closed

Main screen UI overhaul #725

misaochan opened this issue Jun 5, 2017 · 64 comments

Comments

@misaochan
Copy link
Member

misaochan commented Jun 5, 2017

Neslihan has started on the UI overhaul at #712 . The main goals of the new UI are:

  • to make the 'Upload from gallery' and 'Upload from camera' buttons more obvious (either through the design below or a floating action button)
  • to have a separate tab for viewing other Commons images near the user, while the main tab allows them to view their own contributions
  • to display notifications to the user when they are near a place that needs photos, or their images are nominated for deletion, or used in an article, etc

I am copying a screenshot of the main design below, but please refer to her PR for more details. Feedback on the proposed designs are most welcome.

Edit: Removed screenshots because they are outdated, refer to Neslihan's below.

Other questions for discussion:

Re: the tab for "Pictures that other people have uploaded near you":

  • Should we store images in database?
  • Should we store only image urls in database?
  • Should we upload information by location changes? We can add a button to refresh, or we can update it per x km.
  • How many photos from nearby places should be displayed initially?
@misaochan
Copy link
Member Author

Also, to add:

When this UI has been implemented, I am guessing we will want to remove the camera and gallery buttons from the action bar. I wonder if it would be a good idea to put "camera" and "gallery" in the nav drawer in that case, probably right below "home"?

That might be redundant, but redundancy of our main feature might not be such a bad thing. :) Also, the nav drawer might get a bit crowded when we do that, so we might have to find a way to separate the 3 main items from the others. Some apps like gmail use a divider between groups of items, which might work for us.

@neslihanturan
Copy link
Collaborator

I also think it is not a bad redundancy. I was a little busy for 2 days (and also tomorrow will be) that's why couldn't add any code to UI thing. My opinion about our questions are:

  • Don't store images in db.
  • Yes.
  • No idea
  • 20 photos.

@misaochan
Copy link
Member Author

Don't worry about it. :) We can actually put the UI overhaul into our renewal proposal if needed, so no rush.

My opinions are

  1. No
  2. Yes
  3. Either way is fine with me for displaying the results, but if we are caching the image URLs they need to be associated with a location, otherwise I'm not sure what the point of the cache would be
  4. I think we could set a default (maybe 50-100?) and let the user choose in Settings

@misaochan
Copy link
Member Author

misaochan commented Jun 21, 2017

It was suggested to me by Jordan Adler that we use a floating action button for 'Upload' instead. That would solve the issue of users scrolling past the top square and then not being able to easily access upload. But we would need to redesign the top 2 cells in that case.

What do you guys think?

@misaochan
Copy link
Member Author

Also, is it a bad thing to have TWO floating action buttons (gallery and camera)?

@misaochan
Copy link
Member Author

misaochan commented Jun 21, 2017

And, how do we make this design work in a landscape orientation?

Also, worth noting that if the renewal is approved, we will be providing two types of notifications - nearby place that needs a picture, as well as account notifications (your photo was deleted etc). Do we want both of them in the same box?

@neslihanturan
Copy link
Collaborator

drawing
So such design is easier to implement maybe?

@misaochan
Copy link
Member Author

That looks good to me! :) would anyone like to chime in on whether they think the latest mockup is better than the one in the opening post?

Re: the floating action button, the current design is meant to only show the small buttons (upload and gallery) when the + button is tapped, right? I can't decide if that is preferable to having 2 buttons that are visible all the time. The design above looks very elegant IMO but I'm not sure if users will be happy if they have to do one extra tap whenever they want to upload?

@neslihanturan
Copy link
Collaborator

I think extra tab on floating button is even better because it prevents from activity being changed by accidental clicks. Plus I also liked this design.
Plus, on other tab, we can use a floating button to select location from map and explore that location.

@misaochan
Copy link
Member Author

misaochan commented Jun 21, 2017

Also, uh, a wild idea - what do you guys think if we use Nearby as the second tab instead, and have "contributions from other people near you" in the nav drawer where nearby used to be (possibly titled as "Browse")? We could keep this design (don't worry neslihan!), just swap things around. If we do this, then Nearby would need a FAB for swapping between list and map, and swipe down for refresh.

(I am proposing this because Nearby appears to be our most popular feature)

@misaochan
Copy link
Member Author

misaochan commented Jun 21, 2017

Good point re: the accidental clicks, I agree with the single button in that case.

Additional note: I think it might also be a good idea to have the 1st tab say "My contributions" and the action bar say... I dunno, "Wikimedia Commons"? Instead of "My recent uploads", which wouldn't make sense when we're in the second tab.

We also need to think about where we want to display the number of uploads in this UI.

@neslihanturan
Copy link
Collaborator

No... I am not crying. Just there's something in my eye... What can I say, nearby as second tab is better:)

@misaochan misaochan added the IEG label Jun 21, 2017
@nicolas-raoul
Copy link
Member

This mockup looks great!
The plus button could reveal several options (camera or gallery) like it is in Google's Calendar app.
My vote too for putting Nearby in the second tab ;-)

@misaochan
Copy link
Member Author

misaochan commented Jun 22, 2017

@neslihanturan I would like to include your mockup in the renewal proposal. :) A few requested changes:

  1. Could we have a gallery and camera icon for the second-tier FABs? I think we only need 2 second-tier buttons, not 3, at the moment
  2. Could we change the notification text to something more meaningful - e.g. "Nearby location without photos - Newstead Gasworks 0.5km" (or you can put whatever name you want), and "Your picture 'bad_selfie.jpg' was nominated for deletion"
  3. Could we have "Explore" renamed to "Nearby"
  4. Change text in action bar to "Wikimedia Commons" (I'm not sure about this, but "My Recent Uploads" definitely wouldn't be appropriate with this new design

Additionally, a mockup for landscape view + day theme colors would be wonderful. :) I'm not sure how to get around the issue of different-height cells in landscape though, so if this can't be done in time for the proposal then no worries.

Thanks!!

@neslihanturan
Copy link
Collaborator

According to the e-mail I just get from @pauginer , we can add an animation when the notification comes up instead of a persistent notification. He sent some mock-ups about our previous design idea (because we just changed our decision) but I think we should implement the same to our new design idea too. Here:
commons-app-transition

@misaochan
Copy link
Member Author

@neslihanturan Would this still work if we wanted to display 2 notifications simultaneously (1 for Nearby and 1 for account)? There will always be a Nearby notification (unless we want to set the radius for notifications really low), so IMO it might work best to always have space for 2 notifications.

@neslihanturan
Copy link
Collaborator

@misaochan here are fixes you noted :)

black-horizontal
black-vertical
white-horizontal
white-vertical

@misaochan
Copy link
Member Author

Wonderful, thanks @neslihanturan ! I'll put them in the renewal proposal when I write it next week. :)

@domdomegg
Copy link
Member

Might be good to have text next to the upload buttons saving "Camera" and "From gallery" - although it might be clear enough already.

image

Alternatively, we could handle it a bit like Google Maps does, where when you add a photo by default it shows your gallery and then has a take a picture option from there:
image

@neslihanturan
Copy link
Collaborator

@domdomegg we can extend the buttons to up side and add texts of course.
However, I personally don't like when the button with "+" is transformed to another action button on click. For example the button is transformed to "edit" action on your example or "new conversation" on Hangout application.
device-2017-06-25-191507

On accidental clicks, or clicks to discover what does "plus button" do (clicks doesn't aim to operate the actions), after new buttons get appeared, users reflex is click to the plus button again to get rid of them. In this case, when the plus button is not a plus button any more, it redirects you to another operation which is disturbing. By the way, it is only my user experience.

So, I am good with adding texts but I insist for plus button stay as is (maybe just set "minus" instead of plus). Because when new buttons get appeared, it feels me like drop down menu arrow click operation, so it should behave like that too.

@misaochan
Copy link
Member Author

I agree that the button shouldn't "transform".

I'm good with either with or without text, though personally I think the icons are clear enough currently. If we ever need to add more 2nd tier buttons that might be less clear, then perhaps texts could be considered at that stage.

@veyndan
Copy link
Contributor

veyndan commented Jul 3, 2017

I don't know if input to the design is too late but here is my two cents.

IMO the design is way too complicated. We have a Floating Action Button, a Hamburger menu, AND tabs. This seems like overkill to me. I kind of feel overwhelmed by the proposed design, and as I am someone that has used the app quite a bit, I can't imagine how a new user would feel. My opinion on the hamburger icon has been voiced in #428, and I still believe it is not the best design choice for the app.

Instead of being one to criticise without giving an alternative solution, here would be my take on the design:

Have a bottom navigation with items: home, upload, and nearby. These functions are very easily accessible, being always in sight. Things like Settings, About, Tutorial, Feedback, and Logout can go in the toolbar. They are still easily accessible from every screen but are out of site which is OK as they aren't used that much. All this greatly simplifies the app and makes the UX (and the UI) better due to ease of navigation. Ultimately this reduces it from 3 navigation components (FAB, Hamburger, and tabs) to just 1, the bottom bar.

If you'd like a mockup of this, please say such that I can make one. Or if you just want some clarifications on my thoughts please say.

Thoughts?

@neslihanturan
Copy link
Collaborator

First of all I think Josephine plans to add the mock-ups to the report so it would be better if we can choose a design quickly. So I encourage everyone to help this discussion whenever they have time.

As an old fashion user that uses apps very rare, I always prefer to have accessibility to everything from a menu such as hamburger menu. Plus, I think bottom navigation feels like tabs on the bottom, so they should behave like tabs. However, uploading is an "action" (not a place where you want to navigate to, so I think it suppose to be a button), we don't have anything to display when user has selected the upload item. If we only add nearby and home items, then according to documentation we should use tabs instead (because they are only 2). Do you have any other idea to facilitate upload?

On the other hand as far as I remembered, navigation bar is requested (I remember your didn't agree by the way :) ), and applied by @maskaravivek . Then you ( @veyndan ) made it even prettier. I think we should be careful about chancing it, because you already gave your efforts. This kinds of changes of decisions (after implementation) might make team lose motivation.

However, I don't have knowledge of UI and UX and I trust your critics. So, please draw some mock-ups. It is never late to change decision :).

@veyndan
Copy link
Contributor

veyndan commented Jul 3, 2017

Bottom navigation has become a standardised concept in Android, and shouldn't behave like tabs as per the spec. Many popular apps use this type of navigation now e.g. YouTube, Instagram, Google+ so the user should now how they work and shouldn't except them to act like tabs. Personally I don't think that uploading should be a button even though it is an action. See the Instagram UI for an example of this where you upload an image by clicking on an item in the bottom bar. Having it at the bottom and centred makes it the main focus of the app as well. Therefore there will still be 3 items.

I feel that choosing either yours or my design would require a large rehaul in the UI, but it is important that we choose the correct design (whichever one that is) as rehauls of the UI will only happen rarely.

To be honest I don't know how much time I'll have over the next while to implement the mockup then the design. If everyone's happy with the current design, just go with that. I thought it'd be good to just voice my opinions to get some more input about the design. Maybe if we decide to change the design again in the future I can be a bit more active in the discussion and development.

@neslihanturan
Copy link
Collaborator

neslihanturan commented Jul 3, 2017

I just discovered how Instagram is implemented the upload button. I still think it feels a little weird, but probably most of users will know how it works. And I have two more questions,

  • How user will navigate from let's say settings activity to the main screen again?
  • Can't we protect the hamburger menu and change the tabs to bottom navigation? So we would prevent from @maskaravivek 's and your work become wasted energy.

@misaochan
Copy link
Member Author

misaochan commented Mar 15, 2018

I've been thinking about the notification display a bit...

It seems that this display of notifications (the second item in the blue section on the main screen, as per our mockup) will not be as simple as the first item (nearest location). Should we display the LATEST notification always, even if it's a thanks or a user talk message, or should we display the latest file deletion? And what should we display after the user has already clicked on it? Certainly there would be no point displaying the same message, so do we simply leave that line out if there are no unread notifications? What if the user doesn't click on the notification itself, but rather manually opens the notification activity?

Should we also implement the notifications icon displayed on the toolbar (as per #725 (comment) )?

@neslihanturan
Copy link
Collaborator

You are very right about your concerns @misaochan I am thinking for solution.

@neslihanturan
Copy link
Collaborator

neslihanturan commented Apr 20, 2018

  • For closest nearby marker:

    • Even if user click to the indicator and upload photo for nearby place, the point still will be therehttps://github.com/Wikidata image not set #1409. Until we implement Upload a picture directly from list of nearby places needing photos #252 , same point will be displayed to user and this will be annoying.7
    • Before loading our map (switching to nearby tab) we won't be able to load nearby places. Even if we decided to load them on activity create, we can't. Because it would be weird requesting location permissions from user while user is looking at contributions list.
    • My solution: Displaying closest place indicator and speed up implementation of Upload a picture directly from list of nearby places needing photos #252 . To solve loading markers problem, display closest place if location permission is granted. If permission is not granted display a button with text "Display closest location needed photos", when user click to this button request permission. If user gives permission, display the place, if not continue to display the button. But this means that we should listen location changes and update places if user is moving, just during display of constructions. This can be wasting our resources both data and battery.
  • For notifications:

    • Even if we are able to recognize read and unread notifications, since user can also read some notifications from our app (with show more button), the notification will be tagged as "unread" while user read it from app. I don't have a solution for this.

After our latest changes, I have some doubts about this UI implementation team. What do you say?

Besides, what about adding some options for grid style, displaying photos on map, and displaying by categories with a list of categories? Like in Instagram
image

@misaochan
Copy link
Member Author

misaochan commented Apr 20, 2018

I agree that this should wait for a bit while we discuss things further. If anyone would like to chime in about the new UI, now's the time! ;)

Responding to @neslihanturan 's points:

Nearby:

  1. I agree, but Upload a picture directly from list of nearby places needing photos #252 is high priority so it is unlikely we will do any new major releases before that is complete.
  2. I don't think this is impossible. We could request permissions anyway and display an explanation that it is needed to show the nearest location that needs pictures, right? If user declines, then we don't show the nearest place, and load the UI without it.
  3. I agree with this. However, I don't think it's too bad to listen to location changes while the contributions activity is actually in the foreground. Of course, we must cease onPause.

Notifications:

  1. How about, for the moment, we just tag everything as "read" once the user accesses the notifications activity? They can see the summaries from there anyway. If there are no new notifications after the last time the user opened notifications activity, then hide that line. However, that does mean that we need to check for notifications on loading Contributions activity. It also indirectly decides what happens when user taps on that line - they should be brought to notifications activity, not to the webview for that specific message.

In the future, implementing a proper "read" system would be a good idea perhaps.

@neslihanturan
Copy link
Collaborator

neslihanturan commented Apr 20, 2018

Nearby:

  1. Maybe we can listen location less frequently than our map, when it is on contributions tab. Lets say for every 1 minutes. Besides, our query can be stop whenever we find a point (first point will be closes point). This could be more efficient or using data connection.

Note: But I still think it can be better for UX, if we use a button to request latest location and request permission consequently. Otherwise, ie I am an always closed location person, every time I open contributions activity an auto-pop up asking me to share my location would be very annoying.

Notifications:

  1. Storing last time notifications updated on sharing preferences can be a good solution indeed. If we have a new notification after that date, we can display latest.

@sivaraam
Copy link
Member

Note: But I still think it can be better for UX, if we use a button to request latest location and request permission consequently. Otherwise, ie I am an always closed location person, every time I open contributions activity an auto-pop up asking me to share my location would be very annoying.

I support this 👍

It's better to ask for the location permission only when we actually need it. The reason for requesting the permission is easily understood by the user when they see the request in the context of the requirement (the Nearby view).

@misaochan
Copy link
Member Author

misaochan commented Apr 24, 2018

Maybe we can listen location less frequently than our map, when it is on contributions tab. Lets say for every 1 minutes.

Sounds good. We could check every 1 min, and onResume. IMO if people want to be guided in real-time to a point, they should go to Nearby. Besides, if they tap on that message, they should be taken to Nearby with the point selected anyway.

Besides, our query can be stop whenever we find a point (first point will be closes point). This could be more efficient or using data connection.

The problem with this is that AFAIK there is no way to get only the "closest" point with our current query - I think currently we get all the points in a certain radius and then sort them, and only then do we know which point is "closest". I agree that your suggestion would be the best in terms of efficiency, but you may need to modify the query. I am not sure if it is doable, or at least easily doable.

Note: But I still think it can be better for UX, if we use a button to request latest location and request permission consequently. Otherwise, ie I am an always closed location person, every time I open contributions activity an auto-pop up asking me to share my location would be very annoying.

This sounds like a good idea to me! :)

@neslihanturan
Copy link
Collaborator

The problem with this is that AFAIK there is no way to get only the "closest" point with our current query - I think currently we get all the points in a certain radius and then sort them, and only then do we know which point is "closest". I agree that your suggestion would be the best in terms of efficiency, but you may need to modify the query. I am not sure if it is doable, or at least easily doable.

Hmm, this implementation will be harder than we thought.

@misaochan
Copy link
Member Author

misaochan commented Apr 29, 2018

@neslihanturan I think for our minimum viable product, maybe we can just run the Nearby query onResume, and give users the option to remove that display permanently if they dislike it? They can re-enable it in Settings. That may be the best balance between usability and data conservation. Users can turn it on when they want to and turn it off if data is really a concern. Also they need not expect the point to change when they move, it is just a heads-up (like if I loaded the app and saw that there is a point 50m away, I would go to Nearby and check it out, whereas otherwise I might not even have checked Nearby).

This should run in a separate thread so that Contributions doesn't take any longer to load than usual. It is just the "feed" that will be taking time to load.

@neslihanturan
Copy link
Collaborator

Hi team, while working on this issue, I recognized some details needs to be discussed:

1- Where to put number of uploads? Left picture of right one? My vote for left.
numberofuploads

2- What to display while notifications and nearby notifications are getting fetched? Progress bar on empty card view or nothing at all (make views visible when they are loaded, with fancy animations)?
My vote is displaying nothing on loading. Because it looks ugly:
loading

3- Are we planning to make those notifications dismissable? If so, when to redisplay them after they get dismissed once?
For notifications: whenever a new notification comes after dismiss date.
For nearby: whenever e new nearby comes after dismiss date.

For both: should they be dismisable from settings page also?

@maskaravivek
Copy link
Member

Thinking about smaller devices, the notification view might leave very little space for the rest of the view. What about having a bell icon with just the count in the top toolbar? Opinions?

@neslihanturan
Copy link
Collaborator

Oh huge change after we discussed/agreed and I almost finished implementation? not nice @maskaravivek :D Anyway, can you share some mockups? How should we display nearby then? With small map icon next to bell icon? How we will try to request permission from location disabled users. What will happen when user clicks them?

And if we are not planning to change all these details, what are your opinions to my previous questions 1, 2 and 3?

@neslihanturan
Copy link
Collaborator

Maybe only for small screens we can use bell icon with just the count in the top toolbar by the way.

@misaochan
Copy link
Member Author

misaochan commented Aug 27, 2018

Sorry for the delay in responding @neslihanturan !

  1. I have a slightly controversial opinion - neither. It feels to me like adding an extra line for number of uploads would be superfluous, and it feels like it breaks the flow of the layout. Rather, in the tab itself, I would say "Contributions (111)".
  2. I would definitely go with making views only visible after they have loaded. If for whatever reason notifications or GPS etc cannot be fetched, what do you plan to do?
  3. Very good question/idea! I think that this:

For notifications: whenever a new notification comes after dismiss date.
For nearby: whenever e new nearby comes after dismiss date.

Is a good plan. I also agree that there should be a setting that allows users to turn off notifications.

Maybe only for small screens we can use bell icon with just the count in the top toolbar by the way.

This makes sense. However in that case I would only make user talk notifications count, not Nearby notifications. So just a bell icon with the count for unread user talk notifications on the upper right. I don't think there is any use in having a map icon since Nearby is already easily accessible in the next tab.

Anyone else have any thoughts about this? :) @nicolas-raoul @VojtechDostal @whym ?

@sivaraam
Copy link
Member

Oh huge change after we discussed/agreed and I almost finished implementation? not nice

Just FYI, this has been proposed already.

Maybe only for small screens we can use bell icon with just the count in the top toolbar by the way.

I would suggest considering one approach (to reduce confusion and complexity). Users might be confused to see different flows for viewing notification for different screen sizes. It's better to choose one approach and go with it.

I would prefer notification icons as it doesn't clutter up the view and takes up less space. Showing notifications in main screen seems to clutter up the view and I feel it to be bit odd. Notification icons like the one GitHub has is well known and don't come in the way of the user.

@neslihanturan
Copy link
Collaborator

@sivaraam

Oh huge change after we discussed/agreed and I almost finished implementation? not nice

Just FYI, this has been proposed already.

Oh okay, sorry I missed it. But apparently we agreed on some mockups later, and I followed them in implementation. If we sill need to discussion, let's do that as soon as possible.

My questions are:

  • Where to put notifications icon?
  • How do we display nearby?
    • If we will use a neaby icon on toolbar I think it won't be easy to understand, what will happen if I click to place marker on toolbar.
    • If we use nearby icon on toolbar, how to request location permission?
    • If we use card view for nearby (as in out mockups) then it may look inconsistent. One is on toolbar, one is on cardview.

My idea is, if we want to make it as simple as possible,

  • Display notifications icon on toolbar
  • Display nearby card view, only if there is a nearby place at lees then 1 km lets say. Otherwise, do not display any card view. This card view will be dismissable, it will be invisible until a new nearby place comes.

How this sound, if we all agree, I will start to implementation.

@misaochan
Copy link
Member Author

Display notifications icon on toolbar
Display nearby card view, only if there is a nearby place at lees then 1 km lets say. Otherwise, do not display any card view. This card view will be dismissable, it will be invisible until a new nearby place comes.

This sounds good to me. Actually, for the Nearby card view, it would probably be simpler to just display the nearest Nearby Place whenever ContributionsActivity is loaded, which was the original plan. If the user dismisses it, don't show a new card until the next time they load ContributionsActivity, and have a Setting that allows user to choose to not see any cards at all. However, your plan sounds fine if you are OK with the extra implementation.

The reasons for this change seem to be logical and user-focused, so we can explain in our IEG report why we decided to change the UI from the one proposed in the mockups.

misaochan pushed a commit that referenced this issue Nov 10, 2018
* Delete Contributions Activity content to rewrite it

* Add layout for new Contributions Activity design

* Bind views

* Override auth cookie required

* Add tabs and fragments method

* Create ContributionsFragment which will hold ContributionsListFragment and MediaDetailsFragment

* Add NearbyFragment which will hold NearbyMapFragment and NearbyListFragment

* Add ContributionsActivityPagerAdapter inner class to manage view pager

* Create strings will be written on tabs for contributions and nearby

* Create setTabAndViewPagerSynchronisation method to sycn view pager and tab layout. If user swipe pages, tabs will also change (and vice versa)

* Add theme dependent background color for Drawer Layout of activity_contributions layout file

* Add theme dependent background color for tabs in main

* Create Contributions Fragment structure which will hold Media Detail Fragment and Contributions List Fragment

* Inifilate contributions list fragment view

* Create variables and methods to reuse and create Media Detils Fragment and Contributions List Fragment which will be inside Contribution Fragment

* Override cursor loader methods

* set MediaDetilsView fragment or ContributionListFragment according to users state

* Show details of an image when item is clicked

* Add delete and retry functionality, note: not tested yet

* Override media count methods

* Implement onBack Pressed settings

* Register and unregister datasetObservers

* Add contributin list fragment

* Add contribution list layout with FABs for camera and galerry

* Make sure we called onAuthAcquired from fragment after is is attached

* Create ContributionListViewUtils class to change visibility of views according to MediaDetailsFragment visiblity or their loading state

* Make number of uploads visible if contribution list is visible and number of uploads is uploaded. Progress bar is visible if contribution list is visible and number of uploads are uploading. Both invisible if Media Details Fragment is visible

* Return parent fragment instead of parent activity

* GetPagerFragment instead of getActivity since currently ContributionsFragment take over responsibility from ContributionsActivity

* Add contribution number next to tab text for contribution, as discussed in thread

* Remove number of uploads from contributions fragment since we moved it text of tab layout

* Add unread notifications asynctask to check unread notifications on background

* Save latest time user notification activity viewed

* Add shared preferences provider for latest notification activity visit time

* Add shared preferences provider for latest notification activity visit time

* Change notification icon (add blue dot) whenever a notification comes

* Recover notifications state on come back to contributions list from media details fragment

* Add date with year parameter to Notification class, because we will use it on comparasion of dates

* Check if user visited noifications activity after last notification came

* Add ation to notification icon

* Add nearby custom card view class

* Add card view to activity

* Add a button which will be displayed when nearby permission is not granted thus closest point can't be displayed on main screen. Besides, theme dependent click styles are added to button

* Add button click and permission request logic. Not: solve why location manager is null

* Inject location manager to activity instead

* Make card view dismissable with swip

* Add preference to disable or display closest nearby location

* Add a bugfix to set visibility of nearby notification cardview

* Add UI modifier methods to display notifications

* Modify getFromWikidataQuery method, so that based on the restunClosestResult boolean, we get only the closest nearby place, instead of fetching bunch of nearby places each time

* Make inner class vaariables public to reach them out of package

* Temporarily comment out icon setter methods since it crashes under API19

* Inject location manager

* Register location manager accoring to permission is given, then call nearby card view updater methods

* Change method calls loadAttractionsFromLocation by considering new parameter to decide between closest nearby call or an usual nearby call

* Add progress bar to nearby cardview

* Fix notifications string

* Hide nearby card view when Media Details is visible

* Change tab on nerby card view click

* Add hardcoded strings to strings.xml

* Move nearby activity to new nearby frament

* Add fragments for nearby list and map into outer nearby fragment

* Change options menu item according to tab view

* Make nearby card view invisible on swipe to nearby tab

* Use retained nearby fragment

* Add action to list sheet button

* This commit caused contrib list become invisible thus,
Revert "Use retained nearby fragment"

This reverts commit 86b3633.

* Make sure retained fragments are used for -both- nearby and contrib fragments

* Remove unrelated part added because of confusion, sorry

* Make sure nearbyNotificationCardView visibility works corrent

* Move nearby methods from nerby activity to nearby fragment, and add a lastLocationDuplicate variable to distinguish first time location from nearby fragment and nearby notification card on contributions activity

* Change activity.findViewByID lines with parentFragment.view.findViewById

* Remove toolbar from nearby fragment, since contributions activity already has

* Disable view pager swipe, since using map is very hard with swipe option of view pager

* Place progress bar inside nearby card notification to center

* Make sure using retaied nearby map fragment and nearby list fragment inside nearby fragment

* Update nearby notification content on slight location updates too, if it is first update after on resume. This prevented very long time loading progress bar

* Add case for no nearest pleace found, to prevent bug

* Prevent a possible bug can be caused from activity already killed

* Add click actions to FAB buttons in contributions list fragment. And arrange FAB margins

* Try to use a new location manager instance instead of using single object for both nearby map and nearby notification card view. Because location manager has a state mechanism which is designed to be called from a single point. When I call same methods from both nearby card view notification and nearby map, next update time of map etc. gets confused.

* Set radius to initial value on getFromWikidataQuery (when it is called for getting closest result to be used in nearby card view notification). Normally, algorithm increase radius, this technique works for nearby map but when it comes to finding nearest point, it can return null

* Add an enum to make card view visibility more stable, however, still there is a bug.

* Prevent some more nearby card view visilbility bugs, however still there is a bug

* Add some nullchecks for precaution

* Check nearby permission and refresh nearby view if nearby tab selected, othervise do nothing

* Send user to contrib tab if permission is denied after masrhmallow

* Change nearby fragment background so that progress bar is visible now

* Reduce code duplicate

* request location and gps permission from contribution nearby car view too

* Make sure using retained fragments

* Make sure Contrib list fragment is retained on orientation change

* Fix NPE at options menu

* Make fragment flag fancier, define it per fragment instance, instead of activity

* Fix Service leak and onsavedInstance NPE errrors both occured on orientation change

* Refresh nearby map on orientation change

* Remove unused imports, organise logs and add comments for NearbyMapFragment class

* Remove all references of nearby activity, since we don't use it anymore

* Remove unused imports, organise logs and add comments for Nearby Controller

* Remove unused imports, organise logs and add comments for NearbyFragment

* Remove unused imports, organise logs and add comments for NearbyNotificationCardView

* Change class name from Contributions Activity to Main Activity. Remove unused imports, organise logs and add comments for MainAtivity

* Remove extra spaces

* Remove unused imports and logs

* Remove unused imports, organise logs and add comments for LocationServiceManager

* Remove unused imports, organise logs and add comments for NotificationsActivity

* Remove unused imports, organise logs and add comments for Contributions Fragment

* bug fix nearby notification card dismiss/restore issue

* Change display_nearby_notification_summary varibale with Tap here to see the nearest place that needs pictures

* Add nearest place notification card dismiss toast

* Fix mistake made on previous commit, while fixing conflicts

* Set no data yet message invisible after contributions list is loaded

* Change FAB margins, according to Josephine's review

* Change FAB margins, according to Josephine's review

* Change contributions list background to white, to make FAB more visible

* Add infobutton with popup window next to nearby tba, to explain what does this tab do

* Change hambuger icon to back arrow when media details activity visible

* On back button clicked from nearby fragment, switch back to contributions fragment, instead of closing the app

* Check nearby card view visibility on coming back from media details activity

* Change notification icon with default vector supplied by android vector repos. If we use the one I drawn on inkscape, produced vector is not compatible with API level 19 and below. I couldn't find a proper solution, and decided to change icon

* Fix a possible NPE, caused by loation manager has Main activity reference after it is destroyed

* Change hardcoded string with var from string xml

* Make sure you listen storage permissions from contribution list framgent FABs

* Make sure you listened storage permissions for Neaby fragment buttons too

* Check NPEs causing crashes. Now it does not crash after coming back from settings activity

* Make notification icon compatible with <API19 devices, by drawing and using .png images

* Change back icon arrow vector with png

* Attempt to solve location manager caused memory leak

* Fix memory leaks and optimize imports

* Merge 2.9 release
hoplite390 added a commit to hoplite390/apps-android-commons that referenced this issue Nov 22, 2018
*  Added resaons in dropdown list

* Made changes

* Fixed Conflicts

*  Shifted strings to String.xml

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

* Remove unused mediawiki api dependency (commons-app#1991)

* Categories with pipe suffix (commons-app#1873)

* Bug fix issue commons-app#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 (commons-app#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.

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

* Main screen ui changes, fixes commons-app#725  Main screen UI overhaul (commons-app#1922)

* Delete Contributions Activity content to rewrite it

* Add layout for new Contributions Activity design

* Bind views

* Override auth cookie required

* Add tabs and fragments method

* Create ContributionsFragment which will hold ContributionsListFragment and MediaDetailsFragment

* Add NearbyFragment which will hold NearbyMapFragment and NearbyListFragment

* Add ContributionsActivityPagerAdapter inner class to manage view pager

* Create strings will be written on tabs for contributions and nearby

* Create setTabAndViewPagerSynchronisation method to sycn view pager and tab layout. If user swipe pages, tabs will also change (and vice versa)

* Add theme dependent background color for Drawer Layout of activity_contributions layout file

* Add theme dependent background color for tabs in main

* Create Contributions Fragment structure which will hold Media Detail Fragment and Contributions List Fragment

* Inifilate contributions list fragment view

* Create variables and methods to reuse and create Media Detils Fragment and Contributions List Fragment which will be inside Contribution Fragment

* Override cursor loader methods

* set MediaDetilsView fragment or ContributionListFragment according to users state

* Show details of an image when item is clicked

* Add delete and retry functionality, note: not tested yet

* Override media count methods

* Implement onBack Pressed settings

* Register and unregister datasetObservers

* Add contributin list fragment

* Add contribution list layout with FABs for camera and galerry

* Make sure we called onAuthAcquired from fragment after is is attached

* Create ContributionListViewUtils class to change visibility of views according to MediaDetailsFragment visiblity or their loading state

* Make number of uploads visible if contribution list is visible and number of uploads is uploaded. Progress bar is visible if contribution list is visible and number of uploads are uploading. Both invisible if Media Details Fragment is visible

* Return parent fragment instead of parent activity

* GetPagerFragment instead of getActivity since currently ContributionsFragment take over responsibility from ContributionsActivity

* Add contribution number next to tab text for contribution, as discussed in thread

* Remove number of uploads from contributions fragment since we moved it text of tab layout

* Add unread notifications asynctask to check unread notifications on background

* Save latest time user notification activity viewed

* Add shared preferences provider for latest notification activity visit time

* Add shared preferences provider for latest notification activity visit time

* Change notification icon (add blue dot) whenever a notification comes

* Recover notifications state on come back to contributions list from media details fragment

* Add date with year parameter to Notification class, because we will use it on comparasion of dates

* Check if user visited noifications activity after last notification came

* Add ation to notification icon

* Add nearby custom card view class

* Add card view to activity

* Add a button which will be displayed when nearby permission is not granted thus closest point can't be displayed on main screen. Besides, theme dependent click styles are added to button

* Add button click and permission request logic. Not: solve why location manager is null

* Inject location manager to activity instead

* Make card view dismissable with swip

* Add preference to disable or display closest nearby location

* Add a bugfix to set visibility of nearby notification cardview

* Add UI modifier methods to display notifications

* Modify getFromWikidataQuery method, so that based on the restunClosestResult boolean, we get only the closest nearby place, instead of fetching bunch of nearby places each time

* Make inner class vaariables public to reach them out of package

* Temporarily comment out icon setter methods since it crashes under API19

* Inject location manager

* Register location manager accoring to permission is given, then call nearby card view updater methods

* Change method calls loadAttractionsFromLocation by considering new parameter to decide between closest nearby call or an usual nearby call

* Add progress bar to nearby cardview

* Fix notifications string

* Hide nearby card view when Media Details is visible

* Change tab on nerby card view click

* Add hardcoded strings to strings.xml

* Move nearby activity to new nearby frament

* Add fragments for nearby list and map into outer nearby fragment

* Change options menu item according to tab view

* Make nearby card view invisible on swipe to nearby tab

* Use retained nearby fragment

* Add action to list sheet button

* This commit caused contrib list become invisible thus,
Revert "Use retained nearby fragment"

This reverts commit 86b3633.

* Make sure retained fragments are used for -both- nearby and contrib fragments

* Remove unrelated part added because of confusion, sorry

* Make sure nearbyNotificationCardView visibility works corrent

* Move nearby methods from nerby activity to nearby fragment, and add a lastLocationDuplicate variable to distinguish first time location from nearby fragment and nearby notification card on contributions activity

* Change activity.findViewByID lines with parentFragment.view.findViewById

* Remove toolbar from nearby fragment, since contributions activity already has

* Disable view pager swipe, since using map is very hard with swipe option of view pager

* Place progress bar inside nearby card notification to center

* Make sure using retaied nearby map fragment and nearby list fragment inside nearby fragment

* Update nearby notification content on slight location updates too, if it is first update after on resume. This prevented very long time loading progress bar

* Add case for no nearest pleace found, to prevent bug

* Prevent a possible bug can be caused from activity already killed

* Add click actions to FAB buttons in contributions list fragment. And arrange FAB margins

* Try to use a new location manager instance instead of using single object for both nearby map and nearby notification card view. Because location manager has a state mechanism which is designed to be called from a single point. When I call same methods from both nearby card view notification and nearby map, next update time of map etc. gets confused.

* Set radius to initial value on getFromWikidataQuery (when it is called for getting closest result to be used in nearby card view notification). Normally, algorithm increase radius, this technique works for nearby map but when it comes to finding nearest point, it can return null

* Add an enum to make card view visibility more stable, however, still there is a bug.

* Prevent some more nearby card view visilbility bugs, however still there is a bug

* Add some nullchecks for precaution

* Check nearby permission and refresh nearby view if nearby tab selected, othervise do nothing

* Send user to contrib tab if permission is denied after masrhmallow

* Change nearby fragment background so that progress bar is visible now

* Reduce code duplicate

* request location and gps permission from contribution nearby car view too

* Make sure using retained fragments

* Make sure Contrib list fragment is retained on orientation change

* Fix NPE at options menu

* Make fragment flag fancier, define it per fragment instance, instead of activity

* Fix Service leak and onsavedInstance NPE errrors both occured on orientation change

* Refresh nearby map on orientation change

* Remove unused imports, organise logs and add comments for NearbyMapFragment class

* Remove all references of nearby activity, since we don't use it anymore

* Remove unused imports, organise logs and add comments for Nearby Controller

* Remove unused imports, organise logs and add comments for NearbyFragment

* Remove unused imports, organise logs and add comments for NearbyNotificationCardView

* Change class name from Contributions Activity to Main Activity. Remove unused imports, organise logs and add comments for MainAtivity

* Remove extra spaces

* Remove unused imports and logs

* Remove unused imports, organise logs and add comments for LocationServiceManager

* Remove unused imports, organise logs and add comments for NotificationsActivity

* Remove unused imports, organise logs and add comments for Contributions Fragment

* bug fix nearby notification card dismiss/restore issue

* Change display_nearby_notification_summary varibale with Tap here to see the nearest place that needs pictures

* Add nearest place notification card dismiss toast

* Fix mistake made on previous commit, while fixing conflicts

* Set no data yet message invisible after contributions list is loaded

* Change FAB margins, according to Josephine's review

* Change FAB margins, according to Josephine's review

* Change contributions list background to white, to make FAB more visible

* Add infobutton with popup window next to nearby tba, to explain what does this tab do

* Change hambuger icon to back arrow when media details activity visible

* On back button clicked from nearby fragment, switch back to contributions fragment, instead of closing the app

* Check nearby card view visibility on coming back from media details activity

* Change notification icon with default vector supplied by android vector repos. If we use the one I drawn on inkscape, produced vector is not compatible with API level 19 and below. I couldn't find a proper solution, and decided to change icon

* Fix a possible NPE, caused by loation manager has Main activity reference after it is destroyed

* Change hardcoded string with var from string xml

* Make sure you listen storage permissions from contribution list framgent FABs

* Make sure you listened storage permissions for Neaby fragment buttons too

* Check NPEs causing crashes. Now it does not crash after coming back from settings activity

* Make notification icon compatible with <API19 devices, by drawing and using .png images

* Change back icon arrow vector with png

* Attempt to solve location manager caused memory leak

* Fix memory leaks and optimize imports

* Merge 2.9 release

* Small ui fixes on new main ui (commons-app#1995)

* Return to main activity from notifications activity on back button is pressed

* Make nearby info image a little far from nearby text, to prevent wrong clicks

* Bug fix issue commons-app#1999 (commons-app#2000)

* Added a threshold on swipe, ie. if a swipe is considered a swipe only if it covers a distance of 100dp

* Multiple uploads with over haul (commons-app#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 (commons-app#1855)

* Added permission for Dexter, the runtime permission handling library

* [Preparing fir issue commons-app#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 commons-app#1773]

* Improvements in the way External Storage Permission is handled in MultipleShareActivity[Bug fix commons-app#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 commons-app#1854 (#2)

* Bug fix issue commons-app#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

* Fix visibility error on media details view (commons-app#2009)

* Localisation updates from https://translatewiki.net.
neslihanturan pushed a commit that referenced this issue Dec 3, 2018
* Add "rawUsername" (without underscore instead of spaces) to SessionManager as Bundle to preserve string.

* Update UploadController.java

* Update UploadController.java

* Update for my fork (#4)

*  Added resaons in dropdown list

* Made changes

* Fixed Conflicts

*  Shifted strings to String.xml

* 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.

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

* Main screen ui changes, fixes #725  Main screen UI overhaul (#1922)

* Delete Contributions Activity content to rewrite it

* Add layout for new Contributions Activity design

* Bind views

* Override auth cookie required

* Add tabs and fragments method

* Create ContributionsFragment which will hold ContributionsListFragment and MediaDetailsFragment

* Add NearbyFragment which will hold NearbyMapFragment and NearbyListFragment

* Add ContributionsActivityPagerAdapter inner class to manage view pager

* Create strings will be written on tabs for contributions and nearby

* Create setTabAndViewPagerSynchronisation method to sycn view pager and tab layout. If user swipe pages, tabs will also change (and vice versa)

* Add theme dependent background color for Drawer Layout of activity_contributions layout file

* Add theme dependent background color for tabs in main

* Create Contributions Fragment structure which will hold Media Detail Fragment and Contributions List Fragment

* Inifilate contributions list fragment view

* Create variables and methods to reuse and create Media Detils Fragment and Contributions List Fragment which will be inside Contribution Fragment

* Override cursor loader methods

* set MediaDetilsView fragment or ContributionListFragment according to users state

* Show details of an image when item is clicked

* Add delete and retry functionality, note: not tested yet

* Override media count methods

* Implement onBack Pressed settings

* Register and unregister datasetObservers

* Add contributin list fragment

* Add contribution list layout with FABs for camera and galerry

* Make sure we called onAuthAcquired from fragment after is is attached

* Create ContributionListViewUtils class to change visibility of views according to MediaDetailsFragment visiblity or their loading state

* Make number of uploads visible if contribution list is visible and number of uploads is uploaded. Progress bar is visible if contribution list is visible and number of uploads are uploading. Both invisible if Media Details Fragment is visible

* Return parent fragment instead of parent activity

* GetPagerFragment instead of getActivity since currently ContributionsFragment take over responsibility from ContributionsActivity

* Add contribution number next to tab text for contribution, as discussed in thread

* Remove number of uploads from contributions fragment since we moved it text of tab layout

* Add unread notifications asynctask to check unread notifications on background

* Save latest time user notification activity viewed

* Add shared preferences provider for latest notification activity visit time

* Add shared preferences provider for latest notification activity visit time

* Change notification icon (add blue dot) whenever a notification comes

* Recover notifications state on come back to contributions list from media details fragment

* Add date with year parameter to Notification class, because we will use it on comparasion of dates

* Check if user visited noifications activity after last notification came

* Add ation to notification icon

* Add nearby custom card view class

* Add card view to activity

* Add a button which will be displayed when nearby permission is not granted thus closest point can't be displayed on main screen. Besides, theme dependent click styles are added to button

* Add button click and permission request logic. Not: solve why location manager is null

* Inject location manager to activity instead

* Make card view dismissable with swip

* Add preference to disable or display closest nearby location

* Add a bugfix to set visibility of nearby notification cardview

* Add UI modifier methods to display notifications

* Modify getFromWikidataQuery method, so that based on the restunClosestResult boolean, we get only the closest nearby place, instead of fetching bunch of nearby places each time

* Make inner class vaariables public to reach them out of package

* Temporarily comment out icon setter methods since it crashes under API19

* Inject location manager

* Register location manager accoring to permission is given, then call nearby card view updater methods

* Change method calls loadAttractionsFromLocation by considering new parameter to decide between closest nearby call or an usual nearby call

* Add progress bar to nearby cardview

* Fix notifications string

* Hide nearby card view when Media Details is visible

* Change tab on nerby card view click

* Add hardcoded strings to strings.xml

* Move nearby activity to new nearby frament

* Add fragments for nearby list and map into outer nearby fragment

* Change options menu item according to tab view

* Make nearby card view invisible on swipe to nearby tab

* Use retained nearby fragment

* Add action to list sheet button

* This commit caused contrib list become invisible thus,
Revert "Use retained nearby fragment"

This reverts commit 86b3633.

* Make sure retained fragments are used for -both- nearby and contrib fragments

* Remove unrelated part added because of confusion, sorry

* Make sure nearbyNotificationCardView visibility works corrent

* Move nearby methods from nerby activity to nearby fragment, and add a lastLocationDuplicate variable to distinguish first time location from nearby fragment and nearby notification card on contributions activity

* Change activity.findViewByID lines with parentFragment.view.findViewById

* Remove toolbar from nearby fragment, since contributions activity already has

* Disable view pager swipe, since using map is very hard with swipe option of view pager

* Place progress bar inside nearby card notification to center

* Make sure using retaied nearby map fragment and nearby list fragment inside nearby fragment

* Update nearby notification content on slight location updates too, if it is first update after on resume. This prevented very long time loading progress bar

* Add case for no nearest pleace found, to prevent bug

* Prevent a possible bug can be caused from activity already killed

* Add click actions to FAB buttons in contributions list fragment. And arrange FAB margins

* Try to use a new location manager instance instead of using single object for both nearby map and nearby notification card view. Because location manager has a state mechanism which is designed to be called from a single point. When I call same methods from both nearby card view notification and nearby map, next update time of map etc. gets confused.

* Set radius to initial value on getFromWikidataQuery (when it is called for getting closest result to be used in nearby card view notification). Normally, algorithm increase radius, this technique works for nearby map but when it comes to finding nearest point, it can return null

* Add an enum to make card view visibility more stable, however, still there is a bug.

* Prevent some more nearby card view visilbility bugs, however still there is a bug

* Add some nullchecks for precaution

* Check nearby permission and refresh nearby view if nearby tab selected, othervise do nothing

* Send user to contrib tab if permission is denied after masrhmallow

* Change nearby fragment background so that progress bar is visible now

* Reduce code duplicate

* request location and gps permission from contribution nearby car view too

* Make sure using retained fragments

* Make sure Contrib list fragment is retained on orientation change

* Fix NPE at options menu

* Make fragment flag fancier, define it per fragment instance, instead of activity

* Fix Service leak and onsavedInstance NPE errrors both occured on orientation change

* Refresh nearby map on orientation change

* Remove unused imports, organise logs and add comments for NearbyMapFragment class

* Remove all references of nearby activity, since we don't use it anymore

* Remove unused imports, organise logs and add comments for Nearby Controller

* Remove unused imports, organise logs and add comments for NearbyFragment

* Remove unused imports, organise logs and add comments for NearbyNotificationCardView

* Change class name from Contributions Activity to Main Activity. Remove unused imports, organise logs and add comments for MainAtivity

* Remove extra spaces

* Remove unused imports and logs

* Remove unused imports, organise logs and add comments for LocationServiceManager

* Remove unused imports, organise logs and add comments for NotificationsActivity

* Remove unused imports, organise logs and add comments for Contributions Fragment

* bug fix nearby notification card dismiss/restore issue

* Change display_nearby_notification_summary varibale with Tap here to see the nearest place that needs pictures

* Add nearest place notification card dismiss toast

* Fix mistake made on previous commit, while fixing conflicts

* Set no data yet message invisible after contributions list is loaded

* Change FAB margins, according to Josephine's review

* Change FAB margins, according to Josephine's review

* Change contributions list background to white, to make FAB more visible

* Add infobutton with popup window next to nearby tba, to explain what does this tab do

* Change hambuger icon to back arrow when media details activity visible

* On back button clicked from nearby fragment, switch back to contributions fragment, instead of closing the app

* Check nearby card view visibility on coming back from media details activity

* Change notification icon with default vector supplied by android vector repos. If we use the one I drawn on inkscape, produced vector is not compatible with API level 19 and below. I couldn't find a proper solution, and decided to change icon

* Fix a possible NPE, caused by loation manager has Main activity reference after it is destroyed

* Change hardcoded string with var from string xml

* Make sure you listen storage permissions from contribution list framgent FABs

* Make sure you listened storage permissions for Neaby fragment buttons too

* Check NPEs causing crashes. Now it does not crash after coming back from settings activity

* Make notification icon compatible with <API19 devices, by drawing and using .png images

* Change back icon arrow vector with png

* Attempt to solve location manager caused memory leak

* Fix memory leaks and optimize imports

* Merge 2.9 release

* Small ui fixes on new main ui (#1995)

* Return to main activity from notifications activity on back button is pressed

* Make nearby info image a little far from nearby text, to prevent wrong clicks

* Bug fix issue #1999 (#2000)

* Added a threshold on swipe, ie. if a swipe is considered a swipe only if it covers a distance of 100dp

* 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

* Fix visibility error on media details view (#2009)

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

* Update UploadController.java

* Repair gradle file

Repair gradle build file so that it uses buildToolsVersion buildToolsVersion.

* Repair gradle

repair gradle

* repair gradle

repair gradle to fix Travis

* Update UpdateModel()

sessionManager.getUserName() >> sessionManager.getRawUserName()

It will build new Contribution with stored username string without underscore.

* Add getAuthorName. In case getRawUserName return null as described in #1982 this method, will return getUsername. Users with underscore issue will see the fix after re-log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants