Refine ranch tree, growth sync and monitoring policies

This commit is contained in:
AttilaNet
2026-11-08 09:53:02 +08:00
parent a37627b490
commit 9611a3413f
24 changed files with 640 additions and 1227 deletions
-7
View File
@@ -68,7 +68,6 @@ class AccountsWindow(W.QMainWindow):
window = gui.Window(folder)
window.connection_guard = lambda session: self.allow_connection(window, session)
window.login_guard = lambda account: self.allow_login(window, account)
window.device_guard = lambda serial: self.allow_device(window, serial)
window.profile_changed.connect(lambda label: self.rename_profile(identifier, label))
self.windows[identifier], self.locks[identifier] = window, lock
self.tabs.addTab(window, profile.get("label", "账号"))
@@ -124,10 +123,6 @@ class AccountsWindow(W.QMainWindow):
return False
return True
def allow_device(self, requester, serial):
return not any(window is not requester and window.farm.running and
(not serial or not window.farm.adb.serial or serial == window.farm.adb.serial) for window in self.windows.values())
def resume_all(self):
for window in self.windows.values():
if window.engine.demo and not window.busy and window.saved_sessions.count():
@@ -141,7 +136,6 @@ class AccountsWindow(W.QMainWindow):
def stop_all(self):
for window in self.windows.values():
window.start_monitor.setChecked(False)
window.start_farm.setChecked(False)
window.execute.setChecked(False)
def close_profile(self, index):
@@ -149,7 +143,6 @@ class AccountsWindow(W.QMainWindow):
if window is None:
return
window.start_monitor.setChecked(False)
window.start_farm.setChecked(False)
window.timer.stop()
window.closed = True
window.pending_refresh = None