fixed recovery of custom tab titles - fixes #4406

This commit is contained in:
Eugene Pankov 2021-08-14 23:36:41 +02:00
parent 3fe2dccb94
commit 7551201796
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
2 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,7 @@ export class TabHeaderComponent extends BaseComponent {
modal.result.then(result => { modal.result.then(result => {
this.tab.setTitle(result) this.tab.setTitle(result)
this.tab.customTitle = result this.tab.customTitle = result
this.app.emitTabsChanged()
}).catch(() => null) }).catch(() => null)
} }

View File

@ -34,6 +34,7 @@ export class TabRecoveryService {
const token = await tab.getRecoveryToken() const token = await tab.getRecoveryToken()
if (token) { if (token) {
token.tabTitle = tab.title token.tabTitle = tab.title
token.tabCustomTitle = tab.customTitle
if (tab.color) { if (tab.color) {
token.tabColor = tab.color token.tabColor = tab.color
} }
@ -55,6 +56,7 @@ export class TabRecoveryService {
tab.inputs = tab.inputs ?? {} tab.inputs = tab.inputs ?? {}
tab.inputs.color = token.tabColor ?? null tab.inputs.color = token.tabColor ?? null
tab.inputs.title = token.tabTitle || '' tab.inputs.title = token.tabTitle || ''
tab.inputs.customTitle = token.tabCustomTitle || ''
tab.inputs.disableDynamicTitle = token.disableDynamicTitle tab.inputs.disableDynamicTitle = token.disableDynamicTitle
return tab return tab
} catch (error) { } catch (error) {