Skip to content
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

ISSUE-459 : Adding Most recent sort method #475

Merged
merged 1 commit into from
Jul 6, 2020
Merged

ISSUE-459 : Adding Most recent sort method #475

merged 1 commit into from
Jul 6, 2020

Conversation

mmurali88
Copy link
Contributor

@mmurali88 mmurali88 commented Jul 4, 2020

Proposed changes

Implement most recently played item sort method for both the library view and the playlist view.

Types of changes

  • Feature Implementation

Checklist

  • I have read the CONTRIBUTING doc
  • Linter check and compiled locally before pushing
  • Tested various sorting scenarios across both library view and the playlist view

Note :

  1. The Date type is required for sorting otherwise the sort is just happening by date and not by the time played.
  2. Localized string is updated only for English and need help for other languages.

@@ -31,6 +40,7 @@ enum SortError: Error {
public enum PlayListSortOrder: String {
case metadataTitle = "title"
case fileName = "originalFileName"
case sortByMostRecent = "lastPlayDate"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's change sortByMostRecent to just mostRecent, so when calling the function sort(by:type:... we can have consistency with the other cases in this enum

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated based on comments.

@GianniCarlo
Copy link
Collaborator

This works great 👌, Re translation, we do have an alternative 👀, we could use the already translated key carplay_recent_title which is just Recent, so we would need to rename that key to something more generic like recent_title and reuse it everywhere. Or we could go with Most Recent, in which case I would ask that the english translation be included in the rest of translated .strings files, so I can later update them with Lokalise.

I'm open to both options regarding the translations, so let me know 👍

@GianniCarlo GianniCarlo mentioned this pull request Jul 6, 2020
1. Adding Most recent sort method (Localizable only on Base / English)
2. Fixed sort descriptor for Date / String values
ISSUE-459 : Updating code based on review comments
@mmurali88
Copy link
Contributor Author

This works great 👌, Re translation, we do have an alternative 👀, we could use the already translated key carplay_recent_title which is just Recent, so we would need to rename that key to something more generic like recent_title and reuse it everywhere. Or we could go with Most Recent, in which case I would ask that the english translation be included in the rest of translated .strings files, so I can later update them with Lokalise.

I'm open to both options regarding the translations, so let me know 👍

I went with the 2nd option mainly because I couldn't test the carplay option. While we do the UI re-vamp I will make sure to update it .

For now I have added the "sort_most_recent_button" item to all localization files for you to update later.

@GianniCarlo
Copy link
Collaborator

👌👌👌

@GianniCarlo GianniCarlo merged commit 9cc1003 into TortugaPower:develop Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants