Page MenuHomePhorge

No OneTemporary

Size
5 KB
Referenced Files
None
Subscribers
None
diff --git a/src/components/status_or_conversation/status_or_conversation_two.js b/src/components/status_or_conversation/status_or_conversation_two.js
deleted file mode 100644
index 441552ca62..0000000000
--- a/src/components/status_or_conversation/status_or_conversation_two.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import Status from '../status/status.vue'
-import Conversation from '../conversation/conversation.vue'
-
-const statusOrConversation = {
- props: ['statusoid'],
- data () {
- return {
- expanded: false
- }
- },
- components: {
- Status,
- Conversation
- },
- methods: {
- toggleExpanded () {
- this.expanded = !this.expanded
- }
- }
-}
-
-export default statusOrConversation
diff --git a/src/components/status_or_conversation/status_or_conversation_two.vue b/src/components/status_or_conversation/status_or_conversation_two.vue
deleted file mode 100644
index 31649acdee..0000000000
--- a/src/components/status_or_conversation/status_or_conversation_two.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-<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>
- </div>
-</template>
-
-<script src="./status_or_conversation_two.js"></script>
-
-<style lang="scss">
- .spacer {
- height: 1em
- }
-</style>
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
index fae9a11aad..d090b5aabf 100644
--- a/src/components/timeline/timeline.js
+++ b/src/components/timeline/timeline.js
@@ -1,114 +1,114 @@
-import StatusOrConversation from '../status_or_conversation/status_or_conversation_two.vue'
+import StatusOrConversation from '../status_or_conversation/status_or_conversation.vue'
import { throttle, map } from 'lodash'
const Timeline = {
props: [
'timeline',
'timelineName',
'title',
'userId',
'tag',
'embedded',
'count'
],
data () {
return {
paused: false,
unfocused: false,
bottomedOut: false
}
},
computed: {
visibleStatuses () {
return map(this.timeline.visibleStatusIds, (id) => this.statuses[id])
},
statuses () {
return this.$store.state.statuses.statuses
},
timelineError () {
// TODO: fix
return false
},
newStatusCount () {
if (!this.timeline) { return 0 }
return this.timeline.newStatusCount
},
newStatusCountStr () {
return ` (${this.newStatusCount})`
},
classes () {
return {
root: ['timeline'].concat(!this.embedded ? ['panel', 'panel-default'] : []),
header: ['timeline-heading'].concat(!this.embedded ? ['panel-heading'] : []),
body: ['timeline-body'].concat(!this.embedded ? ['panel-body'] : []),
footer: ['timeline-footer'].concat(!this.embedded ? ['panel-footer'] : [])
}
}
},
components: {
StatusOrConversation
},
created () {
window.addEventListener('scroll', this.scrollLoad)
},
mounted () {
if (typeof document.hidden !== 'undefined') {
document.addEventListener('visibilitychange', this.handleVisibilityChange, false)
this.unfocused = document.hidden
}
window.addEventListener('keydown', this.handleShortKey)
},
destroyed () {
window.removeEventListener('scroll', this.scrollLoad)
window.removeEventListener('keydown', this.handleShortKey)
if (typeof document.hidden !== 'undefined') document.removeEventListener('visibilitychange', this.handleVisibilityChange, false)
// this.$store.commit('setLoading', { timeline: this.timelineName, value: false })
},
methods: {
handleShortKey (e) {
if (e.key === '.') this.showNewStatuses()
},
showNewStatuses () {
if (this.newStatusCount === 0) return
this.$store.dispatch('showNewStatusesForTimeline', { timelineName: this.timelineName })
this.paused = false
},
fetchOlderStatuses: throttle(function () {
this.$store.dispatch('fetchNextForTimeline', { timelineName: this.timelineName })
}, 1000, this),
scrollLoad (e) {
const bodyBRect = document.body.getBoundingClientRect()
const height = Math.max(bodyBRect.height, -(bodyBRect.y))
if (this.timeline.loading === false &&
this.$store.state.config.autoLoad &&
this.$el.offsetHeight > 0 &&
(window.innerHeight + window.pageYOffset) >= (height - 750)) {
this.fetchOlderStatuses()
}
},
handleVisibilityChange () {
this.unfocused = document.hidden
}
},
watch: {
newStatusCount (count) {
if (!this.$store.state.config.streaming) {
return
}
if (count > 0) {
// only 'stream' them when you're scrolled to the top
if (window.pageYOffset < 15 &&
!this.paused &&
!(this.unfocused && this.$store.state.config.pauseOnUnfocused)
) {
this.showNewStatuses()
} else {
this.paused = true
}
}
}
}
}
export default Timeline

File Metadata

Mime Type
text/x-diff
Expires
Sun, Aug 30, 9:29 PM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1738169
Default Alt Text
(5 KB)

Event Timeline