diff --git a/src/components/NewMessage/NewMessage.vue b/src/components/NewMessage/NewMessage.vue
index 3162828d18e4..e6c9997f6c93 100644
--- a/src/components/NewMessage/NewMessage.vue
+++ b/src/components/NewMessage/NewMessage.vue
@@ -152,7 +152,7 @@
:token="token"
@close="togglePollEditor" />
-
@@ -394,6 +394,10 @@ export default {
&& this.conversation.type !== CONVERSATION.TYPE.NOTE_TO_SELF
},
+ canCreatePollDrafts() {
+ return hasTalkFeature(this.token, 'talk-polls-drafts') && this.$store.getters.isModerator
+ },
+
currentConversationIsJoined() {
return this.$store.getters.currentConversationIsJoined
},
diff --git a/src/components/NewMessage/NewMessagePollEditor.vue b/src/components/NewMessage/NewMessagePollEditor.vue
index c3841b5c53f0..56dfb8dde536 100644
--- a/src/components/NewMessage/NewMessagePollEditor.vue
+++ b/src/components/NewMessage/NewMessagePollEditor.vue
@@ -221,7 +221,7 @@ function openPollDraftHandler() {
&__wrapper {
display: flex;
align-items: flex-end;
- gap: 4px;
+ gap: var(--default-grid-baseline);
}
&__caption {
diff --git a/src/components/PollViewer/PollDraftHandler.vue b/src/components/PollViewer/PollDraftHandler.vue
index a7aa44f98f5a..cef94384a691 100644
--- a/src/components/PollViewer/PollDraftHandler.vue
+++ b/src/components/PollViewer/PollDraftHandler.vue
@@ -49,7 +49,6 @@ import EmptyView from '../EmptyView.vue'
import Poll from '../MessagesList/MessagesGroup/Message/MessagePart/Poll.vue'
import { useStore } from '../../composables/useStore.js'
-import { hasTalkFeature } from '../../services/CapabilitiesManager.ts'
import { EventBus } from '../../services/EventBus.js'
import { usePollsStore } from '../../stores/polls.ts'
@@ -60,17 +59,13 @@ const emit = defineEmits<{
(event: 'close'): void,
}>()
-const supportPollDrafts = hasTalkFeature(props.token, 'talk-polls-drafts')
const store = useStore()
const pollsStore = usePollsStore()
/**
* Receive poll drafts for the current conversation as owner/moderator
*/
-const isModerator = computed(() => (store.getters as unknown).isModerator)
-if (supportPollDrafts && isModerator.value) {
- pollsStore.getPollDrafts(props.token)
-}
-const pollDrafts = computed(() => supportPollDrafts ? pollsStore.getDrafts(props.token) : [])
+pollsStore.getPollDrafts(props.token)
+const pollDrafts = computed(() => pollsStore.getDrafts(props.token))
/**
* Opens poll editor pre-filled from the draft
diff --git a/src/components/RightSidebar/SharedItems/SharedItemsTab.vue b/src/components/RightSidebar/SharedItems/SharedItemsTab.vue
index 62e16f08c093..24d77489e2e0 100644
--- a/src/components/RightSidebar/SharedItems/SharedItemsTab.vue
+++ b/src/components/RightSidebar/SharedItems/SharedItemsTab.vue
@@ -8,7 +8,7 @@
-
@@ -160,12 +160,8 @@ export default {
return this.$store.getters.conversation(this.token)
},
- supportPollDrafts() {
- return hasTalkFeature(this.token, 'talk-polls-drafts')
- },
-
- isModerator() {
- return this.$store.getters.isModerator
+ canCreatePollDrafts() {
+ return hasTalkFeature(this.token, 'talk-polls-drafts') && this.$store.getters.isModerator
},
loading() {