Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream_ohos/main' into feature/ohos_jsi
Browse files Browse the repository at this point in the history
  • Loading branch information
zealotchen0 committed Dec 10, 2024
2 parents 9057a5c + f1c6f89 commit e2f2ac9
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/development/native-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ Ohos Demo:源码依赖 Hippy。体验方法:DevEco 打开 hippy 项目根目

```json
"dependencies": {
"hippy": "1.0.0"
"hippy": "1.2.0"
}
```

Expand Down
5 changes: 3 additions & 2 deletions driver/js/src/vm/jsh/jsh_vm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ JSHVM::JSHVM(const std::shared_ptr<JSHVMInitParam>& param) : VM(param) {

JSVM_InitOptions init_options;
memset(&init_options, 0, sizeof(init_options));
// 说明:这里init返回结果不需要判断,有可能App其它地方已经init过JSVM,这里会返回错误码9,但没影响。
auto status = OH_JSVM_Init(&init_options);
FOOTSTONE_CHECK(status == JSVM_OK);
FOOTSTONE_LOG(INFO) << "JSHVM OH_JSVM_Init result: " << status;
platform_initted = true;
#ifdef ENABLE_INSPECTOR
auto trace = reinterpret_cast<v8::platform::tracing::TracingController*>(platform->GetTracingController());
Expand All @@ -79,7 +80,7 @@ JSHVM::JSHVM(const std::shared_ptr<JSHVMInitParam>& param) : VM(param) {
FOOTSTONE_CHECK(status == JSVM_OK);

enable_v8_serialization_ = param->enable_v8_serialization;
FOOTSTONE_DLOG(INFO) << "V8VM end";
FOOTSTONE_DLOG(INFO) << "JSHVM end";
}

static void UncaughtExceptionMessageCallback(JSVM_Env env, JSVM_Value error, void *external_data) {
Expand Down
2 changes: 1 addition & 1 deletion framework/examples/ohos-har-demo/oh-package.json5
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "",
"license": "",
"dependencies": {
"hippy": "1.0.0"
"hippy": "1.2.0"
},
"devDependencies": {},
"dynamicDependencies": {}
Expand Down
4 changes: 4 additions & 0 deletions framework/ohos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
## Version 1.1.0
### Features
- Improve the list component, improve the details of JSVM usage, optimize memory, and so on.

## Version 1.2.0
### Fix
- Some bugs.
2 changes: 1 addition & 1 deletion framework/ohos/oh-package.json5
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"repository": "https://github.com/sohotz/Hippy.git",
"homepage": "https://openhippy.com/",
"keywords": ["hippy", "cross-platform"],
"version": "1.1.0",
"version": "1.2.0",
"dependencies": {},
"devDependencies": {},
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ class TextInputView : public BaseView, public TextInputNodeDelegate,public TextA
bool isListenEndEditing_ = false;
bool isListenFocus_ = false;
bool isListenBlur_ = false;
bool isListenKeyboardWillShow_ = false; // TODO(hot):
bool isListenKeyboardWillHide_ = false; // TODO(hot):
bool isListenKeyboardWillShow_ = false; // TODO: 如果有业务需求,再评估鸿蒙上实现方案。
bool isListenKeyboardWillHide_ = false;
bool isListenContentSizeChange_ = false;

bool focus_ = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void BaseView::SetInterceptPullUp(bool flag) {
}

void BaseView::HandleInterceptPullUp() {
// TODO(hot):
// TODO: 如果有业务需求,再评估鸿蒙上实现方案。
}

void BaseView::SetAttachedToWindowHandle(bool flag) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void ListView::Init() {
listView->HandleOnChildrenUpdated();
listView->CheckInitOffset();

// TODO(hot): rowShouldSticky
// TODO: rowShouldSticky 吸顶逻辑,如果有业务需求,再评估鸿蒙上实现方案。
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ void PullHeaderView::CallImpl(const std::string &method, const std::vector<Hippy
if (r && map.size() > 0) {
auto collapseTime = HRValueUtils::GetInt32(map["time"]);
if (collapseTime > 0) {
// TODO(hot):
OnHeadRefreshFinish(collapseTime);
} else {
OnHeadRefreshFinish();
Expand All @@ -76,7 +75,6 @@ void PullHeaderView::OnHeadRefreshFinish(int32_t delay) {
listView->ScrollToIndex(1, true);
} else if (parentView->GetViewType() == "WaterfallView") {
auto waterView = std::static_pointer_cast<WaterfallView>(parentView);
// TODO(hot):
waterView->OnHeadRefreshFinish(delay);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ void RefreshWrapperView::OnRefreshing() {

void RefreshWrapperView::OnStateChange(int32_t state) {
FOOTSTONE_DLOG(INFO) << "Refresh wrapper view, OnStateChange: " << state;

}

void RefreshWrapperView::OnOffsetChange(float_t offset) {
Expand All @@ -137,12 +138,10 @@ void RefreshWrapperView::SetRefreshOffset(float offset) {

void RefreshWrapperView::BounceToHead() {
refreshNode_->SetRefreshRefreshing(false);

// TODO(hot): setTimeout bounceTime
}

void RefreshWrapperView::StartRefresh() {
HREventUtils::SendComponentEvent(ctx_, tag_, HREventUtils::EVENT_REFRESH_WRAPPER_REFRESH, nullptr);
// 鸿蒙不支持程序开始刷新
}

void RefreshWrapperView::RefreshComplected() {
Expand Down

0 comments on commit e2f2ac9

Please sign in to comment.