// Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html use crate::{ backend_proto as pb, config::{BoolKey, StringKey}, }; use pb::config::bool::Key as BoolKeyProto; use pb::config::string::Key as StringKeyProto; impl From for BoolKey { fn from(k: BoolKeyProto) -> Self { match k { BoolKeyProto::BrowserSortBackwards => BoolKey::BrowserSortBackwards, BoolKeyProto::PreviewBothSides => BoolKey::PreviewBothSides, BoolKeyProto::CollapseTags => BoolKey::CollapseTags, BoolKeyProto::CollapseNotetypes => BoolKey::CollapseNotetypes, BoolKeyProto::CollapseDecks => BoolKey::CollapseDecks, BoolKeyProto::CollapseSavedSearches => BoolKey::CollapseSavedSearches, BoolKeyProto::CollapseToday => BoolKey::CollapseToday, BoolKeyProto::CollapseCardState => BoolKey::CollapseCardState, BoolKeyProto::CollapseFlags => BoolKey::CollapseFlags, BoolKeyProto::Sched2021 => BoolKey::Sched2021, BoolKeyProto::AddingDefaultsToCurrentDeck => BoolKey::AddingDefaultsToCurrentDeck, } } } impl From for StringKey { fn from(k: StringKeyProto) -> Self { match k { StringKeyProto::SetDueBrowser => StringKey::SetDueBrowser, StringKeyProto::SetDueReviewer => StringKey::SetDueReviewer, } } }