]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksActivity.kt
Split the blocklist helper. https://redmine.stoutner.com/issues/953
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / activities / BookmarksActivity.kt
index 43350b1111f5d9d2c19c6bc8faee844566da2773..2353627eae2283fd7abcee67e7b4268746a899ff 100644 (file)
@@ -127,16 +127,6 @@ class BookmarksActivity : AppCompatActivity(), CreateBookmarkListener, CreateBoo
         val currentUrl = launchingIntent.getStringExtra(CURRENT_URL)!!
         currentFavoriteIconByteArray = launchingIntent.getByteArrayExtra(CURRENT_FAVORITE_ICON_BYTE_ARRAY)!!
 
-        /*  TODO.  Test if not needed.
-        // Set the current folder variable.
-        if (launchingIntent.getStringExtra(CURRENT_FOLDER) != null) {  // Set the current folder from the intent.
-            currentFolder = launchingIntent.getStringExtra(CURRENT_FOLDER)
-        } else {  // Set the current folder to be `""`, which is the home folder.
-            currentFolder = ""
-        }
-
-         */
-
         // Convert the favorite icon byte array to a bitmap.
         val currentFavoriteIconBitmap = BitmapFactory.decodeByteArray(currentFavoriteIconByteArray, 0, currentFavoriteIconByteArray.size)
 
@@ -680,7 +670,7 @@ class BookmarksActivity : AppCompatActivity(), CreateBookmarkListener, CreateBoo
         return true
     }
 
-    override fun onCreateBookmark(dialogFragment: DialogFragment, favoriteIconBitmap: Bitmap) {
+    override fun createBookmark(dialogFragment: DialogFragment, favoriteIconBitmap: Bitmap) {
         // Get the alert dialog from the fragment.
         val dialog = dialogFragment.dialog!!
 
@@ -717,7 +707,7 @@ class BookmarksActivity : AppCompatActivity(), CreateBookmarkListener, CreateBoo
         bookmarksListView.setSelection(newBookmarkDisplayOrder)
     }
 
-    override fun onCreateBookmarkFolder(dialogFragment: DialogFragment, favoriteIconBitmap: Bitmap) {
+    override fun createBookmarkFolder(dialogFragment: DialogFragment, favoriteIconBitmap: Bitmap) {
         // Get the dialog from the dialog fragment.
         val dialog = dialogFragment.dialog!!
 
@@ -829,7 +819,7 @@ class BookmarksActivity : AppCompatActivity(), CreateBookmarkListener, CreateBoo
         if (currentFolderIconRadioButton.isChecked) {  // Only the name has changed.
             // Update the name in the database.
             bookmarksDatabaseHelper.updateFolder(selectedFolderDatabaseId, oldFolderNameString, newFolderNameString)
-        } else {  // The icon has changed.  TODO:  Test.
+        } else {  // The icon has changed.
             // Populate the new folder icon bitmap.
             val folderIconBitmap: Bitmap = if (defaultFolderIconRadioButton.isChecked) {
                 // Get the default folder icon drawable.