edit legacy comments

This commit is contained in:
SimplifiedPrivacy 2026-10-16 18:07:26 -04:00
parent e8373cf0ab
commit e296e212db
3 changed files with 3 additions and 64 deletions

View file

@ -42,39 +42,3 @@ class SessionStateController:
def remove(profile_id: int):
SessionState.dissolve(profile_id)
ProfileStateRepository().sync_session_removed(profile_id)
# class SessionStateController:
# @staticmethod
# def get(id: int):
# return SessionState.find_by_id(id)
# @staticmethod
# def get_or_new(id: int):
# session_state = SessionStateController.get(id)
# if session_state is None:
# # update global state:
# global_state = GlobalState()
# if id not in global_state.session_profile_ids: # sanity check.
# global_state.session_profile_ids.append(id)
# # create new:
# return SessionState(id)
# return session_state
# @staticmethod
# def exists(id: int):
# return SessionState.exists(id)
# @staticmethod
# def all():
# return SessionState.all()
# @staticmethod
# def update_or_create(session_state):
# session_state.save()

View file

@ -35,29 +35,3 @@ class SystemStateController:
ProfileStateRepository().global_state.systemwide_profile_id = None
return res
# class SystemStateController:
# @staticmethod
# def get():
# return SystemState.get()
# @staticmethod
# def exists():
# return SystemState.exists()
# @staticmethod
# def create(profile_id: int, firewalled: bool, dns_set: bool, protocol: ProtocolChoice, process_id: int = None) -> SystemState:
# if process_id:
# current_state = SystemState(profile_id, firewalled, dns_set, protocol, process_id)
# else:
# current_state = SystemState(profile_id, firewalled, dns_set, protocol)
# current_state.save()
# return current_state
# @staticmethod
# def update_or_create(system_state):
# system_state.save()
# @staticmethod
# def dissolve():
# return SystemState.dissolve()

View file

@ -155,6 +155,7 @@ def enable_profile(
if connection_result.valid:
if profile_observer is not None:
profile_observer.notify('enabled', profile)
return Result(valid=True, data=profile.type)
else:
logger.error(f"Couldn't enable the profile: {connection_result.error_type}")
@ -253,7 +254,7 @@ def disable_profile(
# if it made it this far, it worked (in theory).
# wipe state:
SystemStateController.remove(profile.id)
SystemStateController.dissolve()
# update ui:
if profile_observer is not None: