Mountain/IPC/WindServiceHandlers/Navigation/HistoryCanGoBack.rs
1//! Predicate: is the back-stack non-empty? Drives the
2//! enabled-state of the workbench's back-arrow button.
3
4use std::sync::Arc;
5
6use serde_json::Value;
7
8use crate::RunTime::ApplicationRunTime::ApplicationRunTime;
9
10pub async fn Fn(RunTime:Arc<ApplicationRunTime>) -> Result<Value, String> {
11 Ok(Value::Bool(
12 RunTime.Environment.ApplicationState.Feature.NavigationHistory.CanGoBack(),
13 ))
14}