Skip to content

Commit

Permalink
chore: resolve some merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Dec 18, 2023
1 parent 062ce70 commit fcde60c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
7 changes: 0 additions & 7 deletions R/module_snapshot_manager.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@
#' a `teal_slices` object. When a snapshot is restored from file, its `app_id` is compared to that
#' of the current app state and only if the match is the snapshot admitted to the session.
#'
#' When a snapshot is uploaded, it will first be added to storage just like a newly created one,
#' and then used to restore app state much like a snapshot taken from storage.
#' Upon clicking the upload icon the user will be prompted for a file to upload
#' and may choose to name the new snapshot. The name defaults to the name of the file (the extension is dropped)
#' and normal naming rules apply. Loading the file yields a `teal_slices` object,
#' which is disassembled for storage and used directly for restoring app state.
#'
#' @section Transferring snapshots:
#' Snapshots uploaded from disk should only be used in the same application they come from.
#' To ensure this is the case, `init` stamps `teal_slices` with an app id that is stored in the `app_id` attribute of
Expand Down
15 changes: 0 additions & 15 deletions R/teal_slices.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,21 +149,6 @@ c.teal_slices <- function(...) {
}


# this function must be defined in the `teal` namesspace so that it calls `teal::teal_slices`
#' @noRd
#' @keywords internal
#'
slices_restore <- function(file) {
checkmate::assert_file_exists(file, access = "r", extension = "json")

tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)

tss_elements <- lapply(tss_json$slices, as.teal_slice)

do.call(teal_slices, c(tss_elements, tss_json$attributes))
}


#' Deep copy `teal_slices`
#'
#' it's important to create a new copy of `teal_slices` when
Expand Down

0 comments on commit fcde60c

Please sign in to comment.