Skip to content

Commit

Permalink
#2089 - Remove 'Edit poll' menu (#2090)
Browse files Browse the repository at this point in the history
* remove edit poll menu

* remove unused constants

* fix the linter err

* restore delete option
  • Loading branch information
SebinSong committed Jun 21, 2024
1 parent 29e39ab commit abedfe6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
5 changes: 3 additions & 2 deletions frontend/views/containers/chatroom/MessageActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,11 @@ export default ({
return this.isText || this.isPoll
},
isEditable () {
return this.isMsgSender && (this.isText || this.isPoll)
return this.isMsgSender && this.isText
},
isDeletable () {
return this.isEditable || this.isGroupCreator
return this.isGroupCreator ||
(this.isMsgSender && (this.isText || this.isPoll))
}
},
methods: {
Expand Down
11 changes: 2 additions & 9 deletions frontend/views/containers/chatroom/MessageBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,7 @@ import SendArea from './SendArea.vue'
import ChatAttachmentPreview from './file-attachment/ChatAttachmentPreview.vue'
import { humanDate } from '@model/contracts/shared/time.js'
import { swapMentionIDForDisplayname } from '@model/contracts/shared/functions.js'
import {
MESSAGE_TYPES,
MESSAGE_VARIANTS
} from '@model/contracts/shared/constants.js'
import { MESSAGE_VARIANTS } from '@model/contracts/shared/constants.js'
import { OPEN_TOUCH_LINK_HELPER } from '@utils/events.js'
import { L, LTags } from '@common/common.js'
Expand Down Expand Up @@ -201,11 +198,7 @@ export default ({
humanDate,
swapMentionIDForDisplayname,
editMessage () {
if (this.type === MESSAGE_TYPES.POLL) {
alert('TODO: implement editting a poll')
} else {
this.isEditing = true
}
this.isEditing = true
},
onMessageEdited (newMessage) {
this.isEditing = false
Expand Down

0 comments on commit abedfe6

Please sign in to comment.