Skip to content

Commit

Permalink
fixed pmd bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahavir Jain committed Dec 7, 2016
1 parent 616f6a7 commit 6d336ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import com.folioreader.smil.SmilFile;
import com.folioreader.smil.TextElement;
import com.folioreader.util.AppUtil;
import com.folioreader.util.EpubManipulator;
import com.folioreader.util.ProgressDialog;
import com.folioreader.view.AudioView;
import com.folioreader.view.ConfigView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ public class ContentsFragment extends Fragment {
private int mSelectedChapterPosition;
private boolean mIsNightMode;



public static ContentsFragment newInstance(Book book,int selectedChapterPosition) {
public static ContentsFragment newInstance(Book book, int selectedChapterPosition) {
ContentsFragment contentsFragment = new ContentsFragment();
Bundle args = new Bundle();
args.putSerializable(BOOK, book);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public void endSelection() {

//String opfPath = AppUtil.getPathOPF(AppUtil.getFolioEpubFolderPath(mEpubFileName), mContext);
//String baseUrl = "file://" + AppUtil.getFolioEpubFolderPath(mEpubFileName) + "/" + opfPath + "//";
String baseUrl = "file://" + pageHref.substring(0, pageHref.lastIndexOf("/")) + "//";
String baseUrl = "file://" + pageHref.substring(0, pageHref.lastIndexOf('/')) + "//";
mWebview.loadDataWithBaseURL(baseUrl, htmlContent, "text/html", "UTF-8", null);
((FolioActivity) getActivity()).setLastWebViewPosition(mScrollY);
}
Expand Down Expand Up @@ -477,7 +477,7 @@ public void reload() {
//String baseUrl = "file://" + AppUtil.getFolioEpubFolderPath(mEpubFileName) + "/" + opfPath + "//";
String baseUrl = "file://" + epubFilePath + "/" + opfPath + "//";*/

String baseUrl = "file://" + pageHref.substring(0, pageHref.lastIndexOf("/")) + "//";
String baseUrl = "file://" + pageHref.substring(0, pageHref.lastIndexOf('/')) + "//";
webView.loadDataWithBaseURL(baseUrl, htmlContent, "text/html", "UTF-8", null);
updatePagesLeftTextBg();
}
Expand Down

0 comments on commit 6d336ae

Please sign in to comment.