Feature/handle disabled download ahead limit by default (#475)
* Add a description to the dialog * Set the default limit to the lowest possible value
This commit is contained in:
@@ -14,9 +14,9 @@ import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||
import { NumberSetting } from '@/components/settings/NumberSetting.tsx';
|
||||
import { getPersistedServerSetting, usePersistedValue } from '@/util/usePersistedValue.tsx';
|
||||
|
||||
const DEFAULT_LIMIT = 5;
|
||||
const MIN_LIMIT = 2;
|
||||
const MAX_LIMIT = 10;
|
||||
const DEFAULT_LIMIT = MIN_LIMIT;
|
||||
|
||||
export const DownloadAheadSetting = () => {
|
||||
const { t } = useTranslation();
|
||||
@@ -75,6 +75,8 @@ export const DownloadAheadSetting = () => {
|
||||
defaultValue={DEFAULT_LIMIT}
|
||||
showSlider
|
||||
dialogTitle={t('download.settings.download_ahead.label.unread_chapters_to_download')}
|
||||
dialogDescription={t('download.settings.download_ahead.label.description')}
|
||||
dialogDisclaimer={t('download.settings.download_ahead.label.disclaimer')}
|
||||
valueUnit={t('chapter.title')}
|
||||
handleUpdate={updateSetting}
|
||||
disabled={!shouldDownloadAhead}
|
||||
|
||||
Reference in New Issue
Block a user