Remove untranslated 'see old deck options' notice

It was intended to be a temporary message, and it's been about 15 months.

https://forums.ankiweb.net/t/anki-2-1-55-beta-3/24295/42
This commit is contained in:
Damien Elmes 2022-11-03 12:05:19 +10:00
parent 23ef52a297
commit c9a9f38ea9
5 changed files with 4 additions and 17 deletions

View file

@ -165,9 +165,8 @@ message DeckConfigsForUpdate {
DeckConfig defaults = 3; DeckConfig defaults = 3;
bool schema_modified = 4; bool schema_modified = 4;
bool v3_scheduler = 5; bool v3_scheduler = 5;
bool have_addons = 6;
// only applies to v3 scheduler // only applies to v3 scheduler
string card_state_customizer = 7; string card_state_customizer = 6;
} }
message UpdateDeckConfigsRequest { message UpdateDeckConfigsRequest {

View file

@ -26,7 +26,7 @@ import aqt.operations
from anki import hooks from anki import hooks
from anki._vendor import stringcase from anki._vendor import stringcase
from anki.collection import OpChanges from anki.collection import OpChanges
from anki.decks import DeckConfigsForUpdate, UpdateDeckConfigs from anki.decks import UpdateDeckConfigs
from anki.scheduler_pb2 import SchedulingStates from anki.scheduler_pb2 import SchedulingStates
from anki.utils import dev_mode from anki.utils import dev_mode
from aqt.changenotetype import ChangeNotetypeDialog from aqt.changenotetype import ChangeNotetypeDialog
@ -385,10 +385,7 @@ def congrats_info() -> bytes:
def get_deck_configs_for_update() -> bytes: def get_deck_configs_for_update() -> bytes:
config_bytes = aqt.mw.col._backend.get_deck_configs_for_update_raw(request.data) return aqt.mw.col._backend.get_deck_configs_for_update_raw(request.data)
configs = DeckConfigsForUpdate.FromString(config_bytes)
configs.have_addons = aqt.mw.addonManager.dirty
return configs.SerializeToString()
def update_deck_configs() -> bytes: def update_deck_configs() -> bytes:

View file

@ -46,7 +46,6 @@ impl Collection {
.get_collection_timestamps()? .get_collection_timestamps()?
.schema_changed_since_sync(), .schema_changed_since_sync(),
v3_scheduler: self.get_config_bool(BoolKey::Sched2021), v3_scheduler: self.get_config_bool(BoolKey::Sched2021),
have_addons: false,
card_state_customizer: self.get_config_string(StringKey::CardStateCustomizer), card_state_customizer: self.get_config_string(StringKey::CardStateCustomizer),
}) })
} }

View file

@ -12,14 +12,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
const auxData = state.currentAuxData; const auxData = state.currentAuxData;
</script> </script>
{#if $components.length || state.haveAddons} {#if $components.length}
<TitledContainer title="Add-ons"> <TitledContainer title="Add-ons">
<p>
If you're using an add-on that hasn't been updated to use this new screen
yet, you can access the old deck options screen by holding down the shift
key when opening the options.
</p>
{#each $components as addon} {#each $components as addon}
<svelte:component this={addon.component} bind:data={$auxData} {...addon} /> <svelte:component this={addon.component} bind:data={$auxData} {...addon} />
{/each} {/each}

View file

@ -39,7 +39,6 @@ export class DeckOptionsState {
readonly defaults: DeckConfig.DeckConfig.Config; readonly defaults: DeckConfig.DeckConfig.Config;
readonly addonComponents: Writable<DynamicSvelteComponent[]>; readonly addonComponents: Writable<DynamicSvelteComponent[]>;
readonly v3Scheduler: boolean; readonly v3Scheduler: boolean;
readonly haveAddons: boolean;
private targetDeckId: number; private targetDeckId: number;
private configs: ConfigWithCount[]; private configs: ConfigWithCount[];
@ -67,7 +66,6 @@ export class DeckOptionsState {
this.configs.findIndex((c) => c.config.id === this.currentDeck.configId), this.configs.findIndex((c) => c.config.id === this.currentDeck.configId),
); );
this.v3Scheduler = data.v3Scheduler; this.v3Scheduler = data.v3Scheduler;
this.haveAddons = data.haveAddons;
this.cardStateCustomizer = writable(data.cardStateCustomizer); this.cardStateCustomizer = writable(data.cardStateCustomizer);
this.deckLimits = writable(data.currentDeck?.limits ?? createLimits()); this.deckLimits = writable(data.currentDeck?.limits ?? createLimits());