Skip to content

Commit

Permalink
chore: reverted modal opening on user state click, fixed quick profil…
Browse files Browse the repository at this point in the history
…e not opening when another is
  • Loading branch information
Samir Vimercati committed Feb 4, 2022
1 parent 384462b commit c69ad2b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
20 changes: 17 additions & 3 deletions components/views/chat/group/Group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default Vue.extend({
}
},
computed: {
...mapState(['friends', 'accounts']),
...mapState(['ui', 'friends', 'accounts']),
address() {
return getAddressFromState(this.group.from, this.$store.state)
},
Expand Down Expand Up @@ -78,8 +78,22 @@ export default Vue.extend({
this.group.from,
this.$store.state,
)
this.$store.commit('ui/setQuickProfilePosition', e)
this.$store.commit('ui/quickProfile', selectedUser)
const openQuickProfile = () => {
this.$store.commit('ui/setQuickProfilePosition', e)
this.$store.commit('ui/quickProfile', selectedUser)
}
if (!this.ui.quickProfile) {
openQuickProfile()
return
}
setTimeout(() => {
if (!this.ui.quickProfile) {
openQuickProfile()
}
}, 100)
},
},
})
Expand Down
10 changes: 4 additions & 6 deletions components/views/navigation/sidebar/status/Status.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<div id="status">
<div @click="openProfile">
<UiUserState
:user="{address: accounts.active, state: accounts.details.state}"
:src="src"
/>
</div>
<UiUserState
:user="{address: accounts.active, state: accounts.details.state}"
:src="src"
/>
<div
class="user-info has-tooltip has-tooltip-top has-tooltip-primary"
v-on:click="$toast.show($t('ui.copied'))"
Expand Down
8 changes: 0 additions & 8 deletions components/views/navigation/sidebar/status/Status.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ export default Vue.extend({
return hash ? `${this.$Config.textile.browser}/ipfs/${hash}` : ''
},
},
methods: {
openProfile() {
this.$store.commit('ui/toggleSettings', {
show: true,
defaultRoute: 'profile',
})
},
},
})
</script>

Expand Down

0 comments on commit c69ad2b

Please sign in to comment.