]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
fix crash when moving a bookmark to the home folder. https://redmine.stoutner.com...
authorSoren Stoutner <soren@stoutner.com>
Thu, 22 Jun 2023 19:10:49 +0000 (12:10 -0700)
committerSoren Stoutner <soren@stoutner.com>
Thu, 22 Jun 2023 19:10:49 +0000 (12:10 -0700)
app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt

index c6a26a6d5b69e73cb1b83ef4256b92b2f53d39ed..a3d2f09bf04de512e851ec14e083706e9c448b05 100644 (file)
@@ -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<Any>(0, getString(R.string.home_folder), homeFolderIconByteArray, HOME_FOLDER_ID))
+                    homeFolderMatrixCursor.addRow(arrayOf<Any>(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)