Skip to content

Commit

Permalink
Session get_url_params -> url_params_string_from_prefs
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Dec 15, 2023
1 parent a031f1a commit 7b084cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions addons/io_hubs_addon/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def execute(self, context):
prefs = context.window_manager.hubs_scene_debugger_prefs
hubs_instance_url = prefs.hubs_instances[prefs.hubs_instance_idx].url
hubs_session.load(
f'{hubs_instance_url}?new&{hubs_session.get_url_params(context)}')
f'{hubs_instance_url}?new&{hubs_session.url_params_string_from_prefs(context)}')

if was_alive:
hubs_session.bring_to_front(context)
Expand Down Expand Up @@ -119,7 +119,7 @@ def execute(self, context):
prefs = context.window_manager.hubs_scene_debugger_prefs
room_url = prefs.hubs_rooms[prefs.hubs_room_idx].url

params = hubs_session.get_url_params(context)
params = hubs_session.url_params_string_from_prefs(context)
if params:
if "?" in room_url:
hubs_session.load(f'{room_url}&{params}')
Expand Down Expand Up @@ -374,9 +374,8 @@ def draw(self, context):
if hubs_session.is_alive():
for key in PARAMS_TO_STRING.keys():
params_icons[key] = 'PANEL_CLOSE'
params = hubs_session.get_url_params(context)

for param in params:
for param in hubs_session.room_params:
if param in params_icons:
params_icons[param] = 'CHECKMARK'
else:
Expand Down
2 changes: 1 addition & 1 deletion addons/io_hubs_addon/hubs_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def get_local_storage(self):
def get_url(self):
return self._web_driver.current_url

def get_url_params(self, context):
def url_params_string_from_prefs(self, context):
params = ""
keys = list(PARAMS_TO_STRING.keys())
for key in keys:
Expand Down

0 comments on commit 7b084cc

Please sign in to comment.