Skip to content

Commit

Permalink
Merge pull request #600 from NYPL-Simplified/reader-bug-jira#390
Browse files Browse the repository at this point in the history
Update shared prefs database to correct an unintentional change.
  • Loading branch information
gioneill authored Jun 18, 2018
2 parents d25d12f + 7bc47ea commit 401d9ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,23 +472,22 @@ else if (id == 1) {
}

@Override public void onCurrentPageReceived(
final ReaderBookLocation l)
final ReaderBookLocation loc)
{
ReaderActivity.LOG.debug("received book location: {}", l);
Objects.requireNonNull(loc);
ReaderActivity.LOG.debug("received book location: {}", loc);

this.current_location = l;
Objects.requireNonNull(this.current_location);
this.current_location = loc;

lazyInitSyncManagement();

final SimplifiedReaderAppServicesType rs = Simplified.getReaderAppServices();
final ReaderBookmarksSharedPrefsType bm = rs.getBookmarks();
final BookID in_book_id = Objects.requireNonNull(this.book_id);

bm.saveReadingPosition(in_book_id, this.current_location);
uploadReadingPosition(this.current_location);

checkExistingBookmarksAndUpdateUI(this.current_location);
bm.saveReadingPosition(in_book_id, loc);
uploadReadingPosition(loc);
checkExistingBookmarksAndUpdateUI(loc);
}

@Override protected void onPause()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private ReaderBookmarksSharedPrefs(
{
NullCheck.notNull(cc);
this.bookmarksSharedPrefs =
NullCheck.notNull(cc.getSharedPreferences("reader-bookmarksSharedPrefs", 0));
NullCheck.notNull(cc.getSharedPreferences("reader-bookmarks", 0));
}

/**
Expand Down

0 comments on commit 401d9ee

Please sign in to comment.