将NoteltemData.java中相同的实现方法getFolderId和getParentId进行统一

Signed-off-by: qianji <1535486312@qq.com>
a_branch
qianji 2 years ago
parent 8fb95b2d02
commit 5a63f3e5ab

@ -1,4 +1,4 @@
#Thu May 04 23:43:05 CST 2023
#Fri May 05 08:39:05 CST 2023
base.0=E\:\\Notes-master1\\app\\build\\intermediates\\dex\\debug\\mergeDexDebug\\classes.dex
renamed.0=classes.dex
path.0=classes.dex

@ -109,6 +109,7 @@ public class NoteItemData {
checkPostion(cursor);
}
//检查光标Cursor为光标类
private void checkPostion(Cursor cursor) {
mIsLastItem = cursor.isLast() ? true : false;
mIsFirstItem = cursor.isFirst() ? true : false;
@ -117,10 +118,10 @@ public class NoteItemData {
mIsOneNoteFollowingFolder = false;
if (mType == Notes.TYPE_NOTE && !mIsFirstItem) {
int position = cursor.getPosition();
if (cursor.moveToPrevious()) {
if (cursor.getInt(TYPE_COLUMN) == Notes.TYPE_FOLDER
|| cursor.getInt(TYPE_COLUMN) == Notes.TYPE_SYSTEM) {
int position = cursor.getPosition();//得到光标行数
if (cursor.moveToPrevious() //光标移动至前一行
&&(cursor.getInt(TYPE_COLUMN) == Notes.TYPE_FOLDER
|| cursor.getInt(TYPE_COLUMN) == Notes.TYPE_SYSTEM)) {
if (cursor.getCount() > (position + 1)) {
mIsMultiNotesFollowingFolder = true;
} else {
@ -130,7 +131,6 @@ public class NoteItemData {
if (!cursor.moveToNext()) {
throw new IllegalStateException("cursor move to previous but can't move back");
}
}
}
}
@ -190,10 +190,6 @@ public class NoteItemData {
return mNotesCount;
}
public long getFolderId () {
return mParentId;
}
public int getType() {
return mType;
}

Loading…
Cancel
Save