feat: allow inbox specific flags for signature toggle (#8280)

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
This commit is contained in:
Shivam Mishra
2023-11-08 10:47:22 +05:30
committed by GitHub
parent 4cb981d81b
commit 5d224f2e04
5 changed files with 34 additions and 15 deletions

View File

@@ -281,6 +281,10 @@ export default {
type: Function,
default: () => {},
},
channelType: {
type: String,
default: '',
},
},
data() {
return {
@@ -316,8 +320,7 @@ export default {
messageSignature: 'getMessageSignature',
}),
sendWithSignature() {
const { send_with_signature: isEnabled } = this.uiSettings;
return isEnabled;
return this.fetchSignatureFlagFromUiSettings(this.channelType);
},
signatureToApply() {
return this.messageSignature;
@@ -543,9 +546,7 @@ export default {
return classByType;
},
toggleMessageSignature() {
this.updateUISettings({
send_with_signature: !this.sendWithSignature,
});
this.setSignatureFlagForInbox(this.channelType, !this.sendWithSignature);
this.setSignature();
},
},