Fix filter search
This commit is contained in:
		
							parent
							
								
									2eb87a156f
								
							
						
					
					
						commit
						3c75c7a990
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -76,16 +76,16 @@ class SearchViewModel @Inject constructor(
 | 
				
			||||||
            paging.filter { it.title.contains(filter, ignoreCase = true) }
 | 
					            paging.filter { it.title.contains(filter, ignoreCase = true) }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        .combine(authors.confirmFlow) { paging, filter ->
 | 
					        .combine(authors.confirmFlow) { paging, filter ->
 | 
				
			||||||
            paging.filter { filter == null || it.author.isEmpty() || it.author.any { author -> author.id == filter.id } }
 | 
					            paging.filter { filter == null || it.author.any { author -> author.id == filter.id } }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        .combine(series.confirmFlow) { paging, filter ->
 | 
					        .combine(series.confirmFlow) { paging, filter ->
 | 
				
			||||||
            paging.filter { filter == null || it.series == null || it.series.id == filter.id }
 | 
					            paging.filter { filter == null || it.series?.id == filter.id }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        .combine(genre.confirmFlow) { paging, filter ->
 | 
					        .combine(genre.confirmFlow) { paging, filter ->
 | 
				
			||||||
            paging.filter { filter == null || it.genre.isNullOrEmpty() || it.genre.any { author -> author.id == filter.id } }
 | 
					            paging.filter { filter == null || it.genre?.any { author -> author.id == filter.id } ?: false}
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        .combine(language.confirmFlow) { paging, filter ->
 | 
					        .combine(language.confirmFlow) { paging, filter ->
 | 
				
			||||||
            paging.filter { filter == null || it.language == null || it.language.id == filter.id }
 | 
					            paging.filter { filter == null || it.language?.id == filter.id }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        .map { paging -> paging.map { it.toMicroThumbnailUio() } }
 | 
					        .map { paging -> paging.map { it.toMicroThumbnailUio() } }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue