mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-14 15:28:57 +00:00
update navigation index before currenteventchange
This commit is contained in:
@@ -167,14 +167,14 @@ pub fn pushEntry(
|
||||
// we don't always have a current entry...
|
||||
const previous = if (self.entries.items.len > 0) self.currentEntry() else null;
|
||||
try self.entries.append(arena, entry);
|
||||
self.index = index;
|
||||
|
||||
if (previous) |prev| {
|
||||
if (dispatch) {
|
||||
NavigationCurrentEntryChangeEvent.dispatch(self, prev, .push);
|
||||
}
|
||||
}
|
||||
|
||||
self.index = index;
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user