Skip to main content

Mountain/IPC/WindServiceHandlers/Navigation/
HistoryGoBack.rs

1
2//! Pop the previous URI off the back-stack and return it.
3//! `None` when the stack is empty (caller should disable the
4//! back button).
5
6use std::sync::Arc;
7
8use serde_json::Value;
9
10use crate::RunTime::ApplicationRunTime::ApplicationRunTime;
11
12pub async fn Fn(RunTime:Arc<ApplicationRunTime>) -> Result<Value, String> {
13	let Uri = RunTime.Environment.ApplicationState.Feature.NavigationHistory.GoBack();
14
15	Ok(Uri.map(Value::String).unwrap_or(Value::Null))
16}