Hello, developers To prevent infinite page stack depth I want to cut some first pages from stack. I have 5 pages in stack and when I click on item and begin pushing 6 page to stack I want to remove first 4 pages and as result I want to have only 5 and 6 page in stack. But I can't do this.
I tried the next: if (pageStack.depth === 5) { pageStack.replaceAbove(null, pageStack.find(function(page) { return /page/._depth === 4 }), {}, PageStackAction.Immediate) } But in this case I got empty page which I found in find function and the next: if (pageStack.depth === 5) { pageStack.pop(pageStack.find(function(page) { return /page/._depth === 4 }), PageStackAction.Immediate) } Documentation says: "If a /page/ object is specified, all pages above the specified page are removed;" but in result it remove only page which found in pageStack.find function How I can do this? Thx! -- *Sincerely, Oleg Linkin.* *Jabber: ma...@gentoo.ru <ma...@gentoo.ru> Skype: lord_baskervil Тел.: +375-(29)-5539994*
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org