CLEAN: cleaned up some code formatting, extended the splash screen delay

This commit is contained in:
jason.wall 2017-01-18 11:54:59 -05:00
parent 7ce775059f
commit ded7e1980d
3 changed files with 10 additions and 20 deletions

View File

@ -37,3 +37,4 @@ DynamicBibleIonic/platforms/android/android.json
DynamicBibleIonic/platforms/android/AndroidManifest.xml DynamicBibleIonic/platforms/android/AndroidManifest.xml
DynamicBibleIonic/platforms/android/.gitignore DynamicBibleIonic/platforms/android/.gitignore
DynamicBibleIonic/.idea DynamicBibleIonic/.idea
DynamicBibleIonic/nbproject

View File

@ -44,7 +44,7 @@
<preference name="SplashMaintainAspectRatio" value="true"/> <preference name="SplashMaintainAspectRatio" value="true"/>
<preference name="FadeSplashScreenDuration" value="300"/> <preference name="FadeSplashScreenDuration" value="300"/>
<preference name="SplashScreen" value="screen"/> <preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="3000"/> <preference name="SplashScreenDelay" value="12000"/>
<preference name="ShowSplashScreen" value="true"/> <preference name="ShowSplashScreen" value="true"/>
<preference name="AutoHideSplashScreen" value="true"/> <preference name="AutoHideSplashScreen" value="true"/>
<preference name="SplashShowOnlyFirstTime" value="false"/> <preference name="SplashShowOnlyFirstTime" value="false"/>

View File

@ -1,4 +1,4 @@
/// <reference path="../typings/browser/ambient/jquery/index.d.ts" /> /// <reference path="../typings/browser/ambient/jquery/index.d.ts" />
/// <reference path="types.ts" /> /// <reference path="types.ts" />
import { Injectable } from "@angular/core"; import { Injectable } from "@angular/core";
import { Http } from "@angular/http"; import { Http } from "@angular/http";
@ -63,34 +63,24 @@ export class BibleService
// figure out the start verse. // figure out the start verse.
if (j === 0) if (j === 0)
{
start = parseInt(section.start.verse); start = parseInt(section.start.verse);
} else else
{
start = 1; start = 1;
}
// figure out the end verse // figure out the end verse
if ((j + 1) === this.chapters.length) if ((j + 1) === this.chapters.length)
{
end = section.end.verse; end = section.end.verse;
} else else
{
end = "*"; end = "*";
}
// get the verses requested. // get the verses requested.
const tvs = this.chapters[j].vss.length; const tvs = this.chapters[j].vss.length;
if (end == "*" || parseInt(end) > tvs) if (end == "*" || parseInt(end) > tvs)
{
end = tvs; end = tvs;
}
// we're using c based indexes here, so the index is 1 less than the verse #.
for (let i = start; i <= end; i++) for (let i = start; i <= end; i++)
{
// we're using c based indexes here, so the index is 1 less than the verse #.
vss.push(this.chapters[j].vss[i - 1]); vss.push(this.chapters[j].vss[i - 1]);
}
this.result.cs.push({ this.result.cs.push({
"ch": this.chapters[j].ch, "ch": this.chapters[j].ch,
@ -99,14 +89,13 @@ export class BibleService
} }
if (section.start.book >= 40) if (section.start.book >= 40)
{
this.result.testament = "new"; this.result.testament = "new";
} else else
{
this.result.testament = "old"; this.result.testament = "old";
}
return this.result; return this.result;
} catch (error) }
catch (error)
{ {
console.log(error); console.log(error);
} }