From b23ac211c2edb57804cbf10e8027358b6795e4dc Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Thu, 22 Jun 2023 12:10:49 -0700 Subject: [PATCH] fix crash when moving a bookmark to the home folder. https://redmine.stoutner.com/issues/1028 --- .../com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt index c6a26a6d..a3d2f09b 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt @@ -45,6 +45,7 @@ import androidx.fragment.app.DialogFragment import androidx.preference.PreferenceManager import com.stoutner.privacybrowser.R +import com.stoutner.privacybrowser.activities.HOME_FOLDER_DATABASE_ID import com.stoutner.privacybrowser.activities.HOME_FOLDER_ID import com.stoutner.privacybrowser.helpers.BOOKMARK_NAME import com.stoutner.privacybrowser.helpers.FAVORITE_ICON @@ -218,7 +219,7 @@ class MoveToFolderDialog : DialogFragment() { val homeFolderMatrixCursor = MatrixCursor(homeFolderMatrixCursorColumnNames) // Add the home folder to the home folder matrix cursor. - homeFolderMatrixCursor.addRow(arrayOf(0, getString(R.string.home_folder), homeFolderIconByteArray, HOME_FOLDER_ID)) + homeFolderMatrixCursor.addRow(arrayOf(HOME_FOLDER_DATABASE_ID, getString(R.string.home_folder), homeFolderIconByteArray, HOME_FOLDER_ID)) // Add the current folder to the list of folders not to display. folderIdsNotToDisplay.add(currentFolderId) -- 2.45.2