#433: do not remove the reply dialog

This commit is contained in:
dave 2019-03-11 10:52:28 -04:00
parent 09736691ea
commit 4f455eefe5
5 changed files with 41 additions and 12 deletions

View File

@ -30,7 +30,8 @@ const conversation = {
}, },
props: [ props: [
'statusoid', 'statusoid',
'collapsable' 'collapsable',
'replying'
], ],
computed: { computed: {
status () { status () {
@ -102,6 +103,9 @@ const conversation = {
}, },
setHighlight (id) { setHighlight (id) {
this.highlight = id this.highlight = id
},
toggleReplying () {
this.$emit('toggleReplying')
} }
} }
} }

View File

@ -10,14 +10,19 @@
<div class="timeline"> <div class="timeline">
<status <status
v-for="status in conversation" v-for="status in conversation"
@goto="setHighlight" :key="status.id" @goto="setHighlight"
:inlineExpanded="collapsable" :statusoid="status" @toggleReplying="toggleReplying"
:expandable='false' :focused="focused(status.id)" :replying="replying && status.id === statusId"
:key="status.id"
:inlineExpanded="collapsable"
:statusoid="status"
:expandable='false'
:focused="focused(status.id)"
:inConversation='true' :inConversation='true'
:highlight="highlight" :highlight="highlight"
:replies="getReplies(status.id)" :replies="getReplies(status.id)"
class="status-fadein"> class="status-fadein"
</status> />
</div> </div>
</div> </div>
</div> </div>

View File

@ -25,11 +25,11 @@ const Status = {
'replies', 'replies',
'isPreview', 'isPreview',
'noHeading', 'noHeading',
'inlineExpanded' 'inlineExpanded',
'replying'
], ],
data () { data () {
return { return {
replying: false,
expanded: false, expanded: false,
unmuted: false, unmuted: false,
userExpanded: false, userExpanded: false,
@ -307,7 +307,7 @@ const Status = {
} }
}, },
toggleReplying () { toggleReplying () {
this.replying = !this.replying this.$emit('toggleReplying')
}, },
gotoOriginal (id) { gotoOriginal (id) {
// only handled by conversation, not status_or_conversation // only handled by conversation, not status_or_conversation

View File

@ -5,7 +5,8 @@ const statusOrConversation = {
props: ['statusoid'], props: ['statusoid'],
data () { data () {
return { return {
expanded: false expanded: false,
replying: false
} }
}, },
components: { components: {
@ -15,6 +16,9 @@ const statusOrConversation = {
methods: { methods: {
toggleExpanded () { toggleExpanded () {
this.expanded = !this.expanded this.expanded = !this.expanded
},
toggleReplying () {
this.replying = !this.replying
} }
} }
} }

View File

@ -1,7 +1,23 @@
<template> <template>
<div> <div>
<conversation v-if="expanded" @toggleExpanded="toggleExpanded" :collapsable="true" :statusoid="statusoid"></conversation> <conversation
<status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :inConversation="false" :focused="false" :statusoid="statusoid"></status> v-if="expanded"
@toggleExpanded="toggleExpanded"
@toggleReplying="toggleReplying"
:replying="replying"
:collapsable="true"
:statusoid="statusoid"
/>
<status
v-else
@toggleExpanded="toggleExpanded"
@toggleReplying="toggleReplying"
:replying="replying"
:expandable="true"
:inConversation="false"
:focused="false"
:statusoid="statusoid"
/>
</div> </div>
</template> </template>