Skip to content

Persist deck selection and checkbox states in sync UI#53

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/save-last-sync-settings
Draft

Persist deck selection and checkbox states in sync UI#53
Copilot wants to merge 3 commits intomainfrom
copilot/save-last-sync-settings

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 16, 2026

Users must re-select deck and checkbox settings each time they open the LingQ sync dialog.

Changes

Config persistence

  • Added lastDeck, lastImportKnowns, lastDowngradeLingqs fields to config.json
  • Implemented getter/setter methods in Config.py with proper type annotations

UI behavior

  • Dialog restores last deck selection (if deck exists) and checkbox states on open
  • Settings saved to config when user clicks Import or Sync

Testing

  • Added 6 tests covering new config methods (42 total tests passing)
# Config.py
def GetLastDeck(self) -> str:
    return self._GetConfig("lastDeck")

def GetLastImportKnowns(self) -> bool:
    value = self.config.get("lastImportKnowns", False)
    return bool(value)

# popUpWindow.py - Restore on dialog open
lastDeck = self.actionHandler.GetLastDeck()
if lastDeck:
    index = self.deckSelector.findText(lastDeck)
    if index >= 0:
        self.deckSelector.setCurrentIndex(index)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 16, 2026 17:16
Co-authored-by: thags <15159720+thags@users.noreply.github.com>
Co-authored-by: thags <15159720+thags@users.noreply.github.com>
Copilot AI changed the title [WIP] Add feature to save last sync settings for LingQ Persist deck selection and checkbox states in sync UI Feb 16, 2026
Copilot AI requested a review from thags February 16, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants