X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FMainWebViewActivity.java;h=c2d169b40b7ee0d0ebdad343e352b672d3d469ab;hb=c45c0fa64109c47bdc35328d0e31a65c685bdc22;hp=13d81cb9f5eb103e3e839de96804f2e408c4bb47;hpb=0b2da52fc661cf302cd94105620e54340d269f1d;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index 13d81cb9..c2d169b4 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -197,7 +197,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook public static String proxyMode = ProxyHelper.NONE; // Declare the public static variables. - public static String currentBookmarksFolder; + public static String currentBookmarksFolder = ""; public static boolean restartFromBookmarksActivity; public static WebViewPagerAdapter webViewPagerAdapter; @@ -535,9 +535,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Enable the drawing of the entire webpage. This makes it possible to save a website image. This must be done before anything else happens with the WebView. WebView.enableSlowWholeDocumentDraw(); - // Set the theme. - setTheme(R.style.PrivacyBrowser); - // Set the content view according to the position of the app bar. if (bottomAppBar) setContentView(R.layout.main_framelayout_bottom_appbar); else setContentView(R.layout.main_framelayout_top_appbar); @@ -624,9 +621,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Run the default commands. super.onNewIntent(intent); - // Replace the intent that started the app with this one. - setIntent(intent); - // Check to see if the app is being restarted from a saved state. if (savedStateArrayList == null || savedStateArrayList.size() == 0) { // The activity is not being restarted from a saved state. // Get the information from the intent. @@ -3385,12 +3379,10 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook drawerLayout.setDrawerTitle(GravityCompat.START, getString(R.string.navigation_drawer)); drawerLayout.setDrawerTitle(GravityCompat.END, getString(R.string.bookmarks)); - // Initialize `currentBookmarksFolder`. `""` is the home folder in the database. - currentBookmarksFolder = ""; - - // Load the home folder, which is `""` in the database. + // Load the bookmarks folder. loadBookmarksFolder(); + // Handle clicks on bookmarks. bookmarksListView.setOnItemClickListener((parent, view, position, id) -> { // Convert the id from long to int to match the format of the bookmarks database. int databaseId = (int) id;