Skip to content

Commit

Permalink
Feat/menu to enable/disable Steps Stats
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock committed Nov 22, 2024
1 parent bb4fc28 commit 037ec31
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,19 @@ def set_display_memory_state(checked, _):
)


def set_show_steps_stats(checked, _):
if not config.show_steps_stats and not askUser(
"This feature would slow down the loading of the old stats page if you have a lot of reviews. Are you sure you want to enable it?"
):
return
config.show_steps_stats = checked


menu_show_steps_stats = checkable(
title="Show steps stats", on_click=set_show_steps_stats
)


def set_load_balance(checked, _):
config.load_balance = checked

Expand Down Expand Up @@ -236,6 +249,7 @@ def sponsor(did=None):
menu_for_helper.addAction(menu_auto_disperse_after_sync)
menu_for_helper.addAction(menu_auto_disperse)
menu_for_helper.addAction(menu_display_memory_state)
menu_for_helper.addAction(menu_show_steps_stats)
menu_for_helper.addAction(menu_load_balance)
menu_for_helper.addAction(menu_auto_disperse_after_reschedule)
menu_for_easy_days = menu_for_helper.addMenu(
Expand Down Expand Up @@ -299,6 +313,7 @@ def adjust_menu():
menu_auto_disperse_after_sync.setChecked(config.auto_disperse_after_sync)
menu_auto_disperse.setChecked(config.auto_disperse_when_review)
menu_display_memory_state.setChecked(config.display_memory_state)
menu_show_steps_stats.setChecked(config.show_steps_stats)
menu_load_balance.setChecked(config.load_balance)
menu_auto_disperse_after_reschedule.setChecked(
config.auto_disperse_after_reschedule
Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"has_rated": false,
"has_sponsored": false,
"skip_manual_resched_cards": false,
"show_steps_stats": true
"show_steps_stats": false
}

0 comments on commit 037ec31

Please sign in to comment.