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

fix(listen): update listen to have a default language set #604

Merged
merged 1 commit into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions PocketKit/Sources/PocketKit/Listen/Listen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class Listen: NSObject {
self.tracker = tracker
self.source = source
super.init()
// Set a default set of languages that the server will overwrite when it loads
PKTListen.supportedLanguages = ["en"]
PKTSetConsumerKey(consumerKey)
PKTLocalRuntime.shared().start()
PKTListen.sharedInstance().sessionDelegate = self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,6 @@ extension SavedItemsListViewModel {
// Remove any filters and sorts they selected and re-fetch data before showing listen.
if !selectedFilters.isEmpty && !featureFlags.isAssigned(flag: .listenTagsPlaylists) {
selectedFilters.removeAll()
listOptions.selectedSortOption = .newest
Copy link
Member Author

Choose a reason for hiding this comment

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

caused a bad access. removing for now.

applySorting()
fetch()
}
Expand Down