- // Update the bookmarks folder for the bookmarks drawer in `MainWebViewActivity`.
- MainWebViewActivity.currentBookmarksFolder = "";
-
- // Close the bookmarks drawer and reload the bookmarks `ListView` when returning to `MainWebViewActivity`.
- MainWebViewActivity.restartFromBookmarksActivity = true;
-
- // Return to `MainWebViewActivity`.
- NavUtils.navigateUpFromSameTask(this);
+ // Go home.
+ if ((bookmarksDeletedSnackbar != null) && bookmarksDeletedSnackbar.isShown()) { // Close the bookmarks delete snackbar before going home.
+ // Set the close flag.
+ closeActivityAfterDismissingSnackbar = true;
+
+ // Dismiss the snackbar.
+ bookmarksDeletedSnackbar.dismiss();
+ } else { // Go home immediately.
+ // Update the bookmarks folder for the bookmarks drawer in `MainWebViewActivity`.
+ MainWebViewActivity.currentBookmarksFolder = "";
+
+ // Close the bookmarks drawer and reload the bookmarks `ListView` when returning to `MainWebViewActivity`.
+ MainWebViewActivity.restartFromBookmarksActivity = true;
+
+ // Return to `MainWebViewActivity`.
+ NavUtils.navigateUpFromSameTask(this);
+ }