[apps/settings|code] Add a Flag to remove Code option in settings if code app is not compiled (#67)

This commit is contained in:
Mino1289
2021-10-28 22:20:00 +02:00
committed by GitHub
parent 58ef8cb95d
commit 473b0bbfcb
6 changed files with 14 additions and 3 deletions

View File

@@ -61,11 +61,14 @@ void CodeOptionsController::willDisplayCellForIndex(HighlightCell * cell, int in
GlobalPreferences::sharedGlobalPreferences()->font() == KDFont::LargeFont
? myTextCell->setSubtitle(I18n::Message::LargeFont)
: myTextCell->setSubtitle(I18n::Message::SmallFont);
} else if (thisLabel == I18n::Message::Autocomplete) {
}
#ifdef HAS_CODE
else if (thisLabel == I18n::Message::Autocomplete) {
MessageTableCellWithSwitch * mySwitchCell = (MessageTableCellWithSwitch *)cell;
SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView();
mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->autocomplete());
}
#endif
}
}