mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
bookmarks refactoring
This commit is contained in:
parent
41eb07e7bf
commit
9d765548c4
3 changed files with 25 additions and 19 deletions
|
@ -211,24 +211,12 @@ public class BookmarksActivity extends TabActivity implements MenuItem.OnMenuIte
|
|||
|
||||
private void addBookmark() {
|
||||
final FBReaderApp fbreader = (FBReaderApp)FBReaderApp.Instance();
|
||||
final ZLTextView textView = fbreader.getTextView();
|
||||
final ZLTextWordCursor cursor = textView.getStartCursor();
|
||||
|
||||
if (cursor.isNull()) {
|
||||
// TODO: implement
|
||||
return;
|
||||
final Bookmark bookmark = fbreader.addBookmark(20, true);
|
||||
if (bookmark != null) {
|
||||
myThisBookBookmarks.add(0, bookmark);
|
||||
AllBooksBookmarks.add(0, bookmark);
|
||||
invalidateAllViews();
|
||||
}
|
||||
|
||||
// TODO: text edit dialog
|
||||
final Bookmark bookmark = new Bookmark(
|
||||
fbreader.Model.Book,
|
||||
textView.getModel().getId(),
|
||||
cursor,
|
||||
true
|
||||
);
|
||||
myThisBookBookmarks.add(0, bookmark);
|
||||
AllBooksBookmarks.add(0, bookmark);
|
||||
invalidateAllViews();
|
||||
}
|
||||
|
||||
private void gotoBookmark(Bookmark bookmark) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue