Skip to content

Commit

Permalink
fixup! fix(Routing): add proper routing for circles
Browse files Browse the repository at this point in the history
Signed-off-by: Grigory Vodyanov <[email protected]>
  • Loading branch information
GVodyanov committed Jan 16, 2025
1 parent da8882a commit 350b8c2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/views/Contacts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:selected-group="selectedGroup"
:selected-contact="selectedContact">
<div class="import-and-new-contact-buttons">
<SettingsImportContacts v-if="!loadingContacts && isEmptyGroup && !isChartView" />
<SettingsImportContacts v-if="!loadingContacts && isEmptyGroup && !isChartView && !isCirclesView" />
<!-- new-contact-button -->
<Button v-if="!loadingContacts"
type="secondary"
Expand Down Expand Up @@ -197,7 +197,7 @@ export default {
} else if (this.selectedGroup === GROUP_NO_GROUP_CONTACTS) {
return this.ungroupedContacts.map(contact => this.sortedContacts.find(item => item.key === contact.key))
} else if (this.selectedGroup === ROUTE_CIRCLE) {
return this.circles
return []
}
const group = this.groups.filter(group => group.name === this.selectedGroup)[0]
if (group) {
Expand All @@ -206,6 +206,10 @@ export default {
return []
},

isCirclesView() {
return this.selectedGroup === ROUTE_CIRCLE
},

ungroupedContacts() {
return this.sortedContacts.filter(contact => this.contacts[contact.key].groups && this.contacts[contact.key].groups.length === 0)
},
Expand Down

0 comments on commit 350b8c2

Please sign in to comment.