Skip to content

Commit

Permalink
safetify
Browse files Browse the repository at this point in the history
  • Loading branch information
quaap committed Jul 4, 2018
1 parent 58000b6 commit 118daa4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/src/main/java/com/quaap/bookymcbookface/ReaderActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -358,16 +358,16 @@ protected Void doInBackground(Void... voids) {
ract.book.load(file);
}

} catch (IOException e) {
e.printStackTrace();
} catch (Exception e) {
Log.e(TAG, e.getMessage(), e);
}
return null;
}

@Override
protected void onPostExecute(Void aVoid) {
ReaderActivity ract = ractref.get();
if (ract!=null) {
if (ract!=null && ract.book!=null) {
int fontsize = ract.book.getFontsize();
if (fontsize != -1) {
ract.setFontSize(fontsize);
Expand All @@ -388,8 +388,10 @@ private void showUri(Uri uri) {
}

private void handleLink(String clickedLink) {
Log.d("Main", "clicked on " + clickedLink);
showUri(book.handleClickedLink(clickedLink));
if (clickedLink!=null) {
Log.d("Main", "clicked on " + clickedLink);
showUri(book.handleClickedLink(clickedLink));
}

}

Expand Down

0 comments on commit 118daa4

Please sign in to comment.