Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
gedoor committed Jul 4, 2020
1 parent b1c579e commit 68de5cb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/kunfei/bookshelf/DbHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static SQLiteDatabase getDb() {
return getInstance().db;
}

public class DaoOpenHelper extends DaoMaster.OpenHelper {
public static class DaoOpenHelper extends DaoMaster.OpenHelper {
DaoOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
super(context, name, factory);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public void onPageFinished(WebView view, String url) {
});
}

private class Web {
private static class Web {
private String content;
private String js = "document.documentElement.outerHTML";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public BookKindBean(String kindS) {
for (String kind : kindS.split("[,|\n]")) {
if (StringUtils.isContainNumber(kind) && TextUtils.isEmpty(wordsS)) {
if (StringUtils.isNumeric(kind)) {
int words = Integer.valueOf(kind);
int words = Integer.parseInt(kind);
if (words > 0) {
wordsS = words + "字";
if (words > 10000) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public void setLastChapterName(String lastChapterName) {

public int getUnreadChapterNum() {
int num = getChapterListSize() - getDurChapter() - 1;
return num < 0 ? 0 : num;
return Math.max(num, 0);
}

public int getChapterListSize() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ protected synchronized void onLayout(boolean changed, int left, int top, int rig
}

if(mScroller.computeScrollOffset()){
int scrollx = mScroller.getCurrX();
mNextX = scrollx;
mNextX = mScroller.getCurrX();
}

if(mNextX <= 0){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ private ChapterContainer nextChapter() {

/*****************************************interface*****************************************/

class ChapterContainer {
static class ChapterContainer {
TxtChapter txtChapter;
}

Expand Down

0 comments on commit 68de5cb

Please sign in to comment.