We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2015-12-12 23:33:44 +0200 |
On the FirstPage we have a list of things. On the Create page we create an item to the list and do a pageStack.replace(firstpage) so that it "reloads" the firstpage (which has a function for filling the list) adds the new item on the list and display the updated first page. All nice up to here.
However this approach leaves -if you swipe back- a non updated First page. Trying to pop the non updated first page didn't seem to work. Using pop from the create page doesn't update the first page.
Is there a way to remove the non updated first page from the list?
2 | No.2 Revision |
On the FirstPage we have a list of things. On the Create page we create an item to the list and do a pageStack.replace(firstpage) so that it "reloads" the firstpage (which has a function for filling the list) adds the new item on the list and display the updated first page. All nice up to here.
However this approach leaves -if you swipe back- a non updated First page. Trying to pop the non updated first page didn't seem to work. Using pop from the create page doesn't update the first page.
Is there a way to remove the non updated first page from the list?
Updated the title to reflect the problem/discussion (see comments).
3 | No.3 Revision |
On the FirstPage we have a list of things. On the Create page we create an item to the list and do a pageStack.replace(firstpage) so that it "reloads" the firstpage (which has a function for filling the list) adds the new item on the list and display the updated first page. All nice up to here.
However this approach leaves -if you swipe back- a non updated First page. Trying to pop the non updated first page didn't seem to work. Using pop from the create page doesn't update the first page.
Is there a way to remove the non updated first page from the list?
Updated the title to reflect the problem/discussion (see comments).
Edit 2: Somehow solved but there must be a more correct/better way.
if i change Component.onCompleted: { } on the first page with onStatusChanged: { } it updates the list however it breaks the model i pass to the edit dialog. Also it seems to call the functions in onStatusChanged more than it is necessary and seems kind of wasteful.
:/