mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Merge branch 'release/7.2.0' into develop
This commit is contained in:
commit
db7c5d8a0e
1 changed files with 4 additions and 2 deletions
|
@ -163,6 +163,8 @@ export class AdvancedInputFilterComponent implements OnInit, AfterViewInit {
|
||||||
|
|
||||||
private addFilterToSearch (search: string, newFilter: AdvancedInputFilterChild) {
|
private addFilterToSearch (search: string, newFilter: AdvancedInputFilterChild) {
|
||||||
const filterTokens = this.restService.tokenizeString(newFilter.value)
|
const filterTokens = this.restService.tokenizeString(newFilter.value)
|
||||||
|
|
||||||
|
const tokensToAdd: string[] = []
|
||||||
let searchTokens = this.restService.tokenizeString(search)
|
let searchTokens = this.restService.tokenizeString(search)
|
||||||
|
|
||||||
for (const filterToken of filterTokens) {
|
for (const filterToken of filterTokens) {
|
||||||
|
@ -170,10 +172,10 @@ export class AdvancedInputFilterComponent implements OnInit, AfterViewInit {
|
||||||
|
|
||||||
// Tokenize search and remove a potential existing filter
|
// Tokenize search and remove a potential existing filter
|
||||||
searchTokens = searchTokens.filter(t => !t.startsWith(prefix))
|
searchTokens = searchTokens.filter(t => !t.startsWith(prefix))
|
||||||
searchTokens.push(filterToken)
|
tokensToAdd.push(filterToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
return searchTokens.join(' ')
|
return searchTokens.concat(tokensToAdd).join(' ')
|
||||||
}
|
}
|
||||||
|
|
||||||
private parseFilters (search: string) {
|
private parseFilters (search: string) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue