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