As a user I want to be able to query for posts (questions answers replies) that are near to me - CMPUT301F14T06/Team06MapleSyrup GitHub Wiki
Use Case: Display the Most nearby Questions/Answers/Reply
Use Case Name: MostNearby
Participating Actors: User
Goal: Display the questions/answers/replies list sort by distance to the user.
Trigger: User choose sort by question location or sort by answer and reply location option from the sort spinner on the main page/ on the question detail page.
Precondition: User go to the main activity/ question detail page and the user's GPS is avaliable
Postcondition: The list of question that is sorted by question's Location or answer list and reply list sorted by answer's and reply's Location will be showed on the screen. After sort in the question list the first question will be the question that is nearest to the user. In the question detail page, after sort, the first answer in the answer list is the answer that is nearest to the user, and the first reply under each answer is the reply that is nearest to the user. Basic Flow:
-
User goes to the main page/ question detail page
-
User choose sort by question nearby or sort by answer nearby option from the sort spinner in the main page/ question detail page
-
The list of question that is sorted by question's Location or answer list and reply list sorted by answer's and reply's Location will be showed on the screen. After sort in the question list the first question will be the question that is nearest to the user. In the question detail page, after sort, the first answer in the answer list is the answer that is nearest to the user, and the first reply under each answer is the reply that is nearest to the user.
Exceptions:
1.0 No data recorded in the database
- 1.1 The view is empty
1.0 Internet is not connected
- 1.1 Return to the main fragment, the List become empty
- 1.2 A Toast shows no internet access
- 1.3 Go to profile fragment and click local questions button to view saved questions and answers