-
Notifications
You must be signed in to change notification settings - Fork 2
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
user's favorites #114
base: develop
Are you sure you want to change the base?
user's favorites #114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, ma troppi cambiamenti, non sono riuscito a leggerla tutta infatti:( Sarei piu' per tante PR piccole, eventualmente una sopra l'altra, cosi' sarebbero stra piu' facili da revisionare (:
|
||
when { | ||
args.user != null -> setupUserJobsView(args.user as User) | ||
args.showFavorites -> showFavorites() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm e' ok, ma invece di fare cosi', farei una sottoclasse di questa per i preferiti, e aprirei direttamente quella
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
si probabilmente è più pulito
@@ -137,6 +162,11 @@ class JobsFragment : Fragment(), LocationPickerFragment.OnLocationPickedListener | |||
} | |||
|
|||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { | |||
// hide menu actions if we are showing some user's jobs/proposals or favorites | |||
if (args.user != null || args.showFavorites) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Facendo una sottoclasse non dovremmo necessariamente usare questi if (:
#105