Reconnecting overflow

This commit is contained in:
cutls 2019-11-12 00:55:32 +09:00
parent 6a11099b50
commit 9a49979dcb

View File

@ -267,12 +267,6 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
} else { } else {
var typeA = JSON.parse(mess.data).event var typeA = JSON.parse(mess.data).event
if (typeA == 'delete') { if (typeA == 'delete') {
var del = localStorage.getItem('delete')
if (del > 10) {
reconnector(tlid, type, acct_id, data)
} else {
localStorage.setItem('delete', del * 1 + 1)
}
var obj = JSON.parse(mess.data).payload var obj = JSON.parse(mess.data).payload
if (delc == 'true') { if (delc == 'true') {
$('#timeline_' + tlid + ' [toot-id=' + JSON.parse(mess.data).payload + ']').addClass( $('#timeline_' + tlid + ' [toot-id=' + JSON.parse(mess.data).payload + ']').addClass(
@ -286,7 +280,6 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
$('[toot-id=' + JSON.parse(mess.data).payload + ']').remove() $('[toot-id=' + JSON.parse(mess.data).payload + ']').remove()
} }
} else if (typeA == 'update' || typeA == 'conversation') { } else if (typeA == 'update' || typeA == 'conversation') {
localStorage.removeItem('delete')
if (!$('#unread_' + tlid + ' .material-icons').hasClass('teal-text')) { if (!$('#unread_' + tlid + ' .material-icons').hasClass('teal-text')) {
//markers show中はダメ //markers show中はダメ
var obj = JSON.parse(JSON.parse(mess.data).payload) var obj = JSON.parse(JSON.parse(mess.data).payload)
@ -810,28 +803,6 @@ function icon(type) {
} }
return response return response
} }
function strAlive() {
var date = new Date()
var a = date.getTime()
var unix = Math.floor(a / 1000)
var col = localStorage.getItem('column')
if (col) {
var obj = JSON.parse(col)
Object.keys(obj).forEach(function(key) {
if ($('#notice_icon_' + key).hasClass('red-text')) {
var type = obj[key].type
var acct_id = obj[key].domain
var data = obj[key].data
reconnector(key, type, acct_id, data, 'error')
}
})
}
return
}
function strAliveInt() {
setTimeout(strAlive, 10000)
}
function reconnector(tlid, type, acct_id, data, mode) { function reconnector(tlid, type, acct_id, data, mode) {
console.log('%c Reconnector:' + mode + '(timeline' + tlid + ')', 'color:pink') console.log('%c Reconnector:' + mode + '(timeline' + tlid + ')', 'color:pink')
if (type == 'mix' || type == 'integrated' || type == 'plus') { if (type == 'mix' || type == 'integrated' || type == 'plus') {
@ -891,7 +862,6 @@ function columnReload(tlid, type) {
parseColumn(tlid) parseColumn(tlid)
} }
} }
strAliveInt()
//Markers //Markers
function getMarker(tlid, type, acct_id) { function getMarker(tlid, type, acct_id) {
var domain = localStorage.getItem('domain_' + acct_id) var domain = localStorage.getItem('domain_' + acct_id)