Skip to content

Commit

Permalink
Merge pull request #5 from BibleGet-I-O/development
Browse files Browse the repository at this point in the history
Code refactoring: consistency in variable namings
  • Loading branch information
JohnRDOrazio committed Feb 14, 2021
2 parents 53f2a41 + 6ef8f63 commit 93d49e6
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 62 deletions.
26 changes: 24 additions & 2 deletions Code.gs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @OnlyCurrentDoc
*/

const VERSION = 46;
const VERSION = 47;
const ADDONSTATE = {
PRODUCTION: "production",
DEVELOPMENT: "development"
Expand Down Expand Up @@ -227,6 +227,7 @@ function openSettings(){
.setWidth(SETTINGSWINDOW.WIDTH)
.setHeight(SETTINGSWINDOW.HEIGHT)
.setSandboxMode(HtmlService.SandboxMode.IFRAME);
//MailApp.sendEmail("priest@johnromanodorazio.com", "Apps Script Debug", evaluated.getContent());
DocumentApp.getUi().showModalDialog(evaluated, __('Settings',locale));

}
Expand Down Expand Up @@ -342,7 +343,28 @@ function setDefaultUserProperties(){
if(propsService !== null){
let usrProperties = propsService.getProperties();
//Check if there are old properties that we no longer need, if so clean up to avoid trouble
if(usrProperties.hasOwnProperty('RientroSinistro') || usrProperties.hasOwnProperty('BOOKCHAPTERALIGNMENT') || usrProperties.hasOwnProperty('VerseNumberAlignment') || usrProperties.hasOwnProperty('VerseTextAlignment') || usrProperties.hasOwnProperty('Interlinea') ){
if(usrProperties.hasOwnProperty('RientroSinistro')
|| usrProperties.hasOwnProperty('BookChapterAlignment')
|| usrProperties.hasOwnProperty('VerseNumberAlignment')
|| usrProperties.hasOwnProperty('VerseTextAlignment')
|| usrProperties.hasOwnProperty('Interlinea')
|| usrProperties.hasOwnProperty('ShowVerseNumbers')
|| usrProperties.hasOwnProperty('NoVersionFormatting')
|| usrProperties.hasOwnProperty('Lineheight')
|| usrProperties.hasOwnProperty('LeftIndent')
|| usrProperties.hasOwnProperty('RightIndent')
|| usrProperties.hasOwnProperty('ShowBibleVersion')
|| usrProperties.hasOwnProperty('BibleVersionPosition')
|| usrProperties.hasOwnProperty('BibleVersionWrap')
|| usrProperties.hasOwnProperty('BookChapterPosition')
|| usrProperties.hasOwnProperty('BookChapterWrap')
|| usrProperties.hasOwnProperty('BookChapterFormat')
|| usrProperties.hasOwnProperty('ParagraphAlign')
|| usrProperties.hasOwnProperty('BibleVersionAlignment')
|| usrProperties.hasOwnProperty('BookChapterAlignment')
|| usrProperties.hasOwnProperty('InterfaceInCM')
|| usrProperties.hasOwnProperty('BookChapterFullQuery')
){
propsService.deleteAllProperties();
}

Expand Down
Loading

0 comments on commit 93d49e6

Please sign in to comment.