Compare commits

..

No commits in common. "2ace99f75d5caeb15213db39b901f4951bee0e82" and "48e727b2eb1e77724d3975e1d4738ec2a8105bd2" have entirely different histories.

3 changed files with 5 additions and 15 deletions

View File

@ -27,7 +27,7 @@
</div>
<h3 class="title is-6" v-if="currentItem.name" v-text="currentItem.name"></h3>
<div class="content is-pre" v-html="main_content"></div>
<div class="content" v-html="main_content"></div>
<div class="photos">
<div class="photo" v-for="photo in photo_rest" :key="photo">
@ -270,7 +270,7 @@
<style scoped>
.entry.unread {
border-color: #555;
outline: 1px solid #ccc;
}
.media .entry {
@ -286,7 +286,4 @@
grid-template-columns: repeat(3, 1fr);
grid-gap: 4px;
}
.is-pre {
white-space: pre-wrap;
}
</style>

View File

@ -58,8 +58,6 @@
return this.$store.dispatch('markRead', {channel: channel, entry: item._id})
.then(() => {
item._is_read = true
}).then(() => {
this.$store.dispatch('fetchChannels')
})
},
handleScroll() {

View File

@ -175,20 +175,15 @@ export default new Vuex.Store({
},
bottomReached() {
let count = 0
let uids = []
let items = this.state.timeline.items
uids = _.map(_.filter(items, item => !item._is_read), item => item._id)
items.forEach((item) => {
this.state.timeline.items.forEach((item) => {
if (item && !item._is_read) {
item._is_read = true
this.dispatch('markRead', {channel: this.state.channel.uid, entry: item._id})
count++;
}
})
if (count > 0) {
this.dispatch('markRead', {channel: this.state.channel.uid, 'entry[]': uids})
.then(() => {
this.dispatch('fetchChannels')
})
}
},
startEventListening({commit}, url) {