Flow.Launcher
Flow.Launcher copied to clipboard
BUG: JSON-RPC Plugin Parameter Send Issue with JsonRPCAction
当我返回的 Title 不变的情况下,JsonRPCAction 传递的 parameters 参数值会始终保存第一次接收到的值
似乎parameter就是跟title是一样的?那title不变parameter也不会变吧
@taooceros 上图是我根据这个问题调整后的
之前我是这样写的
def save_info(self, key, value):
return [{
"Title": "保存",
"SubTitle": "save",
"IcoPath": "icon.png",
"JsonRPCAction": {
"method": "save_to_database",
"parameters": ["{},{}".format(key, value)]
}
}]
def query(self, query):
_args = query.split(" ")
if len(_args) == 2:
if _args[0] == "delete":
return self.delete_key(_args[1])
else:
return self.save_info(_args[0], _args[1])
return self.find_key(_args[0])
当我 title 始终保持是 “保存” 的时候,query 无论怎么更新,parameters 传递的始终是 save_info 第一次被调用时的值。
我研究一下
噢似乎是因为结果刷的太快最后一个被丢掉了?可能是一些race tracing的问题?你试试慢点打字
我尝试过了,不是的。打字完后,停顿很久,parameters 一样没有更新。 感觉是 Title 或者 SubTitle 会组合作为 key 去存储 JsonRPCAction ,当 Title 或者 SubTitle 都不发生变化时,后面传递的 parameters 都会被忽略,不会更新。
我会拿正式版再试一次
我大概知道了,可能是cache的问题 感谢报告
可能需要重新设计一下这个result的去重了
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.