mirror of
https://github.com/aclist/dztui.git
synced 2026-11-22 09:29:31 +01:00
feat: attach FilterManager to each ServerTreeView
This commit is contained in:
1 parent
5bcb2b279d
commit
ed7f803d47
8 files changed
+121
-159
No files matched your search
@@ -54,6 +54,14 @@ class ConfigManager:
|
||||
def get_favorites(self) -> list[str]:
|
||||
return self.lookup(Preferences.IP_LIST)
|
||||
|
||||
def get_favorite(self) -> tuple[str, str] | tuple[None, None]:
|
||||
fav = str(self.lookup(Preferences.FAV_LBL))
|
||||
if len(fav) < 1:
|
||||
return None, None
|
||||
ip = str(self.lookup(Preferences.FAV_SRV))
|
||||
addr = ip.split(":")
|
||||
return fav, f"{addr[0]}:{addr[2]}"
|
||||
|
||||
def is_in_favs(self, record: str) -> bool:
|
||||
favs = self.get_favorites()
|
||||
if record in favs:
|
||||
|
||||
Reference in new issue
Block a user