mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-17 12:15:47 +02:00
Fix broken reply-account advanced selector arguments after a TweetDeck update
This commit is contained in:
parent
97f42ead66
commit
b445a3a9b8
@ -23,25 +23,34 @@ enabled(){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var section = data.element.closest("section.js-column");
|
let section = data.element.closest("section.js-column");
|
||||||
|
let column = TD.controller.columnManager.get(section.attr("data-column"));
|
||||||
|
|
||||||
var column = TD.controller.columnManager.get(section.attr("data-column"));
|
let feeds = column.getFeeds();
|
||||||
var header = $(".column-title", section);
|
let accountText = "";
|
||||||
var title = header.children(".column-head-title");
|
|
||||||
|
|
||||||
var columnTitle, columnAccount;
|
if (feeds.length === 1){
|
||||||
|
let metadata = feeds[0].getMetadata();
|
||||||
if (title.length){
|
let id = metadata.ownerId || metadata.id;
|
||||||
columnTitle = title.text();
|
|
||||||
columnAccount = header.children(".attribution").text();
|
if (id){
|
||||||
}
|
accountText = TD.cache.names.getScreenName(id);
|
||||||
else{
|
}
|
||||||
columnTitle = header.children(".column-title-edit-box").val();
|
else{
|
||||||
columnAccount = "";
|
let account = TD.storage.accountController.get(feeds[0].getAccountKey());
|
||||||
|
|
||||||
|
if (account){
|
||||||
|
accountText = "@"+account.getUsername();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let header = $(".column-header-title", section);
|
||||||
|
let title = header.children(".column-heading");
|
||||||
|
let titleText = title.length ? title.text() : header.children(".column-title-edit-box").val();
|
||||||
|
|
||||||
try{
|
try{
|
||||||
query = configuration.customSelector(columnTitle, columnAccount, column, section.hasClass("column-temp"));
|
query = configuration.customSelector(titleText, accountText, column, section.hasClass("column-temp"));
|
||||||
}catch(e){
|
}catch(e){
|
||||||
$TD.alert("warning", "Plugin reply-account has invalid configuration: customSelector threw an error: "+e.message);
|
$TD.alert("warning", "Plugin reply-account has invalid configuration: customSelector threw an error: "+e.message);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user