| 136 | } |
| 137 | |
| 138 | void MainWindowViewer::applyLibraryReaderMode(YACReader::FileType type) |
| 139 | { |
| 140 | Configuration &config = Configuration::getConfiguration(); |
| 141 | bool manga = false; |
| 142 | bool continuousScroll = config.getContinuousScroll(); |
| 143 | |
| 144 | switch (type) { |
| 145 | case YACReader::FileType::Manga: |
| 146 | manga = true; |
| 147 | break; |
| 148 | case YACReader::FileType::WebComic: |
| 149 | continuousScroll = true; |
| 150 | break; |
| 151 | case YACReader::FileType::Comic: |
| 152 | case YACReader::FileType::WesternManga: |
| 153 | case YACReader::FileType::Yonkoma: |
| 154 | default: |
| 155 | break; |
| 156 | } |
| 157 | |
| 158 | viewer->setMangaWithoutStoringSetting(manga); |
| 159 | viewer->setContinuousScrollWithoutStoringSetting(continuousScroll); |
| 160 | syncModeActions(manga, continuousScroll); |
| 161 | } |
| 162 | |
| 163 | void MainWindowViewer::syncModeActions(bool manga, bool continuousScroll) |
| 164 | { |
nothing calls this directly
no test coverage detected