I’m developing a MAUI application with FreshMvvm and I’m encountering an issue with the ReverseInit method. In my application, I have a search page and I’m using a modal to handle search filters. When I close the modal using PopPageModel, I go through the ReverseInit method of FreshMvvm.
However, I’m experiencing unexpected behavior: the first time I open my filter modal and close it, I go through ReverseInit just fine. But the second time I open and close the modal, without changing the page in between, ReverseInit is no longer called.
public override void ReverseInit(object returnedData)
{
base.ReverseInit(returnedData);
if (returnedData is Filter filter)
{
//Maj Filter
Filter = filter;
}
}
I’m not passing null to PopPageModel, so I don’t think the issue comes from there. I’ve also checked that I don’t have multiple instances of the same page in the navigation stack.
Does anyone have an idea why ReverseInit is not called the second time I close the modal? Any help would be greatly appreciated.
Thank you in advance for your time and assistance.
Hello,
I’m developing a MAUI application with FreshMvvm and I’m encountering an issue with the ReverseInit method. In my application, I have a search page and I’m using a modal to handle search filters. When I close the modal using PopPageModel, I go through the ReverseInit method of FreshMvvm.
However, I’m experiencing unexpected behavior: the first time I open my filter modal and close it, I go through ReverseInit just fine. But the second time I open and close the modal, without changing the page in between, ReverseInit is no longer called.
Here’s the code I use to close the modal Filter:
await CoreMethods.PopPageModel(filter, true, true);
And here’s my ReverseInit method in Search:
I’m not passing null to PopPageModel, so I don’t think the issue comes from there. I’ve also checked that I don’t have multiple instances of the same page in the navigation stack.
Does anyone have an idea why ReverseInit is not called the second time I close the modal? Any help would be greatly appreciated.
Thank you in advance for your time and assistance.