shelf change
This commit is contained in:
parent
eebe556071
commit
516432b28c
|
@ -181,17 +181,17 @@ public class CatalogFragment extends BasicFragment implements MarkActivity.Sortc
|
||||||
|
|
||||||
int maxSlept =NetUtil.isNetworkConnected()?250 :100;
|
int maxSlept =NetUtil.isNetworkConnected()?250 :100;
|
||||||
int slepttime = 0;
|
int slepttime = 0;
|
||||||
while ( slepttime < maxSlept && ( pageFactory.isReadingCatalogs() || pageFactory.getChapters().size() == 0)) {
|
while ( slepttime < maxSlept*50 && ( pageFactory.isReadingCatalogs() || pageFactory.getChapters().size() == 0)) {
|
||||||
try {
|
try {
|
||||||
Log.d(TAG, String .format("prepare book: to open book cate to sleep %s" , 50));
|
Log.d(TAG, String .format("prepare book: to open book cate to sleep %s,pageFactory.getChapters().size() %s " , 50,pageFactory.getChapters().size()));
|
||||||
sleep(50);
|
sleep(50);
|
||||||
slepttime++;
|
slepttime+=50;
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.d(TAG, String .format("prepare book:to open book cate slept %s" , slepttime*50));
|
Log.d(TAG, String .format("prepare book:to open book cate slept %s秒" , slepttime/1000));
|
||||||
/* if ( !pageFactory.isReadingCatalogs() && pageFactory.getChapters().size() == 0) {
|
/* if ( !pageFactory.isReadingCatalogs() && pageFactory.getChapters().size() == 0) {
|
||||||
|
|
||||||
handler.sendEmptyMessage(2);
|
handler.sendEmptyMessage(2);
|
||||||
|
|
|
@ -332,7 +332,7 @@ public void testUpdate(){
|
||||||
/* if(lastUpdateTime > nv.lastVisit && lastUpdateTime > nv.lastUpdateTime){
|
/* if(lastUpdateTime > nv.lastVisit && lastUpdateTime > nv.lastUpdateTime){
|
||||||
isUpdated =true;
|
isUpdated =true;
|
||||||
}*/
|
}*/
|
||||||
isUpdated = lastUpdateTime > nv.lastVisit && lastUpdateTime > nv.lastUpdateTime;
|
isUpdated = lastUpdateTime > nv.lastVisit || lastUpdateTime > nv.lastUpdateTime;
|
||||||
Log.d("Novel", String.format("book %s server lastUpdateTime %s, local lastupdatetime %s, local lastvist %s" +
|
Log.d("Novel", String.format("book %s server lastUpdateTime %s, local lastupdatetime %s, local lastvist %s" +
|
||||||
"is updated %s,diff1 %s,diff2 %s "
|
"is updated %s,diff1 %s,diff2 %s "
|
||||||
,name ,lastUpdateTime,nv.lastUpdateTime,nv.lastVisit,isUpdated,
|
,name ,lastUpdateTime,nv.lastUpdateTime,nv.lastVisit,isUpdated,
|
||||||
|
@ -340,9 +340,9 @@ public void testUpdate(){
|
||||||
lastUpdateTime - nv.lastUpdateTime
|
lastUpdateTime - nv.lastUpdateTime
|
||||||
|
|
||||||
) );
|
) );
|
||||||
isUpdated = isUpdated && !(!TextUtils.isEmpty(chapterName) && !TextUtils.isEmpty(nv.chapterName) && (chapterName.equals(nv.chapterName) || chapterName.equals(nv.lastReadChapt)));
|
// isUpdated = isUpdated && !(!TextUtils.isEmpty(chapterName) && !TextUtils.isEmpty(nv.chapterName) && (chapterName.equals(nv.chapterName) || chapterName.equals(nv.lastReadChapt)));
|
||||||
|
|
||||||
Log.d("Novel", String.format( " isupdated %s, server lastUpdateTime ,server chaptername %s,chaptername %s,lastreadchapt %s" ,isUpdated,chapterName,nv.chapterName,nv.lastReadChapt ) );
|
// Log.d("Novel", String.format( " isupdated %s, server lastUpdateTime ,server chaptername %s,chaptername %s,lastreadchapt %s" ,isUpdated,chapterName,nv.chapterName,nv.lastReadChapt ) );
|
||||||
|
|
||||||
if(!isUpdated){
|
if(!isUpdated){
|
||||||
setToDefault("isUpdated");
|
setToDefault("isUpdated");
|
||||||
|
|
|
@ -384,9 +384,10 @@ public class BookUtil {
|
||||||
readChaptersAsync();
|
readChaptersAsync();
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
mMuluStatus = MuluStatus.isDone;
|
||||||
handler.sendEmptyMessage(MSG_READCHAPTER_SUCCESS);
|
handler.sendEmptyMessage(MSG_READCHAPTER_SUCCESS);
|
||||||
Log.d(TAG,String.format("prepare book loadChapts----end download %s 目录, 目录数量 %s, cost %s", mNovel.getName() , mChapters.size(), new Date().getTime() -startTime ));
|
Log.d(TAG,String.format("prepare book loadChapts----end download %s 目录, 目录数量 %s, cost %s", mNovel.getName() , mChapters.size(), new Date().getTime() -startTime ));
|
||||||
mMuluStatus = MuluStatus.isDone;
|
|
||||||
Log.d(TAG, String.format("prepare book %s 章节信息完成.",mNovel.getName()) );
|
Log.d(TAG, String.format("prepare book %s 章节信息完成.",mNovel.getName()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -939,9 +939,10 @@ private void hideSysUI(){
|
||||||
// showStatusAd((int) adHeight, (int) adY);
|
// showStatusAd((int) adHeight, (int) adY);
|
||||||
// Log.d(TAG, "loadBannerAd: draw status, AD is requested, mStatus:" +mStatus);
|
// Log.d(TAG, "loadBannerAd: draw status, AD is requested, mStatus:" +mStatus);
|
||||||
}
|
}
|
||||||
|
Log.d(TAG, "drawStatus: mStatus is " +mStatus);
|
||||||
if (mStatus==Status.OPENING ) {
|
if (mStatus==Status.OPENING ) {
|
||||||
String url = mBookUtil.getChapter(getNovel().getLastReadChapt()).getChapterUrl();
|
String url = mBookUtil.getChapter(getNovel().getLastReadChapt()).getChapterUrl();
|
||||||
|
Log.d(TAG, "drawStatus: url is " +url);
|
||||||
if(!TextUtils.isEmpty(url)) {
|
if(!TextUtils.isEmpty(url)) {
|
||||||
if(url.length()>100)
|
if(url.length()>100)
|
||||||
url =url.substring(0,100);
|
url =url.substring(0,100);
|
||||||
|
|
Loading…
Reference in New Issue