-
Notifications
You must be signed in to change notification settings - Fork 7
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
Remove fragments #3
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Elimina la lógica de presentación del presenter de favoritas y delega el comportamiento al presenter. De paso añado ButterKnife para ir quitando mierda.
Now its a view inside MainPageFragment. To avoid having too much noise there I've extracted all the View related stuff to a different class.
This way we can provide a dependency that notifies about location updates via RxJava. It's implemented using a BehaviourSubject to emit the last item to new subscriptions.
Now we are a bit more decoupled from the activity and the location source.
No, this doesn't mean sevibus supports Barcelona now. It's just the same database from Sevilla, located over Barcelona in the map. Si la montaña no va a Mahoma... Update Travis file with flavor
This action provides nearby bus stops based on a given location. I created a ParadaCercana which contains the pair of a Parada and distance. This is just to ease the usage of the action from the view layer.
Created a presenter for displaying nearby stops in the main page. Replaced the old fragment with presenter + view container. Hey!
This is not going well. Let's disable it since we have the "barna" flavor, and maybe in the future mock the location properly.
LocationProvides now returns optional of location, so we can pass null and get an absent value when the location is not available. Needs some improvement on UX, but at least we are in the same spot as before. Y had to decompose the subscription in the presenter in two steps, one for the location and another one for the nearby stops.
Modified the model a bit to allow setting line type from constructor, and changing the comparator of lines to fallback to the line's name instead of the type's, which looks like an error.
It's just a wrapper of DBQueries for now
Yup, Github orders chronologically instead of by parent. I rebased my branch and reordered commits, so it's now messed up. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Well, not all of them... for now.
I removed the fragments composing the main screen (which is itself a fragment!!).
I replaced them with presenters and view containers (to decompose the responsibility in the MainPageFragment, where the actual view lives).
In the process I created a Rx LocationProvider to use from the fragments.
I also created flavors, one for Sevilla and another for Barcelona. This doesn't mean that SeviBus supports Barcelona, it's only a flavor with a different database created with the same data from Sevilla, but moved in the map to Barcelona. This way I can test the location features without mocking anything. We'll use a better solution someday.