Merge pull request #539 from aclist/fix/remove-from-history

fix: restore missing route
This commit is contained in:
aclist authored and GitHub committed 2026-11-11 05:00:34 +09:00
commit c7ef91f02e
2 files changed
+13

No files matched your search

+9
View File
@@ -46,6 +46,15 @@ class ConfigManager:
ips.append(record)
self.update_config(Preferences.IP_LIST, ips)
def remove_from_history_file(self, fqip: str) -> None:
try:
history = self.prefs.paths.history
ips = [line.rstrip() for line in history.read_text().splitlines()]
ips.remove(fqip)
history.write_text("\n".join(ips))
except Exception as e:
logger.critical(e)
def update_history_file(self, fqip: str) -> None:
try:
with open(self.prefs.paths.history, "r") as f:
+4
View File
@@ -281,6 +281,10 @@ class ServerModelManager:
def remove_from_history(self, record: Servers.Record) -> None:
proxy_man = self._get_proxy_man()
proxy_man.remove_row_from_control(record)
fqip = Servers.record_to_fqip(record)
config_man = self.controller.get_config_man()
config_man.remove_from_history_file(fqip)
self.update_history()
@call_on_thread(dialog.querying)