#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: [
'statusoid',
'collapsable'
'collapsable',
'replying'
],
computed: {
status () {
@ -102,6 +103,9 @@ const conversation = {
},
setHighlight (id) {
this.highlight = id
},
toggleReplying () {
this.$emit('toggleReplying')
}
}
}

View File

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

View File

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

View File

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

View File

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