Correction of settings

This commit is contained in:
Vladless
2026-02-12 01:17:18 +03:00
parent 7faa7e7409
commit a35b233928
2 changed files with 2 additions and 4 deletions
+2 -4
View File
@@ -41,12 +41,10 @@ async def toggle_mode_setting(
key = keys[index - 1]
config = dict(MODES_CONFIG or {})
current = bool(config.get(key, False))
config[key] = not current
config = {k: bool((MODES_CONFIG or {}).get(k, False)) for k in MODES_TITLES.keys()}
config[key] = not config[key]
await update_modes_config(session, config)
await session.commit()
modes_state = {k: bool(config.get(k, False)) for k in MODES_TITLES.keys()}
await callback.message.edit_reply_markup(reply_markup=build_settings_modes_kb(modes_state))