Fix: hide filter btns on coll notf pane

This commit is contained in:
Cutls 2019-06-04 22:41:04 +09:00
parent 17a71ddbf6
commit 409635b00c
2 changed files with 12 additions and 7 deletions

View File

@ -445,7 +445,7 @@ function resetNotfFilter(tlid){
localStorage.setItem("exclude-" + tlid, "") localStorage.setItem("exclude-" + tlid, "")
parseColumn(); parseColumn();
} }
function notfFilter(id,tlid){ function notfFilter(id,tlid,acct_id){
var excludetxt = localStorage.getItem("exclude-" + tlid); var excludetxt = localStorage.getItem("exclude-" + tlid);
if (excludetxt || excludetxt !="") { if (excludetxt || excludetxt !="") {
excludetxt = excludetxt + "&account_id="+id excludetxt = excludetxt + "&account_id="+id

View File

@ -235,7 +235,12 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var what = lang.lang_parse_polled; var what = lang.lang_parse_polled;
var icon = "fa-tasks purple-text"; var icon = "fa-tasks purple-text";
} }
var noticetext = '<i class="fas fa-filter pointer big-text" onclick="notfFilter(\'' + toot.account.id + if (tlid == "notf") {
var notfFilHide = "hide"
} else {
var notfFilHide = ""
}
var noticetext = '<i class="fas fa-filter pointer big-text ' + notfFilHide + '" onclick="notfFilter(\'' + toot.account.id +
'\',\'' + tlid + '\');" title="' + lang.lang_parse_notffilter + '"></i><span class="cbadge cbadge-hover"title="' + date(toot.created_at, '\',\'' + tlid + '\');" title="' + lang.lang_parse_notffilter + '"></i><span class="cbadge cbadge-hover"title="' + date(toot.created_at,
'absolute') + '(' + lang.lang_parse_notftime + ')"><i class="far fa-clock"></i>' + date(toot.created_at, 'absolute') + '(' + lang.lang_parse_notftime + ')"><i class="far fa-clock"></i>' + date(toot.created_at,
datetype) + datetype) +
@ -595,11 +600,11 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var blur = null var blur = null
} }
if (media.pleroma && media.pleroma.mime_type.indexOf("video") !== -1) { if (media.pleroma && media.pleroma.mime_type.indexOf("video") !== -1) {
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',' + viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',' +
acct_id + ')" id="' + id + '-image-' + key2 + '" data-url="' + url + acct_id + ')" id="' + id + '-image-' + key2 + '" data-url="' + url +
'" data-type="video" class="img-parsed"><video src="' + '" data-type="video" class="img-parsed"><video src="' +
purl + '" class="' + sense + purl + '" class="' + sense +
' toot-img pointer" style="max-width:100%;"></a></span>'; ' toot-img pointer" style="max-width:100%;"></a></span>';
} else { } else {
if (media.type == "unknown") { if (media.type == "unknown") {
viewer = viewer + '<a href="' + media.remote_url + '" title="' + media.remote_url + '">[' + lang.lang_parse_unknown + ']</a> ' viewer = viewer + '<a href="' + media.remote_url + '" title="' + media.remote_url + '">[' + lang.lang_parse_unknown + ']</a> '