mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Update view feed modal to sort episodes by pub date ascending
This commit is contained in:
		
							parent
							
								
									ed3af5bdcd
								
							
						
					
					
						commit
						39567c6c22
					
				| @ -137,7 +137,16 @@ export default { | |||||||
|         this.$toast.error(this.$strings.ToastFailedToLoadData) |         this.$toast.error(this.$strings.ToastFailedToLoadData) | ||||||
|         return |         return | ||||||
|       } |       } | ||||||
|       this.feeds = data.feeds |       this.feeds = data.feeds.map((feed) => ({ | ||||||
|  |         ...feed, | ||||||
|  |         episodes: [...feed.episodes].sort((a, b) => { | ||||||
|  |           if (!a.pubDate) return 1 // null dates sort to end | ||||||
|  |           if (!b.pubDate) return -1 | ||||||
|  |           const dateA = new Date(a.pubDate) | ||||||
|  |           const dateB = new Date(b.pubDate) | ||||||
|  |           return dateA - dateB | ||||||
|  |         }) | ||||||
|  |       })) | ||||||
|     }, |     }, | ||||||
|     init() { |     init() { | ||||||
|       this.loadFeeds() |       this.loadFeeds() | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user