mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-13 06:01:21 +00:00
fix navigation entry update
This commit is contained in:
parent
acfd730c95
commit
cdf4d21edd
@ -299,24 +299,27 @@ fn snap_history(profile: &Profile, navigation: &Navigation, uri: Option<&Uri>) {
|
|||||||
/// Navigate home URL (parsed from current navigation entry)
|
/// Navigate home URL (parsed from current navigation entry)
|
||||||
/// * this method create new history record in memory as defined in `action_page_open` action
|
/// * this method create new history record in memory as defined in `action_page_open` action
|
||||||
pub fn home(page: &Rc<Page>) {
|
pub fn home(page: &Rc<Page>) {
|
||||||
if let Some(request) = page.navigation.home.url() {
|
if let Some(text) = page.navigation.home.url() {
|
||||||
load(page, Some(request.as_str()), false);
|
page.navigation.request.widget.entry.set_text(&text);
|
||||||
|
load(page, None, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Navigate back in history
|
/// Navigate back in history
|
||||||
/// * this method does not create new history record in memory
|
/// * this method does not create new history record in memory
|
||||||
pub fn history_back(page: &Rc<Page>) {
|
pub fn history_back(page: &Rc<Page>) {
|
||||||
if let Some(request) = page.navigation.history.back(true) {
|
if let Some(text) = page.navigation.history.back(true) {
|
||||||
load(page, Some(request.as_str()), false);
|
page.navigation.request.widget.entry.set_text(&text);
|
||||||
|
load(page, None, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Navigate forward in history
|
/// Navigate forward in history
|
||||||
/// * this method does not create new history record in memory
|
/// * this method does not create new history record in memory
|
||||||
pub fn history_forward(page: &Rc<Page>) {
|
pub fn history_forward(page: &Rc<Page>) {
|
||||||
if let Some(request) = page.navigation.history.forward(true) {
|
if let Some(text) = page.navigation.history.forward(true) {
|
||||||
load(page, Some(request.as_str()), false);
|
page.navigation.request.widget.entry.set_text(&text);
|
||||||
|
load(page, None, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user