Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public enum Type {
private @NonNull String mTitle;
private @NonNull String mURL;
private @NonNull String mGuid;
private int mPosition;
private Type mType;
private boolean mHasChildren;

Expand All @@ -32,9 +31,6 @@ public Bookmark(@NonNull BookmarkNode node, int level, boolean isExpanded) {
mTitle = node.getTitle() != null ? node.getTitle() : "";
mURL = node.getUrl() != null ? node.getUrl() : "";
mGuid = node.getGuid() != null ? node.getGuid() : "";
// TODO: We shall get the position using `node.getPosition();` instead of 0.
// However, position is now kotlin.UInt which is not supported by Java.
mPosition = 0;
mHasChildren = node.getChildren() != null;

switch (node.getType()) {
Expand Down Expand Up @@ -78,11 +74,6 @@ public void setLevel(int level) {
mLevel = level;
}

// TODO: This method is broken because upstream now uses kotlin.UInt for mPosition.
public int getPosition() {
return mPosition;
}

public boolean hasChildren() {
return mHasChildren;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,6 @@ public int getItemCount() {
return mDisplayList == null ? 0 : mDisplayList.size();
}

@Override
// TODO: This method is broken because `bookmark.getPosition()` is broken.
public long getItemId(int position) {
Bookmark bookmark = mDisplayList.get(position);
return bookmark.getPosition();
}

static class BookmarkViewHolder extends RecyclerView.ViewHolder {

final BookmarkItemBinding binding;
Expand Down
Loading