mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Merge pull request #3024 from n7st/master
Honour "hideWatched" preference in video feed
This commit is contained in:
		
						commit
						0a5aad443f
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
					@ -83,9 +83,14 @@ export default {
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        filteredVideos(_this) {
 | 
					        filteredVideos(_this) {
 | 
				
			||||||
            const selectedGroup = _this.channelGroups.filter(group => group.groupName == _this.selectedGroupName);
 | 
					            const selectedGroup = _this.channelGroups.filter(group => group.groupName == _this.selectedGroupName);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            const videos = this.getPreferenceBoolean("hideWatched", false)
 | 
				
			||||||
 | 
					                ? this.videos.filter(video => !video.watched)
 | 
				
			||||||
 | 
					                : this.videos;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return _this.selectedGroupName == ""
 | 
					            return _this.selectedGroupName == ""
 | 
				
			||||||
                ? _this.videos
 | 
					                ? videos
 | 
				
			||||||
                : _this.videos.filter(video => selectedGroup[0].channels.includes(video.uploaderUrl.substr(-11)));
 | 
					                : videos.filter(video => selectedGroup[0].channels.includes(video.uploaderUrl.substr(-11)));
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue