mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
When Poping views, make sure we add the targeted one if we couldn’t already find it in the stack
This commit is contained in:
parent
d39fb0661b
commit
f2b36ed7f8
1 changed files with 2 additions and 3 deletions
|
|
@ -640,7 +640,6 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
animated:(BOOL)animated
|
||||
addViewToStack:(BOOL)addViewToStack {
|
||||
PhoneMainView *vc = [[RootViewManager instance] setViewControllerForDescription:view];
|
||||
LOGI(@"_changeCurrentView : stack size before = %d", [RootViewManager instance].viewDescriptionStack.count);
|
||||
if (![view equal:vc.currentView] || vc != self) {
|
||||
LOGI(@"Change current view to %@", view.name);
|
||||
[self setPreviousViewName:vc.currentView.name];
|
||||
|
|
@ -652,7 +651,6 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
[vc.mainViewController changeView:view];
|
||||
vc->currentView = view;
|
||||
}
|
||||
LOGI(@"_changeCurrentView : stack size after = %d", [RootViewManager instance].viewDescriptionStack.count);
|
||||
|
||||
//[[RootViewManager instance] setViewControllerForDescription:view];
|
||||
|
||||
|
|
@ -667,7 +665,8 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
while (viewStack.count > 0 && ![[viewStack lastObject] equal:view]) {
|
||||
[viewStack removeLastObject];
|
||||
}
|
||||
return [self _changeCurrentView:view transition:[PhoneMainView getBackwardTransition] animated:ANIMATED addViewToStack:FALSE];
|
||||
BOOL addView = (viewStack.count == 0); // if we couldn't find the view in the stack, we need to add it
|
||||
return [self _changeCurrentView:view transition:[PhoneMainView getBackwardTransition] animated:ANIMATED addViewToStack:addView];
|
||||
}
|
||||
|
||||
- (void) setPreviousViewName:(NSString*)previous{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue