chore: Hide inbox name only has one inbox (#6115)

This commit is contained in:
Sivin Varghese 2022-12-21 13:31:53 +05:30 committed by GitHub
parent 34f7405689
commit 2c2c47d7fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,11 @@
/> />
</h3> </h3>
<div class="conversation--header--actions"> <div class="conversation--header--actions">
<inbox-name :inbox="inbox" class="margin-right-small" /> <inbox-name
v-if="hasMultipleInboxes"
:inbox="inbox"
class="margin-right-small"
/>
<span <span
v-if="isSnoozed" v-if="isSnoozed"
class="snoozed--display-text margin-right-small" class="snoozed--display-text margin-right-small"
@ -145,6 +149,9 @@ export default {
const { inbox_id: inboxId } = this.chat; const { inbox_id: inboxId } = this.chat;
return this.$store.getters['inboxes/getInbox'](inboxId); return this.$store.getters['inboxes/getInbox'](inboxId);
}, },
hasMultipleInboxes() {
return this.$store.getters['inboxes/getInboxes'].length > 1;
},
}, },
methods: { methods: {