Skip to content

Commit

Permalink
Fixed wrapping issue for layouts and book
Browse files Browse the repository at this point in the history
collections

Issue #676
  • Loading branch information
Christopher-Shiu committed Nov 10, 2024
1 parent 12b03b5 commit 88dbfde
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions convert/convertConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1125,14 +1125,27 @@ function filterFeaturesNotReady(data: ScriptureConfig | DictionaryConfig) {
data.mainFeatures['user-accounts'] = false;

// Two pane and Verse-By-Verse are not done
if (data.layouts) {
for (const layout of data.layouts) {
if (layout.mode === 'two' || layout.mode === 'verse-by-verse') {
layout.enabled = false;
if (isScriptureConfig(data)) {
// Two pane and Verse-By-Verse are not done
if (data.layouts) {
for (const layout of data.layouts) {
if (layout.mode === 'two' || layout.mode === 'verse-by-verse') {
layout.enabled = false;
}
}

}
if (data.bookCollections) {
// only allow single pane book collections
// in SAB 12.1, the feature changed names from bc-allow-single-pane to bc-layout-allow-single-pane
data.bookCollections = data.bookCollections.filter((collection) => {
const allowSinglePane =
collection?.features['bc-allow-single-pane'] ??
collection?.features['bc-layout-allow-single-pane'];
return allowSinglePane !== false;
});
}
}

// Verse on image is not done
data.mainFeatures['text-on-image'] = false;

Expand All @@ -1148,17 +1161,6 @@ function filterFeaturesNotReady(data: ScriptureConfig | DictionaryConfig) {
data.mainFeatures['settings-daily-reminder-time'] = false;
data.mainFeatures['settings-keep-screen-on'] = false;
data.mainFeatures['settings-share-usage-data'] = false;

if (data.bookCollections) {
// only allow single pane book collections
// in SAB 12.1, the feature changed names from bc-allow-single-pane to bc-layout-allow-single-pane
data.bookCollections = data.bookCollections.filter((collection) => {
const allowSinglePane =
collection?.features['bc-allow-single-pane'] ??
collection?.features['bc-layout-allow-single-pane'];
return allowSinglePane !== false;
});
}
return data;
}

Expand Down

0 comments on commit 88dbfde

Please sign in to comment.