INNER CODE UNIT · Go

lastIdx

vladimirvivien/ktop · application/navigation.go:46

	lastIdx := len(n.stack) - 1
	popped := n.stack[lastIdx]
	n.stack = n.stack[:lastIdx]
	return &popped
}

// Current returns the current (top) page state
func (n *NavigationStack) Current() *PageState {
	if len(n.stack) == 0 {
		return nil
	}
	return &n.stack[len(n.stack)-1]
}

// Previous returns the previous page state (one below current)
// Returns nil if at the root page
func (n *NavigationStack) Previous() *PageState {
	if len(n.stack) <= 1 {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…