timeline subscription streaming bug

This commit is contained in:
cutls 2020-09-26 21:04:21 +09:00
parent 0f75972616
commit 06c944a35d

View File

@ -1689,10 +1689,11 @@ function getTlMeta(type, data, num, status) {
const columns = localStorage.getItem('column') const columns = localStorage.getItem('column')
const obj = JSON.parse(columns) const obj = JSON.parse(columns)
let ret = [] let ret = []
let i = 0 let i = -1
switch (type) { switch (type) {
case 'user': case 'user':
for (const tl of obj) { for (const tl of obj) {
i++
if (tl.domain != acct_id) continue if (tl.domain != acct_id) continue
if (tl.type == 'mix' || tl.type == 'home') { if (tl.type == 'mix' || tl.type == 'home') {
let voice = false let voice = false
@ -1704,11 +1705,11 @@ function getTlMeta(type, data, num, status) {
acct_id: tl.domain acct_id: tl.domain
}) })
} }
i++
} }
break break
case 'public:local': case 'public:local':
for (const tl of obj) { for (const tl of obj) {
i++
if (tl.domain != acct_id) continue if (tl.domain != acct_id) continue
if (tl.type == 'mix' || tl.type == 'local') { if (tl.type == 'mix' || tl.type == 'local') {
let voice = false let voice = false
@ -1720,11 +1721,11 @@ function getTlMeta(type, data, num, status) {
acct_id: tl.domain acct_id: tl.domain
}) })
} }
i++
} }
break break
case 'public:local:media': case 'public:local:media':
for (const tl of obj) { for (const tl of obj) {
i++
if (tl.domain != acct_id) continue if (tl.domain != acct_id) continue
if (tl.type == 'local-media') { if (tl.type == 'local-media') {
let voice = false let voice = false
@ -1736,13 +1737,14 @@ function getTlMeta(type, data, num, status) {
acct_id: tl.domain acct_id: tl.domain
}) })
} }
i++
} }
break; break;
case 'public': case 'public':
for (const tl of obj) { for (const tl of obj) {
i++
if (tl.domain != acct_id) continue if (tl.domain != acct_id) continue
if (tl.type == 'pub') { if (tl.type == 'pub') {
console.log(i, tl)
let voice = false let voice = false
if (localStorage.getItem('voice_' + i)) voice = true if (localStorage.getItem('voice_' + i)) voice = true
ret.push({ ret.push({
@ -1752,11 +1754,11 @@ function getTlMeta(type, data, num, status) {
acct_id: tl.domain acct_id: tl.domain
}) })
} }
i++
} }
break; break;
case 'public:media': case 'public:media':
for (const tl of obj) { for (const tl of obj) {
i++
if (tl.domain != acct_id) continue if (tl.domain != acct_id) continue
if (tl.type == 'pub-media') { if (tl.type == 'pub-media') {
let voice = false let voice = false
@ -1768,11 +1770,11 @@ function getTlMeta(type, data, num, status) {
acct_id: tl.domain acct_id: tl.domain
}) })
} }
i++
} }
break; break;
case 'list': case 'list':
for (const tl of obj) { for (const tl of obj) {
i++
if (tl.domain != acct_id) continue if (tl.domain != acct_id) continue
if (tl.type == 'list' && tl.data == data[1]) { if (tl.type == 'list' && tl.data == data[1]) {
let voice = false let voice = false
@ -1784,11 +1786,11 @@ function getTlMeta(type, data, num, status) {
acct_id: tl.domain acct_id: tl.domain
}) })
} }
i++
} }
break; break;
case 'direct': case 'direct':
for (const tl of obj) { for (const tl of obj) {
i++
if (tl.domain != acct_id) continue if (tl.domain != acct_id) continue
if (tl.type == 'dm') { if (tl.type == 'dm') {
let voice = false let voice = false
@ -1800,11 +1802,11 @@ function getTlMeta(type, data, num, status) {
acct_id: tl.domain acct_id: tl.domain
}) })
} }
i++
} }
break; break;
case 'hashtag': case 'hashtag':
for (const tl of obj) { for (const tl of obj) {
i++
if (tl.domain != acct_id) continue if (tl.domain != acct_id) continue
const columnDataRaw = tl.data const columnDataRaw = tl.data
let columnData let columnData
@ -1844,7 +1846,6 @@ function getTlMeta(type, data, num, status) {
acct_id: tl.domain acct_id: tl.domain
}) })
} }
i++
} }
break; break;
default: default: