Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新 #20

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f612d52
修复内置书旗 书架更新失败 换源改为只加载启用的书源
FoxNick May 19, 2019
d7326a7
修复内置书旗 书架更新失败 换源改为只加载启用的书源
FoxNick May 19, 2019
98b8964
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick May 19, 2019
23e0dde
Merge branch 'master' of https://github.com/FoxNick/MyBookshelf-master
FoxNick May 19, 2019
a6dbc49
y
FoxNick May 20, 2019
34e54d4
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick May 20, 2019
bfa0afc
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick May 20, 2019
11991bc
修改
FoxNick May 21, 2019
14eb5a2
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick May 21, 2019
fd12a8b
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick May 26, 2019
5d8b023
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick May 27, 2019
0bf1c95
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick Jun 9, 2019
91899f7
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick Jun 9, 2019
d36be4c
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick Jun 11, 2019
d431fd4
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick Jun 16, 2019
963cf26
优化新增章节与已阅读章节显示
FoxNick Jun 19, 2019
e2a580c
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick Jun 28, 2019
8fbe0c4
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick Jun 28, 2019
23f176e
优化
FoxNick Jul 7, 2019
a94469b
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick Jul 7, 2019
37fac57
Merge branch 'master' of https://github.com/Invinciblelee/MyBookshelf…
FoxNick Jul 7, 2019
c8e7447
删除My716内置源
FoxNick Jul 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ android {
}

defaultConfig {
applicationId "com.gedoor.monkeybook.super"
applicationId "com.nick.monkeybook.super"
minSdkVersion min_sdk_version
targetSdkVersion target_sdk_version
versionCode currentVersionCode
Expand Down Expand Up @@ -113,6 +113,11 @@ configurations.all {
}
}
}
repositories {
flatDir {
dirs 'libs'
}
}

dependencies {
implementation project(':basemvplib')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,4 +531,10 @@ public String getVariable(String key) {
}
return variableStore.getVariable(key);
}


public int getUnreadChapterNum() {
int num = getChapterListSize() - getDurChapter() - 1;
return num < 0 ? 0 : num;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void setNoteUrl(String noteUrl) {

public String getRealNoteUrl() {
if (!StringUtils.isBlank(noteUrl)
&& noteUrl.startsWith("@716:")) {
&& noteUrl.startsWith("@SQi:")) {
return noteUrl.substring(5);
}
return noteUrl;
Expand Down
16 changes: 3 additions & 13 deletions app/src/main/java/com/monke/monkeybook/model/SearchBookModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.monke.monkeybook.bean.SearchEngine;
import com.monke.monkeybook.help.AppConfigHelper;
import com.monke.monkeybook.model.annotation.BookType;
import com.monke.monkeybook.model.content.Default716;
import com.monke.monkeybook.model.content.DefaultShuqi;
import com.monke.monkeybook.model.impl.ISearchTask;
import com.monke.monkeybook.model.task.SearchTaskImpl;
Expand All @@ -36,7 +35,6 @@ public class SearchBookModel implements ISearchTask.OnSearchingListener {
private String group;
private SearchListener searchListener;
private boolean searchEngineChanged = false;
private boolean useMy716;
private boolean useShuqi;
private final List<SearchEngine> searchEngineS = new ArrayList<>();
private final List<ISearchTask> searchTasks = new ArrayList<>();
Expand Down Expand Up @@ -91,14 +89,10 @@ public SearchBookModel(Context context) {
/**
* 搜索引擎初始化
*/
private void initSearchEngineS() {
public void initSearchEngineS() {
if (!searchEngineS.isEmpty()) {
searchEngineS.clear();
}

if (useMy716) {
searchEngineS.add(new SearchEngine(Default716.TAG));
}
if (useShuqi) {
searchEngineS.add(new SearchEngine(DefaultShuqi.TAG));
}
Expand All @@ -108,7 +102,7 @@ private void initSearchEngineS() {
if (searchBookType != null && !TextUtils.equals(bookSourceBean.getBookSourceType(), searchBookType)) {
continue;
}
searchEngineS.add(new SearchEngine(bookSourceBean.getBookSourceUrl()));
searchEngineS.add(new SearchEngine(bookSourceBean.getBookSourceUrl()));
}
}
searchEngineChanged = false;
Expand All @@ -123,6 +117,7 @@ public void startSearch(String query) {

if (searchEngineChanged || searchEngineS.isEmpty()) {
initSearchEngineS();
//searchHandler.obtainMessage(SearchHandler.MSG_EMPTY).sendToTarget();
} else {
for (SearchEngine searchEngine : searchEngineS) {
searchEngine.searchReset();
Expand Down Expand Up @@ -192,11 +187,6 @@ public SearchBookModel listener(SearchListener listener) {
return this;
}

public SearchBookModel useMy716(boolean useMy716) {
this.useMy716 = useMy716;
return this;
}

public SearchBookModel useShuqi(boolean useShuqi) {
this.useShuqi = useShuqi;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.monke.monkeybook.bean.SearchBookBean;
import com.monke.monkeybook.help.BookshelfHelp;
import com.monke.monkeybook.help.ChapterContentHelp;
import com.monke.monkeybook.model.content.Default716;
import com.monke.monkeybook.model.content.DefaultModel;
import com.monke.monkeybook.model.content.DefaultShuqi;
import com.monke.monkeybook.model.impl.IAudioBookChapterModel;
Expand All @@ -22,7 +21,6 @@
import java.util.Objects;

import io.reactivex.Observable;
import io.reactivex.schedulers.Schedulers;

public class WebBookModel implements IWebBookModel {

Expand Down Expand Up @@ -132,8 +130,6 @@ public Observable<List<SearchBookBean>> findBook(String tag, String url, int pag
private IStationBookModel getBookSourceModel(String tag) {
if (BookShelfBean.LOCAL_TAG.equals(tag)) {
return null;
} else if (TextUtils.equals(tag, Default716.TAG)) {
return Default716.getInstance();
} else if (TextUtils.equals(tag, DefaultShuqi.TAG)) {
return DefaultShuqi.getInstance();
} else {
Expand Down
260 changes: 0 additions & 260 deletions app/src/main/java/com/monke/monkeybook/model/content/Default716.java

This file was deleted.

Loading