Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Amr Hossam <[email protected]>
  • Loading branch information
amrhossamdev authored and aaronbrethorst committed Oct 26, 2024
1 parent e8c7a39 commit 5966da9
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1476,18 +1476,12 @@ public void showProgress(boolean visibility) {
}

private void notifyRouteFavoriteChanged(boolean isRouteSaved) {
if(isRouteSaved){
Snackbar.make(mView, R.string.route_removed_from_favorites, Snackbar.LENGTH_SHORT).show();
}else{
Snackbar.make(mView, R.string.route_added_to_favorites, Snackbar.LENGTH_SHORT).show();
}
int message = isRouteSaved ? R.string.route_removed_from_favorites : R.string.route_added_to_favorites;
Snackbar.make(mView, message, Snackbar.LENGTH_SHORT).show();
}

private void notifyStopFavoriteChanged(boolean isStopSaved){
if(isStopSaved) {
Snackbar.make(mView, R.string.stop_removed_from_favorites, Snackbar.LENGTH_SHORT).show();
} else {
Snackbar.make(mView, R.string.stop_added_to_favorites, Snackbar.LENGTH_SHORT).show();
}
private void notifyStopFavoriteChanged(boolean isStopSaved) {
int message = isStopSaved ? R.string.stop_removed_from_favorites : R.string.stop_added_to_favorites;
Snackbar.make(mView, message, Snackbar.LENGTH_SHORT).show();
}
}

0 comments on commit 5966da9

Please sign in to comment.