@@ -436,7 +436,7 @@ async def invoke_on_restored_callbacks():
436436 except Exception as e :
437437 warnings .warn (
438438 f"Error calling on_restored callback: { e } " ,
439- stacklevel = 2 ,
439+ stacklevel = 1 ,
440440 )
441441 notification_show (
442442 f"Error calling on_restored callback: { e } " ,
@@ -561,7 +561,12 @@ async def do_bookmark(self) -> None:
561561 msg = f"Error bookmarking state: { e } "
562562 from ..ui ._notification import notification_show
563563
564- notification_show (msg , duration = None , type = "error" )
564+ notification_show (
565+ msg ,
566+ duration = None ,
567+ type = "error" ,
568+ session = self ._root_session ,
569+ )
565570
566571
567572class BookmarkProxy (Bookmark ):
@@ -806,27 +811,3 @@ def on_restored(
806811 ) -> CancelCallback :
807812 # Provide a no-op function within ExpressStub
808813 return lambda : None
809-
810-
811- # #' Display a modal dialog for bookmarking
812- # #'
813- # #' This is a wrapper function for [urlModal()] that is automatically
814- # #' called if an application is bookmarked but no other [onBookmark()]
815- # #' callback was set. It displays a modal dialog with the bookmark URL, along
816- # #' with a subtitle that is appropriate for the type of bookmarking used ("url"
817- # #' or "server").
818- # #'
819- # #' @param url A URL to show in the modal dialog.
820- # #' @export
821- # showBookmarkUrlModal <- function(url) {
822- # store <- getShinyOption("bookmarkStore", default = "")
823- # if (store == "url") {
824- # subtitle <- "This link stores the current state of this application."
825- # } else if (store == "server") {
826- # subtitle <- "The current state of this application has been stored on the server."
827- # } else {
828- # subtitle <- NULL
829- # }
830-
831- # showModal(urlModal(url, subtitle = subtitle))
832- # }
0 commit comments