]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksActivity.java
Use a spinner to select folders in the bookmarks database view. https://redmine...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / activities / BookmarksActivity.java
index 42b1c0e1f0b06447c5334f251771c4b00f98cb6d..e640b792291e208736931a21637a5a4ea51639cc 100644 (file)
@@ -116,8 +116,12 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma
         // Get the intent that launched the activity.
         Intent launchingIntent = getIntent();
 
-        // Get the current folder from the `Intent`.
-        currentFolder = launchingIntent.getStringExtra("Current Folder");
+        // 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 = "";
+        }
 
         // Set the content view.
         setContentView(R.layout.bookmarks_coordinatorlayout);