From: Soren Stoutner Date: Thu, 22 Jun 2023 19:10:49 +0000 (-0700) Subject: fix crash when moving a bookmark to the home folder. https://redmine.stoutner.com... X-Git-Tag: v3.15.1~2 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=b23ac211c2edb57804cbf10e8027358b6795e4dc;p=PrivacyBrowserAndroid.git fix crash when moving a bookmark to the home folder. https://redmine.stoutner.com/issues/1028 --- 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)