backend, mark item as read

This commit is contained in:
2023-10-30 19:52:51 +01:00
parent abf9a1b818
commit 579fa1f7ca
3 changed files with 36 additions and 6 deletions
+9 -2
View File
@@ -1,5 +1,5 @@
<script setup>
import { ref, onMounted, nextTick } from 'vue';
import { ref, unref, onMounted, nextTick } from 'vue';
import axios from 'axios';
import { Readability } from '@mozilla/readability';
@@ -124,12 +124,19 @@ function handleIntersection(entries) {
if (entry.isVisible === false) {
console.log('Element is out of sight ' + entry.intersectionRatio);
//console.log(feeds.value[entry.target.id])
markRead(feeds.value[entry.target.id].id)
markRead(feeds.value[entry.target.id].id).await
removeFeed(entry.target.id)
// TODO viewport moves crazy
}
}
})
}
function removeFeed(index) {
const array = unref(feeds);
array.splice(index, 1);
}
let initialLoad = false
onMounted(() => {
initialLoad = false