mirror of
https://github.com/Eugeny/tabby.git
synced 2025-08-22 01:01:57 +00:00
avoid duplicate entries in recent profiles - fixes #4179
This commit is contained in:
@@ -105,7 +105,8 @@ export class ButtonProvider extends ToolbarButtonProvider {
|
||||
async launchProfile (profile: Profile) {
|
||||
await this.profilesServices.openNewTabForProfile(profile)
|
||||
|
||||
const recentProfiles = this.config.store.recentProfiles
|
||||
let recentProfiles = this.config.store.recentProfiles
|
||||
recentProfiles = recentProfiles.filter(x => x.group !== profile.group || x.name !== profile.name)
|
||||
recentProfiles.unshift(profile)
|
||||
if (recentProfiles.length > 5) {
|
||||
recentProfiles.pop()
|
||||
|
Reference in New Issue
Block a user