Skip to content

Commit

Permalink
fix(widgets: pw-helper): save last used script to permanent DB (while…
Browse files Browse the repository at this point in the history
… rest of PW-helper stuff saved to session-time DB)
  • Loading branch information
actionless committed Nov 18, 2024
1 parent 9c1b3f3 commit 4e90ebb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actionless/widgets/pipewire_helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function pipewire_helper.init(widget_args)

function pipewire_helper.load()
pipewire_helper.enabled_scripts = db.session_db().get_or_set(db_ids.enabled, {})
pipewire_helper.last_script = db.session_db().get_or_set(
pipewire_helper.last_script = db.get_or_set(
db_ids.last,
pipewire_helper.available_scripts[1].id
or pipewire_helper.available_scripts[1].cmd
Expand All @@ -88,7 +88,7 @@ function pipewire_helper.init(widget_args)
db.session_db().set(db_ids.enabled, pipewire_helper.enabled_scripts)
local current_script = pipewire_helper.get_current_script()
if current_script then
db.session_db().set(db_ids.last, current_script.id)
db.set(db_ids.last, current_script.id)
end
end
-------------------------------------------------------------------------------
Expand Down

0 comments on commit 4e90ebb

Please sign in to comment.