mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-03-02 06:58:14 +00:00
Solve the page jump exception.
Signed-off-by: sunfei <sunfei.sun@huawei.com> Change-Id: I7011f0bb7f586e5280dca90a3f945c900585cf62
This commit is contained in:
parent
292c9e1504
commit
415a8732a9
@ -21,7 +21,6 @@
|
||||
#include "base/utils/system_properties.h"
|
||||
#include "core/common/ace_application_info.h"
|
||||
#include "core/components/button/button_component.h"
|
||||
#include "core/components/checkable/checkable_component.h"
|
||||
#include "core/components/grid_layout/grid_layout_item_component.h"
|
||||
#include "core/components/image/image_component.h"
|
||||
#include "core/components/menu/menu_component.h"
|
||||
@ -392,10 +391,8 @@ bool ViewStackProcessor::ShouldPopImmediately()
|
||||
auto multiComposedComponent = AceType::DynamicCast<MultiComposedComponent>(GetMainComponent());
|
||||
auto soleChildComponent = AceType::DynamicCast<SoleChildComponent>(GetMainComponent());
|
||||
auto menuComponent = AceType::DynamicCast<MenuComponent>(GetMainComponent());
|
||||
auto checkableComponent = AceType::DynamicCast<CheckableComponent>(GetMainComponent());
|
||||
|
||||
return (strcmp(type, AceType::TypeName<TextSpanComponent>()) == 0 ||
|
||||
!(componentGroup || multiComposedComponent || soleChildComponent || menuComponent || checkableComponent));
|
||||
!(componentGroup || multiComposedComponent || soleChildComponent || menuComponent));
|
||||
}
|
||||
|
||||
void ViewStackProcessor::Pop()
|
||||
@ -444,14 +441,13 @@ void ViewStackProcessor::PopContainer()
|
||||
auto componentGroup = AceType::DynamicCast<ComponentGroup>(GetMainComponent());
|
||||
auto multiComposedComponent = AceType::DynamicCast<MultiComposedComponent>(GetMainComponent());
|
||||
auto soleChildComponent = AceType::DynamicCast<SoleChildComponent>(GetMainComponent());
|
||||
auto checkableComponent = AceType::DynamicCast<CheckableComponent>(GetMainComponent());
|
||||
if ((componentGroup && strcmp(type, AceType::TypeName<TextSpanComponent>()) != 0) || multiComposedComponent ||
|
||||
soleChildComponent || checkableComponent) {
|
||||
soleChildComponent) {
|
||||
Pop();
|
||||
return;
|
||||
}
|
||||
|
||||
while ((!componentGroup && !multiComposedComponent && !soleChildComponent && !checkableComponent) ||
|
||||
while ((!componentGroup && !multiComposedComponent && !soleChildComponent) ||
|
||||
strcmp(type, AceType::TypeName<TextSpanComponent>()) == 0) {
|
||||
Pop();
|
||||
type = AceType::TypeName(GetMainComponent());
|
||||
|
Loading…
x
Reference in New Issue
Block a user