Skip to content

Commit

Permalink
Show alert before execute favorite
Browse files Browse the repository at this point in the history
  • Loading branch information
levinli303 committed Jul 5, 2020
1 parent 3e0d776 commit cf32a92
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,11 @@ class MainActivity : AppCompatActivity(R.layout.activity_main),
override fun onFavoriteItemSelected(item: FavoriteBaseItem) {
if (item.isLeaf) {
if (item is FavoriteScriptItem) {
core.runScript(item.script.filename)
scriptOrURLPath = item.script.filename
runScriptOrOpenURLIfNeeded()
} else if (item is FavoriteBookmarkItem) {
core.goToURL(item.bookmark.url)
scriptOrURLPath = item.bookmark.url
runScriptOrOpenURLIfNeeded()
}
} else {
val frag = supportFragmentManager.findFragmentById(R.id.normal_end_container)
Expand Down

0 comments on commit cf32a92

Please sign in to comment.