Let client know project open count

This commit is contained in:
wqy
2022-09-18 00:38:25 +08:00
parent a65b9b1cc5
commit 9454870d5c
3 changed files with 9 additions and 1 deletions

View File

@@ -34,6 +34,11 @@ def open_project(name: str) -> None:
def is_project_open(name: str) -> bool:
return name in conn
def get_project_open_count(name: str) -> int:
if is_project_open(name):
return _project_open_count[name]
return 0
def close_project(name: str) -> None:
if name in _project_open_count:
_project_open_count[name] -= 1