@ -147,13 +147,32 @@ public class LightningView {
@@ -147,13 +147,32 @@ public class LightningView {
if ( mWebView = = null ) {
return ;
}
if ( mHomepage . startsWith ( "about:home" ) ) {
mWebView . loadUrl ( StartPage . getHomepage ( mActivity ) , mRequestHeaders ) ;
} else if ( mHomepage . startsWith ( "about:bookmarks" ) ) {
switch ( mHomepage ) {
case "about:home" :
loadStartpage ( ) ;
break ;
case "about:bookmarks" :
loadBookmarkpage ( ) ;
} else {
break ;
default :
mWebView . loadUrl ( mHomepage , mRequestHeaders ) ;
break ;
}
}
private void loadStartpage ( ) {
BrowserApp . getIOThread ( ) . execute ( new Runnable ( ) {
@Override
public void run ( ) {
final String homepage = StartPage . getHomepage ( mActivity ) ;
mActivity . runOnUiThread ( new Runnable ( ) {
@Override
public void run ( ) {
mWebView . loadUrl ( homepage , mRequestHeaders ) ;
}
} ) ;
}
} ) ;
}
/ * *
@ -162,6 +181,9 @@ public class LightningView {
@@ -162,6 +181,9 @@ public class LightningView {
public void loadBookmarkpage ( ) {
if ( mWebView = = null )
return ;
BrowserApp . getIOThread ( ) . execute ( new Runnable ( ) {
@Override
public void run ( ) {
Bitmap folderIcon = ThemeUtils . getThemedBitmap ( mActivity , R . drawable . ic_folder , false ) ;
FileOutputStream outputStream = null ;
File image = new File ( mActivity . getCacheDir ( ) , "folder.png" ) ;
@ -174,11 +196,17 @@ public class LightningView {
@@ -174,11 +196,17 @@ public class LightningView {
} finally {
Utils . close ( outputStream ) ;
}
File bookmarkWebPage = new File ( mActivity . getFilesDir ( ) , BookmarkPage . FILENAME ) ;
final File bookmarkWebPage = new File ( mActivity . getFilesDir ( ) , BookmarkPage . FILENAME ) ;
BrowserApp . getBookmarkPage ( ) . buildBookmarkPage ( null ) ;
mActivity . runOnUiThread ( new Runnable ( ) {
@Override
public void run ( ) {
mWebView . loadUrl ( Constants . FILE + bookmarkWebPage , mRequestHeaders ) ;
}
} ) ;
}
} ) ;
}
/ * *