@ohos-cpf/3rdloop 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/lib/cli.js +38 -5
- package/lib/doctor.js +111 -10
- package/lib/knowledge.js +440 -0
- package/lib/mcp.js +498 -0
- package/package.json +6 -2
- package/vendor/Archive/data/.index/meta.json +7 -0
- package/vendor/Archive/data/.index/search.db +0 -0
- package/vendor/Archive/data/docs/experiences/arkts-check-tool-pitfalls-baseline-comparison.md +13 -0
- package/vendor/Archive/data/docs/experiences/arkts-deep-path-import-recognition.md +31 -0
- package/vendor/Archive/data/docs/experiences/arkts-demo-coverage-entry-file-case-mismatch.md +25 -0
- package/vendor/Archive/data/docs/experiences/arkts-demo-coverage-import-trailing-slash.md +20 -0
- package/vendor/Archive/data/docs/experiences/arkts-library-source-files-may-be-ts.md +18 -0
- package/vendor/Archive/data/docs/experiences/arkts-typedarray-buffer-interface-cast-compile-fixes.md +36 -0
- package/vendor/Archive/data/docs/experiences/arkts-xts-compile-error-clustering-fix.md +24 -0
- package/vendor/Archive/data/docs/experiences/arkts-xts-doc-expected-value-runtime-probe.md +35 -0
- package/vendor/Archive/data/docs/experiences/arkts-xts-fixture-rawfile-testability-injection.md +33 -0
- package/vendor/Archive/data/docs/experiences/code-linter-chinese-comment-false-positive.md +16 -0
- package/vendor/Archive/data/docs/experiences/esobject-new-expression-variable-tracking.md +33 -0
- package/vendor/Archive/data/docs/experiences/filesystem-case-sensitivity-module-resolution.md +31 -0
- package/vendor/Archive/data/docs/experiences/gitcode-clone-redirect-warning-normal.md +13 -0
- package/vendor/Archive/data/docs/experiences/kn_msgvq1w585ec8319.md +77 -0
- package/vendor/Archive/data/docs/experiences/kn_msovnm6rd46de72c.md +98 -0
- package/vendor/Archive/data/docs/experiences/kn_mspt8vntfe708576.md +87 -0
- package/vendor/Archive/data/docs/experiences/kn_mspu1ei77adbbb48.md +133 -0
- package/vendor/Archive/data/docs/experiences/kn_mspubgak8d30bfce.md +128 -0
- package/vendor/Archive/data/docs/experiences/kn_mspug2de3cb1f7c3.md +115 -0
- package/vendor/Archive/data/docs/experiences/kn_skill_opt_001.md +38 -0
- package/vendor/Archive/data/docs/experiences/loop-artifacts-verification-evidence-triangle.md +19 -0
- package/vendor/Archive/data/docs/experiences/macos-bash-replace-build-ps1.md +19 -0
- package/vendor/Archive/data/docs/experiences/macos-bsd-diff-q-illegal-option.md +15 -0
- package/vendor/Archive/data/docs/experiences/migrate-cjs-compatible-api-version-map-limit.md +17 -0
- package/vendor/Archive/data/docs/experiences/mp3agic-arkts-library-behavior-quirks.md +21 -0
- package/vendor/Archive/data/docs/experiences/ohos-face-detection-scan-api-mapping.md +15 -0
- package/vendor/Archive/data/docs/experiences/pr-metadata-and-diff-integrity-verification.md +12 -0
- package/vendor/Archive/data/docs/experiences/rn-coverage-index-signature-pseudo-member-false-negative.md +32 -0
- package/vendor/Archive/data/docs/experiences/rn-memory-check-severity-calibration.md +21 -0
- package/vendor/Archive/data/docs/experiences/rn-platform-specific-api-exclusion-evidence.md +24 -0
- package/vendor/Archive/data/docs/experiences/rn-upstream-version-diff-pitfalls.md +17 -0
- package/vendor/Archive/data/docs/experiences/rn-version-gap-risk-rating-rules.md +13 -0
- package/vendor/Archive/data/docs/experiences/rn-view-lib-native-contract-diff-fabric-spec.md +16 -0
- package/vendor/Archive/data/docs/experiences/rnoh-adapter-package-version-field-semantics.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-arkts-sqlite-rows-array-format.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-dependency-residue-scan-strategy.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-local-lib-dep-use-tgz.md +53 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-prereserve-rntesterlist.md +17 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-template-compatiblesdkversion-upgrade.md +29 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-turbomodule-shell-adaptation-checklist.md +41 -0
- package/vendor/Archive/data/docs/experiences/rnoh-mcp-build-project-tool-risk.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-npm-devdependencies-version-precheck.md +29 -0
- package/vendor/Archive/data/docs/experiences/rnoh-repo-baseline-version-verification.md +13 -0
- package/vendor/Archive/data/docs/experiences/rnoh-repo-upstream-directory-mapping.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-stateless-library-zero-leak-verification.md +31 -0
- package/vendor/Archive/data/docs/experiences/rnoh-template-npmrc-credential-removal.md +15 -0
- package/vendor/Archive/data/docs/experiences/rnoh-turbomodule-codegen-wiring-verification.md +19 -0
- package/vendor/Archive/data/docs/experiences/rnoh-turbomodule-cpp-methodmap-compatibility-check.md +20 -0
- package/vendor/Archive/data/docs/experiences/scenario-doc-vs-source-signature-diff-four-patterns.md +24 -0
- package/vendor/Archive/data/docs/experiences/static-analysis-grep-cross-validation.md +29 -0
- package/vendor/Archive/demo.js +489 -0
- package/vendor/Archive/index.js +43 -0
- package/vendor/Archive/package.json +16 -0
- package/vendor/Archive/src/constants.js +83 -0
- package/vendor/Archive/src/data/stopwords.txt +110 -0
- package/vendor/Archive/src/data/synonyms.json +25 -0
- package/vendor/Archive/src/data/terms.txt +59 -0
- package/vendor/Archive/src/db/sqlite-backend.js +312 -0
- package/vendor/Archive/src/db/sqlite-schema.js +64 -0
- package/vendor/Archive/src/engine.js +501 -0
- package/vendor/Archive/src/index/index-manager.js +203 -0
- package/vendor/Archive/src/index/index-state.js +94 -0
- package/vendor/Archive/src/index/search-text-builder.js +106 -0
- package/vendor/Archive/src/index.js +22 -0
- package/vendor/Archive/src/parser/api-identifiers.js +121 -0
- package/vendor/Archive/src/parser/api-suffixes.js +48 -0
- package/vendor/Archive/src/parser/heading-normalize.js +40 -0
- package/vendor/Archive/src/parser/markdown-splitter.js +215 -0
- package/vendor/Archive/src/search/catalog-routing.js +87 -0
- package/vendor/Archive/src/search/fts-search.js +289 -0
- package/vendor/Archive/src/search/query-normalizer.js +159 -0
- package/vendor/Archive/src/search/query-rewriter.js +72 -0
- package/vendor/Archive/src/search/search-engine.js +72 -0
- package/vendor/Archive/src/search/snippet.js +64 -0
- package/vendor/Archive/src/store/dir-store.js +103 -0
- package/vendor/Archive/src/store/doc-store.js +36 -0
- package/vendor/Archive/src/tokenizer/lexicon.js +151 -0
- package/vendor/Archive/src/tokenizer/tokenizer.js +167 -0
- package/vendor/Archive/src/types.js +86 -0
- package/vendor/Archive/src/utils/hash.js +16 -0
- package/vendor/Archive/src/utils/lock.js +73 -0
- package/vendor/Archive/src/utils/path-safety.js +96 -0
- package/vendor/Archive/src/utils/paths.js +39 -0
- package/vendor/BadCase/rn/INDEX.md +127 -0
- package/vendor/BadCase/rn/cases/KI-001-webview/350/247/206/351/242/221/346/227/240/346/263/225/346/250/252/345/261/217.md +52 -0
- package/vendor/BadCase/rn/cases/KI-002-fastImage/347/203/255/346/233/264/346/226/260/345/233/276/347/211/207/345/244/261/350/264/245.md +37 -0
- package/vendor/BadCase/rn/cases/KI-003-wechat/347/274/251/347/225/245/345/233/276/346/234/254/345/234/260/345/233/276/347/211/207.md +62 -0
- package/vendor/BadCase/rn/cases/KI-004-wechat/345/233/236/350/260/203/346/227/266/345/272/217.md +47 -0
- package/vendor/BadCase/rn/cases/KI-005-geolocation/345/257/274/345/205/245/350/267/257/345/276/204/345/220/216/347/274/200.md +31 -0
- package/vendor/BadCase/rn/cases/KI-006-SmartRefreshLayout/346/231/272/350/203/275/346/214/207/351/222/210/345/264/251/346/272/203.md +55 -0
- package/vendor/BadCase/rn/cases/KI-007-orientation-locker/344/274/240/346/204/237/345/231/250/345/210/235/345/247/213/345/214/226.md +58 -0
- package/vendor/BadCase/rn/cases/KI-008-orientation-locker/344/274/240/346/204/237/345/231/250/345/274/225/347/224/250/350/256/241/346/225/260.md +47 -0
- package/vendor/BadCase/rn/cases/KI-009-pager-view/345/265/214/345/245/227/346/273/221/345/212/250.md +38 -0
- package/vendor/BadCase/rn/cases/KI-010-screens/346/211/213/345/212/277/345/206/262/347/252/201.md +48 -0
- package/vendor/BadCase/rn/cases/KI-011-spring-scrollview/346/211/213/345/212/277/351/207/215/345/244/215/347/273/221/345/256/232.md +49 -0
- package/vendor/BadCase/rn/cases/KI-012-qr-camera/346/250/252/345/261/217/351/200/202/351/205/215.md +59 -0
- package/vendor/BadCase/rn/cases/KI-013-webview/346/267/261/350/211/262/346/250/241/345/274/217/350/203/214/346/231/257/350/211/262.md +37 -0
- package/vendor/BadCase/rn/cases/KI-014-amap-geolocation/345/233/236/350/260/203/347/274/272/345/244/261.md +42 -0
- package/vendor/BadCase/rn/cases/KI-015-reanimated/350/277/220/350/241/214/346/227/266/346/236/220/346/236/204/345/264/251/346/272/203.md +54 -0
- package/vendor/BadCase/rn/cases/KI-016-fs/346/226/207/344/273/266/350/257/273/345/217/226/347/274/226/347/240/201.md +58 -0
- package/vendor/BadCase/rn/cases/KI-017-blob-util/345/217/202/346/225/260/347/274/226/347/240/201/351/224/231/350/257/257.md +39 -0
- package/vendor/BadCase/rn/cases/KI-018-modal/345/274/271/347/252/227/351/227/252/347/203/201.md +53 -0
- package/vendor/BadCase/rn/cases/KI-019-code-push/351/207/215/345/220/257/351/200/273/350/276/221/345/244/261/346/225/210.md +79 -0
- package/vendor/BadCase/rn/cases/KI-020-netinfo/346/225/217/346/204/237/344/277/241/346/201/257/346/263/204/351/234/262.md +60 -0
- package/vendor/BadCase/rn/cases/KI-021-video/346/234/254/345/234/260/350/247/206/351/242/221/346/222/255/346/224/276/345/274/202/345/270/270.md +79 -0
- package/vendor/BadCase/rn/cases/KI-022-audio-recorder-player/346/236/232/344/270/276/347/274/272/345/244/261.md +38 -0
- package/vendor/BadCase/rn/cases/KI-023-svg/346/270/220/345/217/230/347/273/247/346/211/277/345/244/261/346/225/210.md +62 -0
- package/vendor/BadCase/rn/generalization-log.md +55 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-SmartRefreshLayout-32.json +328 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-SmartRefreshLayout-32.md +382 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-amap-geolocation-27.json +1351 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-amap-geolocation-27.md +1176 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-audio-recorder-player-22.json +538 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-audio-recorder-player-22.md +1488 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-blob-util-23.json +211 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-blob-util-23.md +35 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-code-push-17.json +2048 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-code-push-17.md +3866 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fast-image-102.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fast-image-102.md +40 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fs-38.json +751 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fs-38.md +883 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-geolocation-24.json +1544 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-geolocation-24.md +2598 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-modal-20.json +246 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-modal-20.md +554 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-netinfo-31.json +211 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-netinfo-31.md +54 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-45.json +1626 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-45.md +2213 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-51.json +208 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-51.md +77 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-pager-view-32.json +377 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-pager-view-32.md +174 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-qr-decode-image-camera-37.json +232 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-qr-decode-image-camera-37.md +194 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-reanimated-82.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-reanimated-82.md +67 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-87.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-87.md +38 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-93.json +208 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-93.md +34 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-spring-scrollview-38.json +222 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-spring-scrollview-38.md +56 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-svg-117.json +463 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-svg-117.md +383 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-video-66.json +464 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-video-66.md +565 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-112.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-112.md +47 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-121.json +232 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-121.md +422 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-wechat-lib-15.json +295 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-wechat-lib-15.md +1038 -0
- package/vendor/BadCase/rn/rules/R-01-/345/205/250/345/261/217/347/252/227/345/217/243/347/212/266/346/200/201/347/256/241/347/220/206/345/256/214/346/225/264/346/200/247.md +20 -0
- package/vendor/BadCase/rn/rules/R-02-/350/265/204/346/272/220URI/345/275/242/346/200/201/345/210/206/346/224/257/350/246/206/347/233/226.md +21 -0
- package/vendor/BadCase/rn/rules/R-03-/351/231/204/345/261/236/346/223/215/344/275/234/345/244/261/350/264/245/351/230/273/346/226/255/344/270/273/346/265/201/347/250/213.md +20 -0
- package/vendor/BadCase/rn/rules/R-04-/345/274/202/346/255/245/345/233/236/350/260/203/346/263/250/345/206/214/346/227/266/345/272/217.md +20 -0
- package/vendor/BadCase/rn/rules/R-05-/346/250/241/345/235/227/345/257/274/345/205/245/350/267/257/345/276/204/350/247/204/350/214/203.md +19 -0
- package/vendor/BadCase/rn/rules/R-06-/344/274/240/346/204/237/345/231/250/347/241/254/344/273/266/346/235/203/351/231/220/346/214/211/351/234/200/350/216/267/345/217/226.md +21 -0
- package/vendor/BadCase/rn/rules/R-07-/346/231/272/350/203/275/346/214/207/351/222/210/347/224/237/345/221/275/345/221/250/346/234/237/347/256/241/347/220/206.md +20 -0
- package/vendor/BadCase/rn/rules/R-08-/346/211/213/345/212/277/344/272/213/344/273/266/346/263/250/345/206/214/344/270/216/345/206/262/347/252/201/345/244/204/347/220/206.md +22 -0
- package/vendor/BadCase/rn/rules/R-09-/346/250/252/347/253/226/345/261/217/345/244/232/345/275/242/346/200/201/345/270/203/345/261/200/351/200/202/351/205/215.md +20 -0
- package/vendor/BadCase/rn/rules/R-10-/346/267/261/350/211/262/346/250/241/345/274/217/344/270/273/351/242/230/351/242/234/350/211/262/351/200/202/351/205/215.md +19 -0
- package/vendor/BadCase/rn/rules/R-11-/346/216/245/345/217/243/345/233/236/350/260/203/345/256/236/347/216/260/345/256/214/346/225/264/346/200/247.md +20 -0
- package/vendor/BadCase/rn/rules/R-12-/345/216/237/347/224/237/350/277/220/350/241/214/346/227/266/350/265/204/346/272/220/346/236/220/346/236/204/346/227/266/345/272/217.md +20 -0
- package/vendor/BadCase/rn/rules/R-13-/346/226/207/344/273/266/346/225/260/346/215/256/347/274/226/347/240/201/344/270/216/346/240/274/345/274/217/345/205/274/345/256/271.md +21 -0
- package/vendor/BadCase/rn/rules/R-14-/345/212/250/347/224/273/345/210/235/345/247/213/345/214/226/346/227/266/345/272/217/344/270/216/347/212/266/346/200/201/345/220/214/346/255/245.md +20 -0
- package/vendor/BadCase/rn/rules/R-15-/347/212/266/346/200/201/346/214/201/344/271/205/345/214/226/344/270/216/351/207/215/345/220/257/351/200/273/350/276/221/344/270/200/350/207/264/346/200/247.md +20 -0
- package/vendor/BadCase/rn/rules/R-16-/346/225/217/346/204/237/344/277/241/346/201/257/346/227/245/345/277/227/346/263/204/351/234/262.md +19 -0
- package/vendor/BadCase/rn/rules/R-17-/345/252/222/344/275/223/350/265/204/346/272/220/347/224/237/345/221/275/345/221/250/346/234/237/344/270/216/351/224/231/350/257/257/345/244/204/347/220/206.md +21 -0
- package/vendor/BadCase/rn/rules/R-18-/350/203/275/345/212/233/346/236/232/344/270/276/351/205/215/347/275/256/345/256/214/346/225/264/346/200/247.md +19 -0
- package/vendor/BadCase/rn/rules/R-19-/345/233/276/345/275/242/346/270/262/346/237/223/345/261/236/346/200/247/347/273/247/346/211/277/344/270/216/351/207/215/347/275/256.md +19 -0
- package/vendor/MCP/README.md +490 -0
- package/vendor/MCP/config.json +29 -0
- package/vendor/MCP/package.json +23 -0
- package/vendor/MCP/scripts/analyze-demo-coverage.cjs +1203 -0
- package/vendor/MCP/scripts/analyze-xts-coverage.cjs +1245 -0
- package/vendor/MCP/scripts/deveco_docs.js +247 -0
- package/vendor/MCP/scripts/extract-interfaces.cjs +1487 -0
- package/vendor/MCP/scripts/flutter-analyze-demo-coverage.cjs +666 -0
- package/vendor/MCP/scripts/flutter-analyze-xts-coverage.cjs +684 -0
- package/vendor/MCP/scripts/flutter-extract-interfaces.cjs +1251 -0
- package/vendor/MCP/scripts/flutter-render-spec-doc.cjs +351 -0
- package/vendor/MCP/scripts/render-spec-doc.cjs +347 -0
- package/vendor/MCP/scripts/rn-analyze-demo-coverage.cjs +645 -0
- package/vendor/MCP/scripts/rn-analyze-test-coverage.cjs +614 -0
- package/vendor/MCP/scripts/rn-extract-interfaces.cjs +1462 -0
- package/vendor/MCP/scripts/rn-render-spec-doc.cjs +327 -0
- package/vendor/MCP/scripts/rn-scan-exports.cjs +1336 -0
- package/vendor/MCP/src/client/MCPClientPool.js +220 -0
- package/vendor/MCP/src/config/ConfigLoader.js +189 -0
- package/vendor/MCP/src/executor/ScriptExecutor.js +110 -0
- package/vendor/MCP/src/gateway/Gateway.js +451 -0
- package/vendor/MCP/src/index.js +87 -0
- package/vendor/MCP/src/library/KBToolProvider.js +229 -0
- package/vendor/MCP/src/library/logger.js +60 -0
- package/vendor/MCP/src/registry/ScriptRegistry.js +238 -0
- package/vendor/MCP/src/registry/ToolRegistry.js +111 -0
- package/vendor/MCP/src/types.js +115 -0
- package/vendor/Server/Skills/arkts-library-test-coverage-check/references/MCP_TOOL_USAGE.md +4 -2
- package/vendor/Server/Skills/arkts-library-xts-coverage/SKILL.md +3 -3
- package/vendor/Server/Skills/knowledge-import/SKILL.md +1 -1
- package/vendor/Server/Skills/knowledge-import/references/MCP_TOOL_USAGE.md +12 -4
- package/vendor/Server/Skills/ohos-lib-pr-push/SKILL.md +5 -4
- package/vendor/Server/Skills/rn-library-issue-generalizer/SKILL.md +2 -2
- package/vendor/Server/Skills/rn-library-known-issue-check/SKILL.md +2 -2
- package/vendor/Server/Skills/rnoh-lib-demo-coverage/SKILL.md +1 -2
- package/vendor/Server/Skills/rnoh-lib-test-align/references/port-test-demo-guide.md +1 -1
- package/vendor/Server/Skills/rnoh-lib-xts-coverage/SKILL.md +1 -2
- package/vendor/Server/package.json +5 -1
- package/vendor/VERSION +3 -3
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# KI-021 react-native-video:播放本地视频异常
|
|
2
|
+
|
|
3
|
+
- **元数据**: `rule: R-17` · `verified: diff` · `source: community-issue` · `severity: high` · `status: draft`
|
|
4
|
+
- **PR**: https://gitcode.com/CPF-RN/rntpc_react-native-video/pull/66(merged,12 文件)
|
|
5
|
+
- **diff 材料**: [../pr-info/rntpc_react-native-video-66.md](../pr-info/rntpc_react-native-video-66.md)
|
|
6
|
+
|
|
7
|
+
## 现象
|
|
8
|
+
|
|
9
|
+
播放本地视频异常——本地 rawfile 视频无法正常播放。
|
|
10
|
+
|
|
11
|
+
## 根因
|
|
12
|
+
|
|
13
|
+
1. 本地视频(asset://)通过 getRawFd 获取 AVFileDescriptor 直接设置 fdSrc,但 rawfile 在 HAP 包内 offset 不为 0,AVPlayer 对 offset!=0 的 fd 在某些版本有 bug(报 5400106 错误);2. switchVideo 中重复调用 bindState() 注册事件监听器,导致 onStateChange 多次触发,非 IDLE 状态重复设置 url/fdSrc 引发 5400102 错误;3. 文件资源(rawfile fd)未在切换源时及时关闭导致泄漏。
|
|
14
|
+
|
|
15
|
+
## 错误代码(修复前)
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
// ① asset:// 直接用 getRawFd 的 fd(offset!=0)
|
|
19
|
+
if (this.srcParam.startsWith('asset')) {
|
|
20
|
+
let fileDescriptor = await getContext(this).resourceManager.getRawFd(`assets/${fileUrl}`);
|
|
21
|
+
src = fileDescriptor; // ← offset!=0 导致 AVPlayer bug
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// ② switchVideo 中重复绑定事件
|
|
25
|
+
switchVideo(newUrl) {
|
|
26
|
+
this.bindState(); // ← 每次切换都重复注册事件监听器
|
|
27
|
+
// ...
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ③ 文件关闭无 pendingClose 机制
|
|
31
|
+
closeFsRawFd() {
|
|
32
|
+
if (typeof this.previousSrc === "string") {
|
|
33
|
+
getContext(this).resourceManager.closeRawFd(this.previousSrc, callback); // ← 异步关闭,可能时序不对
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 正确代码(修复后)
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
// ① asset:// 拷贝到沙箱临时目录后用 file:// 播放
|
|
42
|
+
if (this.srcParam.startsWith('asset')) {
|
|
43
|
+
const destPath = `${cacheDir}/${cacheFileName}`;
|
|
44
|
+
// ② 检查缓存避免重复拷贝
|
|
45
|
+
if (needCopy) {
|
|
46
|
+
const rawFdInfo = await context.resourceManager.getRawFd(rawFilePath);
|
|
47
|
+
const rawFile = fs.openSync(rawFilePath);
|
|
48
|
+
fs.copyFileSync(rawFile.fd, destPath);
|
|
49
|
+
fs.closeSync(rawFile);
|
|
50
|
+
context.resourceManager.closeRawFdSync(rawFilePath);
|
|
51
|
+
}
|
|
52
|
+
src = `file://${destPath}`; // ③ 用 file:// URI 播放
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// ④ switchVideo 不再重复绑定事件
|
|
56
|
+
switchVideo(newUrl) {
|
|
57
|
+
// 注意:不要在这里调用 bindState() ← 移除重复绑定
|
|
58
|
+
// ...
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ⑤ pendingClose 机制:旧 fd 在新源 INITIALIZED 后关闭
|
|
62
|
+
if (this.playerThis && typeof this.playerThis.closeOldFd === 'function') {
|
|
63
|
+
this.playerThis.closeOldFd(); // ⑥ 新源加载成功后关闭旧 fd
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ⑦ aboutToDisappear 有 try-catch 保护
|
|
67
|
+
aboutToDisappear() {
|
|
68
|
+
try {
|
|
69
|
+
this.playVideoModel.release()
|
|
70
|
+
} catch (err) {
|
|
71
|
+
Logger.error(TAG, `release error: ${JSON.stringify(err)}`);
|
|
72
|
+
}
|
|
73
|
+
this.closeFsRawFd()
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 修复方式
|
|
78
|
+
|
|
79
|
+
1. asset:// 视频源拷贝到沙箱临时目录后用 file:// URI 播放(避免 rawfile offset 问题);2. switchVideo 移除重复 bindState() 调用;3. 引入 pendingCloseSrc 机制,旧 fd 在新源 INITIALIZED 后安全关闭;4. url 参数增加有效性校验(空字符串不设置源);5. aboutToDisappear 中 release/close 操作有 try-catch 保护。
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# KI-022 react-native-audio-recorder-player:AAC 格式无法录制
|
|
2
|
+
|
|
3
|
+
- **元数据**: `rule: R-18` · `verified: diff` · `source: dtse` · `severity: medium` · `status: draft`
|
|
4
|
+
- **PR**: https://gitcode.com/CPF-RN/rntpc_react-native-audio-recorder-player/pull/22(merged,15 文件)
|
|
5
|
+
- **diff 材料**: [../pr-info/rntpc_react-native-audio-recorder-player-22.md](../pr-info/rntpc_react-native-audio-recorder-player-22.md)
|
|
6
|
+
|
|
7
|
+
## 现象
|
|
8
|
+
|
|
9
|
+
react-native-audio-recorder-player 音频格式不支持 AAC——用户设置 AudioMimeHarmony: 'audio/mp4a-latm'、AudioFileFormatHarmony: 'm4a' 等 AAC 参数后无法录制。
|
|
10
|
+
|
|
11
|
+
## 根因
|
|
12
|
+
|
|
13
|
+
鸿蒙侧 index.ts 的 AudioFormatHarmonyType 枚举中遗漏了 AAC 格式的枚举值,导致用户按上游文档配置 AAC 格式时无法匹配到正确的录制参数。
|
|
14
|
+
|
|
15
|
+
## 错误代码(修复前)
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
// index.ts — AudioFormatHarmonyType 枚举中无 AAC
|
|
19
|
+
export const AudioFormatHarmonyType = {
|
|
20
|
+
// ...其他格式...
|
|
21
|
+
// ← 缺少 AAC 格式枚举值
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 正确代码(修复后)
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
// index.ts — ① 补充 AAC 格式枚举
|
|
29
|
+
export const AudioFormatHarmonyType = {
|
|
30
|
+
// ...其他格式...
|
|
31
|
+
AAC: 'audio/mp4a-latm', // ② 新增 AAC 格式
|
|
32
|
+
// ③ 同时补充对应的录制参数映射
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 修复方式
|
|
37
|
+
|
|
38
|
+
在 AudioFormatHarmonyType 枚举中补充 AAC 格式的枚举值(audio/mp4a-latm),并添加对应的鸿蒙系统 API 音频编码参数映射,使枚举与上游社区支持的格式对齐。
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# KI-023 react-native-svg:Text 组件渐变色失效
|
|
2
|
+
|
|
3
|
+
- **元数据**: `rule: R-19` · `verified: diff` · `source: community-issue` · `severity: medium` · `status: draft`
|
|
4
|
+
- **PR**: https://gitcode.com/CPF-RN/rntpc_react-native-svg/pull/117(merged,12 文件)
|
|
5
|
+
- **diff 材料**: [../pr-info/rntpc_react-native-svg-117.md](../pr-info/rntpc_react-native-svg-117.md)
|
|
6
|
+
|
|
7
|
+
## 现象
|
|
8
|
+
|
|
9
|
+
Text 组件设置渐变色失效——渐变效果不显示。
|
|
10
|
+
|
|
11
|
+
## 根因
|
|
12
|
+
|
|
13
|
+
Draw 方法中无条件执行 `SetGradient(std::nullopt, false)` 清除所有渐变属性,包括从父节点继承的渐变——Text/TSpan 等子节点自身没有 href 引用时,渐变应由父节点继承,但渲染前被错误地重置为 null。
|
|
14
|
+
|
|
15
|
+
## 错误代码(修复前,C++ 层)
|
|
16
|
+
|
|
17
|
+
```cpp
|
|
18
|
+
// SvgNode.cpp — Draw 方法中无条件重置渐变
|
|
19
|
+
void SvgNode::Draw(OH_Drawing_Canvas *canvas) {
|
|
20
|
+
if (hrefFill_) {
|
|
21
|
+
attributes_.fillState.SetGradient(std::nullopt, false); // ← 无条件清除 fill 渐变
|
|
22
|
+
attributes_.strokeState.SetGradient(std::nullopt, false); // ← 无条件清除 stroke 渐变
|
|
23
|
+
auto fillHref = attributes_.fillState.GetHref();
|
|
24
|
+
if (!fillHref.empty()) {
|
|
25
|
+
auto gradient = GetGradient(fillHref);
|
|
26
|
+
if (gradient) {
|
|
27
|
+
attributes_.fillState.SetGradient(gradient.value(), true);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
// stroke 同理...
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 正确代码(修复后)
|
|
36
|
+
|
|
37
|
+
```cpp
|
|
38
|
+
// SvgNode.cpp — ① 仅当自身有 href 引用时才重置渐变
|
|
39
|
+
void SvgNode::Draw(OH_Drawing_Canvas *canvas) {
|
|
40
|
+
if (hrefFill_) {
|
|
41
|
+
auto fillHref = attributes_.fillState.GetHref();
|
|
42
|
+
auto strokeHref = attributes_.strokeState.GetHref();
|
|
43
|
+
bool hasFillHref = !fillHref.empty();
|
|
44
|
+
bool hasStrokeHref = !strokeHref.empty();
|
|
45
|
+
// ② 仅当自身有 href 时才重置,否则保留继承值
|
|
46
|
+
if (hasFillHref || hasStrokeHref) {
|
|
47
|
+
if (hasFillHref) {
|
|
48
|
+
attributes_.fillState.SetGradient(std::nullopt, false); // ③ 仅重置有 href 的
|
|
49
|
+
}
|
|
50
|
+
if (hasStrokeHref) {
|
|
51
|
+
attributes_.strokeState.SetGradient(std::nullopt, false);
|
|
52
|
+
}
|
|
53
|
+
// ④ 然后设置新的渐变...
|
|
54
|
+
}
|
|
55
|
+
// ⑤ 无 href 时保留继承的渐变值
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 修复方式
|
|
61
|
+
|
|
62
|
+
将渐变重置逻辑从"无条件清除"改为"仅当自身有 href 引用时才清除":通过 hasFillHref/hasStrokeHref 判断,只有当前节点自身有 href 时才重置对应渐变属性,无 href 时保留从父节点继承的渐变值。
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# 泛化运行 — 2026-08-24
|
|
2
|
+
|
|
3
|
+
## 产出清单
|
|
4
|
+
- 新建规则: R-06, R-07, R-08, R-09, R-10, R-11, R-12, R-13, R-14, R-15, R-16, R-17, R-18, R-19(14 条)
|
|
5
|
+
- 新建案例: KI-006 ~ KI-023(18 个案例文件)
|
|
6
|
+
- 挂载案例: 无(全部为新建规则,无已有规则命中)
|
|
7
|
+
- 修订规则: 无
|
|
8
|
+
|
|
9
|
+
## 处理案例总数
|
|
10
|
+
- 输入案例: 19 个 PR 链接(含 2 个同一库的关联 PR 合并为 1 案例:orientation-locker PR 45 + PR 51)
|
|
11
|
+
- 有效产出: 18 个案例(KI-006 ~ KI-023)
|
|
12
|
+
- 材料不足: 0(全部成功获取 PR diff)
|
|
13
|
+
- 已入库跳过: 4 个(PR 121/102/15/24 对应 KI-001~005 已存在)
|
|
14
|
+
|
|
15
|
+
## 归类判定详情
|
|
16
|
+
|
|
17
|
+
| 案例 | 根因本质 | 判定 | 归属规则 |
|
|
18
|
+
|------|----------|------|----------|
|
|
19
|
+
| SmartRefreshLayout PR 32 | shared_ptr 多线程并发访问无锁 | 新建 | R-07(C++ 智能指针生命周期管理类) |
|
|
20
|
+
| orientation-locker PR 45 | 传感器初始化即打开 | 新建 | R-06(传感器/硬件权限按需获取类) |
|
|
21
|
+
| orientation-locker PR 51 | 传感器引用计数边界不完善 | 挂载 R-06 | 同上 |
|
|
22
|
+
| pager-view PR 32 | 嵌套滚动无 NestedScroll 配置 | 新建 | R-08(手势/事件注册与冲突处理类) |
|
|
23
|
+
| screens PR 87+93 | 手势冲突 + 默认值错误 | 挂载 R-08 | 同上 |
|
|
24
|
+
| spring-scrollview PR 38 | 手势重复绑定无防重入 | 挂载 R-08 | 同上 |
|
|
25
|
+
| qr-decode-image-camera PR 37 | 横竖屏布局固定 aspectRatio | 新建 | R-09(横竖屏/多形态布局适配类) |
|
|
26
|
+
| webview PR 112 | 深色模式背景色取值错误 | 新建 | R-10(深色模式/主题颜色适配类) |
|
|
27
|
+
| amap-geolocation PR 27 | onLocationError 声明未实现 | 新建 | R-11(接口/回调实现完整性类) |
|
|
28
|
+
| reanimated PR 82 | Hermes GC 析构时序 | 新建 | R-12(原生运行时资源析构时序类) |
|
|
29
|
+
| fs PR 38 | readText 不支持二进制 | 新建 | R-13(文件/数据编码与格式兼容类) |
|
|
30
|
+
| blob-util PR 23 | 字符串参数 base64 编码 | 挂载 R-13 | 同上 |
|
|
31
|
+
| modal PR 20 | animationValue 未重置导致闪烁 | 新建 | R-14(动画初始化时序与状态同步类) |
|
|
32
|
+
| code-push PR 17 | installMode 未复位 | 新建 | R-15(状态持久化与重启逻辑一致性类) |
|
|
33
|
+
| netinfo PR 31 | 日志打印 MAC/IP | 新建 | R-16(敏感信息日志泄露类) |
|
|
34
|
+
| video PR 66 | rawfile offset + 重复绑定 + fd 泄漏 | 新建 | R-17(媒体资源生命周期与错误处理类) |
|
|
35
|
+
| audio-recorder-player PR 22 | AAC 枚举缺失 | 新建 | R-18(能力枚举/配置完整性类) |
|
|
36
|
+
| svg PR 117 | 渐变属性无条件重置 | 新建 | R-19(图形渲染属性继承与重置类) |
|
|
37
|
+
|
|
38
|
+
## 审核要点
|
|
39
|
+
|
|
40
|
+
### 泛化度存疑项
|
|
41
|
+
- **R-14(动画初始化时序)**: 检查点涉及 React Native Animated API 细节,可能过拟合于 react-native-modal 的具体实现模式。审核时需确认"stopAnimation→setValue(0)→setAnimation"这个顺序是否对所有 Animated 组件通用。
|
|
42
|
+
- **R-17(媒体资源生命周期)**: 规则涵盖面较广(事件绑定/rawfile offset/fd 泄漏/有效性校验),可能过于聚合。审核时需确认是否应拆分为多条规则。
|
|
43
|
+
- **R-19(图形渲染属性继承)**: 规则聚焦 SVG 绘制管线,适用范围较窄。审核时需确认是否可泛化到其他图形渲染库。
|
|
44
|
+
|
|
45
|
+
### 材料不足项
|
|
46
|
+
无。所有 19 个 PR 均成功获取 diff 材料。
|
|
47
|
+
|
|
48
|
+
### 规则重叠风险
|
|
49
|
+
- **R-11 vs R-04**: R-11(接口回调实现完整性)与 R-04(异步回调注册时序)都涉及回调机制,但 R-11 关注"声明了回调但未实现",R-04 关注"注册时序错误"。边界清晰,无重叠风险。
|
|
50
|
+
- **R-07 vs R-12**: 都涉及 C++ 析构/生命周期,但 R-07 关注 shared_ptr 并发安全,R-12 关注 Hermes GC 与原生对象析构顺序。边界清晰,无重叠风险。
|
|
51
|
+
|
|
52
|
+
## 审核操作指引
|
|
53
|
+
1. 逐条审阅 draft 状态的规则/案例文件(R-06~R-19, KI-006~KI-023)
|
|
54
|
+
2. 审核通过 → 规则文件改 `- **状态**: active`;案例文件元数据加 `status: active`
|
|
55
|
+
3. 审核不通过 → 修订文件内容或删除文件,并同步删除 INDEX.md 对应索引行
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pr": {
|
|
3
|
+
"id": 9004982,
|
|
4
|
+
"html_url": "https://gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/merge_requests/32",
|
|
5
|
+
"number": 32,
|
|
6
|
+
"state": "merged",
|
|
7
|
+
"title": "fix:修复77分支中bad_weak_ptr问题,导致的崩溃",
|
|
8
|
+
"url": "https://api.gitcode.com/api/v5/repos/CPF-RN/rntpc_react-native-SmartRefreshLayout/pulls/32",
|
|
9
|
+
"issue_url": "https://api.gitcode.com/api/v5/repos/CPF-RN/rntpc_react-native-SmartRefreshLayout/pulls/32/issues",
|
|
10
|
+
"body": "- fix:修复77分支中bad_weak_ptr问题,导致的崩溃\n- Closed: [#27](https://gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/issues/27) ",
|
|
11
|
+
"assignees_number": 3,
|
|
12
|
+
"assignees": [
|
|
13
|
+
{
|
|
14
|
+
"id": "6731c8f2fbbddc0c200a6019",
|
|
15
|
+
"login": "zhu_chengcheng",
|
|
16
|
+
"name": "zhu_chengcheng",
|
|
17
|
+
"avatar_url": "https://cdn-img.gitcode.com/fe/bd/f406eb600317d9bbb6a5c23042b49e5193dfbb7a63ee407f5bbfcbabcd177af1.jpg",
|
|
18
|
+
"html_url": "https://gitcode.com/zhu_chengcheng",
|
|
19
|
+
"assignee": true,
|
|
20
|
+
"code_owner": false,
|
|
21
|
+
"accept": false
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "67fdb69df01e3c566929edd4",
|
|
25
|
+
"login": "gcw_N7oHqLFR",
|
|
26
|
+
"name": "huang_jy",
|
|
27
|
+
"avatar_url": "",
|
|
28
|
+
"html_url": "https://gitcode.com/gcw_N7oHqLFR",
|
|
29
|
+
"assignee": true,
|
|
30
|
+
"code_owner": false,
|
|
31
|
+
"accept": false
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "67316e3733741160e6751351",
|
|
35
|
+
"login": "dingchengjie",
|
|
36
|
+
"name": "dingchengjie",
|
|
37
|
+
"avatar_url": "https://cdn-img.gitcode.com/fa/ed/6fa18810e4276d04d77bccf2f37c2287b44631cdcae7587fc4446f0bd79c2ed3.png",
|
|
38
|
+
"html_url": "https://gitcode.com/dingchengjie",
|
|
39
|
+
"assignee": true,
|
|
40
|
+
"code_owner": false,
|
|
41
|
+
"accept": true
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"testers": [
|
|
45
|
+
{
|
|
46
|
+
"id": "6541ccea82d8f837210e92c3",
|
|
47
|
+
"login": "openharmony_ci",
|
|
48
|
+
"name": "openharmony_ci",
|
|
49
|
+
"avatar_url": "https://cdn-img.gitcode.com/cb/be/5cb10620b4e9195576142df69cd44bb84df15d769c2a04eff5bf7324b903022c.png?time=1723462328974",
|
|
50
|
+
"html_url": "https://gitcode.com/openharmony_ci",
|
|
51
|
+
"assignee": false,
|
|
52
|
+
"code_owner": false,
|
|
53
|
+
"accept": true
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"approval_reviewers": [],
|
|
57
|
+
"labels": [
|
|
58
|
+
{
|
|
59
|
+
"id": 13244559,
|
|
60
|
+
"color": "#428BCA",
|
|
61
|
+
"name": "dco检查成功",
|
|
62
|
+
"repository_id": 4369237,
|
|
63
|
+
"created_at": "2026-06-30T15:50:00+08:00",
|
|
64
|
+
"updated_at": "2026-08-08T17:17:10+08:00"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": 13247621,
|
|
68
|
+
"color": "#428BCA",
|
|
69
|
+
"name": "编译成功",
|
|
70
|
+
"repository_id": 4369237,
|
|
71
|
+
"created_at": "2026-07-17T20:51:24+08:00",
|
|
72
|
+
"updated_at": "2026-08-08T17:54:08+08:00"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": 13247556,
|
|
76
|
+
"color": "#428BCA",
|
|
77
|
+
"name": "静态检查成功",
|
|
78
|
+
"repository_id": 4369237,
|
|
79
|
+
"created_at": "2026-07-17T00:04:25+08:00",
|
|
80
|
+
"updated_at": "2026-08-08T17:54:34+08:00"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"created_at": "2026-08-08T17:16:30+08:00",
|
|
84
|
+
"updated_at": "2026-08-08T18:13:02+08:00",
|
|
85
|
+
"closed_at": "2026-08-08T18:13:01+08:00",
|
|
86
|
+
"merged_at": "2026-08-08T18:13:01+08:00",
|
|
87
|
+
"merged_by": {
|
|
88
|
+
"id": "6541ccea82d8f837210e92c3",
|
|
89
|
+
"login": "openharmony_ci",
|
|
90
|
+
"name": "openharmony_ci",
|
|
91
|
+
"avatar_url": "https://cdn-img.gitcode.com/cb/be/5cb10620b4e9195576142df69cd44bb84df15d769c2a04eff5bf7324b903022c.png?time=1723462328974",
|
|
92
|
+
"html_url": "https://gitcode.com/openharmony_ci"
|
|
93
|
+
},
|
|
94
|
+
"draft": false,
|
|
95
|
+
"can_merge_check": true,
|
|
96
|
+
"prune_branch": false,
|
|
97
|
+
"mergeable": true,
|
|
98
|
+
"user": {
|
|
99
|
+
"id": "670a1fb90c1e065f07df63aa",
|
|
100
|
+
"login": "tyBrave_g",
|
|
101
|
+
"name": "tianyong",
|
|
102
|
+
"avatar_url": "https://cdn-img.gitcode.com/aa/fb/aaf89547be6c0ff62c24ad79d65921f8fcfc2fa84378ac4bde52c2d010fdcc00.png",
|
|
103
|
+
"html_url": "https://gitcode.com/tyBrave_g"
|
|
104
|
+
},
|
|
105
|
+
"head": {
|
|
106
|
+
"ref": "br_rnoh0.77",
|
|
107
|
+
"sha": "1fc307647a3c9e41673f8703942e11c1c0f58982",
|
|
108
|
+
"label": "br_rnoh0.77",
|
|
109
|
+
"repo": {
|
|
110
|
+
"path": "rntpc_react-native-SmartRefreshLayout",
|
|
111
|
+
"name": "rntpc_react-native-SmartRefreshLayout",
|
|
112
|
+
"namespace": {
|
|
113
|
+
"path": "tyBrave_g"
|
|
114
|
+
},
|
|
115
|
+
"full_name": "tyBrave_g/rntpc_react-native-SmartRefreshLayout",
|
|
116
|
+
"html_url": "https://gitcode.com/tyBrave_g/rntpc_react-native-SmartRefreshLayout.git"
|
|
117
|
+
},
|
|
118
|
+
"user": {
|
|
119
|
+
"id": "670a1fb90c1e065f07df63aa",
|
|
120
|
+
"login": "tyBrave_g",
|
|
121
|
+
"name": "tianyong",
|
|
122
|
+
"avatar_url": "https://cdn-img.gitcode.com/aa/fb/aaf89547be6c0ff62c24ad79d65921f8fcfc2fa84378ac4bde52c2d010fdcc00.png",
|
|
123
|
+
"html_url": "https://gitcode.com/tyBrave_g"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"base": {
|
|
127
|
+
"ref": "br_rnoh0.77",
|
|
128
|
+
"sha": "5ef9bed2a90e0460577f1dde115ecf52d6ce65b4",
|
|
129
|
+
"label": "br_rnoh0.77",
|
|
130
|
+
"repo": {
|
|
131
|
+
"path": "rntpc_react-native-SmartRefreshLayout",
|
|
132
|
+
"name": "rntpc_react-native-SmartRefreshLayout",
|
|
133
|
+
"namespace": {
|
|
134
|
+
"path": "CPF-RN"
|
|
135
|
+
},
|
|
136
|
+
"full_name": "CPF-RN/rntpc_react-native-SmartRefreshLayout",
|
|
137
|
+
"html_url": "https://gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout.git"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"mergeable_state": {
|
|
141
|
+
"merge_request_id": 9004982,
|
|
142
|
+
"state": true,
|
|
143
|
+
"status_without_user_auth": true,
|
|
144
|
+
"conflict_passed": true,
|
|
145
|
+
"branch_missing_passed": true,
|
|
146
|
+
"non_ff_passed": true,
|
|
147
|
+
"mr_state_passed": true,
|
|
148
|
+
"merged_by_user_passed": true,
|
|
149
|
+
"work_in_progress_passed": true,
|
|
150
|
+
"resolve_discussion_passed": true,
|
|
151
|
+
"ci_state_passed": true,
|
|
152
|
+
"merge_by_self_passed": true,
|
|
153
|
+
"can_force_merge": true,
|
|
154
|
+
"approval_reviewers_required_passed": true,
|
|
155
|
+
"approval_approvers_required_passed": true,
|
|
156
|
+
"approval_testers_required_passed": true,
|
|
157
|
+
"merge_request_switch": {
|
|
158
|
+
"review_mode": "approval",
|
|
159
|
+
"merge_method": "merge",
|
|
160
|
+
"only_allow_merge_if_all_discussions_are_resolved": true,
|
|
161
|
+
"disable_merge_by_self": true,
|
|
162
|
+
"only_allow_merge_if_pipeline_succeeds": false,
|
|
163
|
+
"disable_squash_merge": false,
|
|
164
|
+
"squash_merge_with_no_merge_commit": false,
|
|
165
|
+
"approval_required_reviewers_count": 0,
|
|
166
|
+
"approval_required_reviewers_branch": "*",
|
|
167
|
+
"add_notes_after_merged": true,
|
|
168
|
+
"mark_auto_merged_mr_as_closed": false,
|
|
169
|
+
"can_force_merge": true,
|
|
170
|
+
"can_reopen": true
|
|
171
|
+
},
|
|
172
|
+
"reason": {},
|
|
173
|
+
"check_tasks_num": 2,
|
|
174
|
+
"all_depend_merge_request_merged_passed": true,
|
|
175
|
+
"approval_approvers_result": 2,
|
|
176
|
+
"approval_testers_result": 2
|
|
177
|
+
},
|
|
178
|
+
"visibility_reason": "public",
|
|
179
|
+
"close_related_issue": true,
|
|
180
|
+
"squash_merge": false
|
|
181
|
+
},
|
|
182
|
+
"files": [
|
|
183
|
+
{
|
|
184
|
+
"sha": "1fc307647a3c9e41673f8703942e11c1c0f58982",
|
|
185
|
+
"filename": "harmony/smart_refresh_layout/src/main/cpp/PullToRefreshNode.cpp",
|
|
186
|
+
"additions": 1,
|
|
187
|
+
"deletions": 0,
|
|
188
|
+
"blob_id": "a825be2ce37006e4a8d221df70eee70360b8cdbd",
|
|
189
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/blob/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/PullToRefreshNode.cpp",
|
|
190
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/raw/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/PullToRefreshNode.cpp",
|
|
191
|
+
"patch": "@@ -26,6 +26,7 @@ namespace rnoh {\n refreshConfigurator{std::make_shared<PullToRefreshConfigurator>()}{}\n \n PullToRefreshNode::~PullToRefreshNode() {\n+ std::unique_lock<std::shared_mutex> lock(config_mutex_);\n refreshConfigurator = nullptr;\n }\n void PullToRefreshNode::setPullToRefreshNodeDelegate(PullToRefreshNodeDelegate *pullToRefreshNodeDelegate) {\n",
|
|
192
|
+
"target_branch": "br_rnoh0.77",
|
|
193
|
+
"source_branch": "br_rnoh0.77",
|
|
194
|
+
"source_project": {
|
|
195
|
+
"id": 10538787,
|
|
196
|
+
"full_name": "tyBrave_g/rntpc_react-native-SmartRefreshLayout",
|
|
197
|
+
"human_name": "tyBrave_g / rntpc_react-native-SmartRefreshLayout",
|
|
198
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
199
|
+
},
|
|
200
|
+
"target_project": {
|
|
201
|
+
"id": 4369237,
|
|
202
|
+
"full_name": "CPF-RN/rntpc_react-native-SmartRefreshLayout",
|
|
203
|
+
"human_name": "CPF-RN / rntpc_react-native-SmartRefreshLayout",
|
|
204
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"sha": "1fc307647a3c9e41673f8703942e11c1c0f58982",
|
|
209
|
+
"filename": "harmony/smart_refresh_layout/src/main/cpp/PullToRefreshNode.h",
|
|
210
|
+
"additions": 7,
|
|
211
|
+
"deletions": 4,
|
|
212
|
+
"blob_id": "091bffd31f763aae96611923c81e8c052e75ab17",
|
|
213
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/blob/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/PullToRefreshNode.h",
|
|
214
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/raw/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/PullToRefreshNode.h",
|
|
215
|
+
"patch": "@@ -43,7 +43,8 @@ protected:\n ArkUI_NodeHandle m_listArkUINodeHandle;\n PullToRefreshNodeDelegate *m_pullToRefreshNodeDelegate;\n std::shared_ptr<PullToRefreshConfigurator> refreshConfigurator;\n-\n+ std::shared_mutex config_mutex_;\n+ \n public:\n PullToRefreshNode();\n ~PullToRefreshNode() override;\n@@ -59,9 +60,11 @@ public:\n void setMaxTranslate(float maxHeight);\n void setHeaderBackgroundColor(facebook::react::SharedColor const &color);\n \n- std::shared_ptr<PullToRefreshConfigurator> getPullToRefreshConfigurator() {\n- CHECK(refreshConfigurator != nullptr) \n- << \"[PullToRefreshNode] refreshConfigurator is null!\";\n+ std::shared_ptr<PullToRefreshConfigurator> getPullToRefreshConfigurator() {\n+ std::shared_lock<std::shared_mutex> lock(config_mutex_);\n+ if (!refreshConfigurator) {\n+ LOG(ERROR)<<\"[PullToRefreshNode] getPullToRefreshConfigurator refreshConfigurator is null!\";\n+ }\n return refreshConfigurator;\n }\n void onNodeEvent(ArkUI_NodeEventType eventType, EventArgs &eventArgs) override;\n",
|
|
216
|
+
"target_branch": "br_rnoh0.77",
|
|
217
|
+
"source_branch": "br_rnoh0.77",
|
|
218
|
+
"source_project": {
|
|
219
|
+
"id": 10538787,
|
|
220
|
+
"full_name": "tyBrave_g/rntpc_react-native-SmartRefreshLayout",
|
|
221
|
+
"human_name": "tyBrave_g / rntpc_react-native-SmartRefreshLayout",
|
|
222
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
223
|
+
},
|
|
224
|
+
"target_project": {
|
|
225
|
+
"id": 4369237,
|
|
226
|
+
"full_name": "CPF-RN/rntpc_react-native-SmartRefreshLayout",
|
|
227
|
+
"human_name": "CPF-RN / rntpc_react-native-SmartRefreshLayout",
|
|
228
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"sha": "1fc307647a3c9e41673f8703942e11c1c0f58982",
|
|
233
|
+
"filename": "harmony/smart_refresh_layout/src/main/cpp/RNCMaterialHeaderComponentInstance.cpp",
|
|
234
|
+
"additions": 11,
|
|
235
|
+
"deletions": 6,
|
|
236
|
+
"blob_id": "33198b9ff388654009abdcafb82e92d336968344",
|
|
237
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/blob/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/RNCMaterialHeaderComponentInstance.cpp",
|
|
238
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/raw/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/RNCMaterialHeaderComponentInstance.cpp",
|
|
239
|
+
"patch": "@@ -88,22 +88,27 @@ namespace rnoh {\n void RNCMaterialHeaderComponentInstance::setScaleAnimate(int32_t dur) {\n \n TaskCommonThread *task = new TaskCommonThread();\n- task->setTaskParams(static_cast<std::chrono::milliseconds>(dur), [this](double v) {\n- scaleSize = 1.0 - static_cast<float>(v);\n- auto instance = std::static_pointer_cast<RNInstanceInternal>(m_deps->rnInstance.lock());\n+ auto self = shared_from_this(); \n+ task->setTaskParams(static_cast<std::chrono::milliseconds>(dur), [self](double v) {\n+ if (!self) return;\n+ auto ptrValue = std::static_pointer_cast<RNCMaterialHeaderComponentInstance>(self);\n+ if (!ptrValue) return;\n+ ptrValue->scaleSize = 1.0 - static_cast<float>(v);\n+ auto instance = std::static_pointer_cast<RNInstanceInternal>(ptrValue->m_deps->rnInstance.lock());\n if (!instance) {\n return;\n }\n instance->getTaskExecutor()->runTask(\n- TaskThread::MAIN, [wptr = this->weak_from_this(), wInstance = instance->weak_from_this()] {\n- auto ptr = std::static_pointer_cast<RNCMaterialHeaderComponentInstance>(wptr.lock());\n+ TaskThread::MAIN, [wptr = ptrValue] {\n+ auto ptr = std::static_pointer_cast<RNCMaterialHeaderComponentInstance>(wptr);\n if (ptr) {\n+ double count_001 = 0.01;\n float value = ptr->scaleSize;\n ArkUI_NumberValue scaleArray[] = {{.f32 = value}, {.f32 = value}};\n ArkUI_AttributeItem scaleValue[] = {scaleArray, 2};\n NativeNodeApi::getInstance()->setAttribute(ptr->imageStack.getArkUINodeHandle(), NODE_SCALE,\n scaleValue);\n- if (std::abs(value - 0.01) < 1e-6) {\n+ if (std::abs(value - count_001) < 1e-6) {\n ArkUI_NumberValue scaleArray[] = {{.f32 = 1.0}, {.f32 = 1.0}};\n ArkUI_AttributeItem scaleValue[] = {scaleArray, 2};\n NativeNodeApi::getInstance()->setAttribute(ptr->imageStack.getArkUINodeHandle(), NODE_SCALE,\n",
|
|
240
|
+
"target_branch": "br_rnoh0.77",
|
|
241
|
+
"source_branch": "br_rnoh0.77",
|
|
242
|
+
"source_project": {
|
|
243
|
+
"id": 10538787,
|
|
244
|
+
"full_name": "tyBrave_g/rntpc_react-native-SmartRefreshLayout",
|
|
245
|
+
"human_name": "tyBrave_g / rntpc_react-native-SmartRefreshLayout",
|
|
246
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
247
|
+
},
|
|
248
|
+
"target_project": {
|
|
249
|
+
"id": 4369237,
|
|
250
|
+
"full_name": "CPF-RN/rntpc_react-native-SmartRefreshLayout",
|
|
251
|
+
"human_name": "CPF-RN / rntpc_react-native-SmartRefreshLayout",
|
|
252
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"sha": "1fc307647a3c9e41673f8703942e11c1c0f58982",
|
|
257
|
+
"filename": "harmony/smart_refresh_layout/src/main/cpp/RNCStoreHouseHeaderNode.cpp",
|
|
258
|
+
"additions": 1,
|
|
259
|
+
"deletions": 1,
|
|
260
|
+
"blob_id": "c4fd68b09a2623f7bce3da320b6ec3a622b7d885",
|
|
261
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/blob/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/RNCStoreHouseHeaderNode.cpp",
|
|
262
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/raw/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/RNCStoreHouseHeaderNode.cpp",
|
|
263
|
+
"patch": "@@ -165,7 +165,7 @@ void RNCStoreHouseHeaderNode::OnDraw(ArkUI_NodeCustomEvent *event) {\n if (progress <= startPadding) {\n realProgress = 0;\n } else {\n- realProgress = std::min(1, (int)((progress - startPadding) / mInternalAnimationFactor));\n+ realProgress = std::min(1, static_cast<int>((progress - startPadding) / mInternalAnimationFactor));\n }\n offsetX += storeHouseBarItem->translationX * (1 - realProgress);\n offsetY += -mDropHeight * (1 - realProgress);\n",
|
|
264
|
+
"target_branch": "br_rnoh0.77",
|
|
265
|
+
"source_branch": "br_rnoh0.77",
|
|
266
|
+
"source_project": {
|
|
267
|
+
"id": 10538787,
|
|
268
|
+
"full_name": "tyBrave_g/rntpc_react-native-SmartRefreshLayout",
|
|
269
|
+
"human_name": "tyBrave_g / rntpc_react-native-SmartRefreshLayout",
|
|
270
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
271
|
+
},
|
|
272
|
+
"target_project": {
|
|
273
|
+
"id": 4369237,
|
|
274
|
+
"full_name": "CPF-RN/rntpc_react-native-SmartRefreshLayout",
|
|
275
|
+
"human_name": "CPF-RN / rntpc_react-native-SmartRefreshLayout",
|
|
276
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"sha": "1fc307647a3c9e41673f8703942e11c1c0f58982",
|
|
281
|
+
"filename": "harmony/smart_refresh_layout/src/main/cpp/SmartRefreshLayoutComponentInstance.cpp",
|
|
282
|
+
"additions": 27,
|
|
283
|
+
"deletions": 18,
|
|
284
|
+
"blob_id": "22f64bceff0d163b8edf8a2a5dfcdc25c25a4b06",
|
|
285
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/blob/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/SmartRefreshLayoutComponentInstance.cpp",
|
|
286
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/raw/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/SmartRefreshLayoutComponentInstance.cpp",
|
|
287
|
+
"patch": "@@ -73,24 +73,29 @@ void SmartRefreshLayoutComponentInstance::onAppArea() {\n panGesture(m_pullToRefreshNode.getArkUINodeHandle());\n if (this->autoRefresh.refresh) {\n int32_t delayTime = (int32_t)autoRefresh.time;\n+ const int count_2 = 2;\n if (delayTime > 0) {\n TaskProcessor *taskProcessor = new TaskProcessor();\n- taskProcessor->startDelayTask(static_cast<std::chrono::milliseconds>(delayTime), [this]() {\n- auto instance = std::static_pointer_cast<RNInstanceInternal>(m_deps->rnInstance.lock());\n+ auto self = shared_from_this(); \n+ taskProcessor->startDelayTask(static_cast<std::chrono::milliseconds>(delayTime), [self]() {\n+ if (!self) return;\n+ auto ptrValue = std::static_pointer_cast<SmartRefreshLayoutComponentInstance>(self);\n+ if (!ptrValue) return;\n+ auto instance = std::static_pointer_cast<RNInstanceInternal>(ptrValue->m_deps->rnInstance.lock());\n if (!instance) {\n return;\n }\n instance->getTaskExecutor()->runTask(\n- TaskThread::MAIN, [wptr = this->shared_from_this(), wInstance = instance->weak_from_this()] {\n+ TaskThread::MAIN, [wptr = ptrValue, wInstance = instance->weak_from_this()] {\n auto ptr = std::static_pointer_cast<SmartRefreshLayoutComponentInstance>(wptr);\n if (ptr) {\n- ptr->trYTop = ptr->headerHeight * 2;\n+ ptr->trYTop = ptr->headerHeight * count_2;\n ptr->onActionEnd();\n }\n });\n });\n } else {\n- this->trYTop = this->headerHeight * 2;\n+ this->trYTop = this->headerHeight * count_2;\n this->onActionEnd();\n }\n }\n@@ -279,15 +284,19 @@ void SmartRefreshLayoutComponentInstance::closeRefresh(float start, float target\n if (animation == nullptr) {\n animation = std::make_shared<Animation>();\n }\n+ auto self = shared_from_this(); \n animation->SetAnimationParams(\n- static_cast<std::chrono::milliseconds>(duration), start, target, [this, &target](double value) {\n- trYTop = value < 0 ? 0 : value;\n- auto instance = std::static_pointer_cast<RNInstanceInternal>(m_deps->rnInstance.lock());\n+ static_cast<std::chrono::milliseconds>(duration), start, target, [self, target](double value) {\n+ if (!self) return;\n+ auto ptrValue = std::static_pointer_cast<SmartRefreshLayoutComponentInstance>(self);\n+ if (!ptrValue) return;\n+ ptrValue->trYTop = value < 0 ? 0 : value;\n+ auto instance = std::static_pointer_cast<RNInstanceInternal>(ptrValue->m_deps->rnInstance.lock());\n if (!instance) {\n return;\n }\n instance->getTaskExecutor()->runTask(\n- TaskThread::MAIN, [wptr = this->shared_from_this(), wInstance = instance->weak_from_this()] {\n+ TaskThread::MAIN, [wptr = ptrValue] {\n auto ptr = std::static_pointer_cast<SmartRefreshLayoutComponentInstance>(wptr);\n if (ptr) {\n ptr->setPullHeaderHeight(ptr->trYTop);\n@@ -310,7 +319,12 @@ void SmartRefreshLayoutComponentInstance::closeRefresh(float start, float target\n void SmartRefreshLayoutComponentInstance::finishRefresh() {\n state = IS_REFRESHED;\n changeStatus();\n- closeRefresh(trYTop, 0, m_pullToRefreshNode.getPullToRefreshConfigurator()->getAnimDuration());\n+ uint32_t duration = 150;\n+ auto config = m_pullToRefreshNode.getPullToRefreshConfigurator();\n+ if (config){\n+ duration = config->getAnimDuration();\n+ }\n+ closeRefresh(trYTop, 0, duration);\n }\n \n bool SmartRefreshLayoutComponentInstance::isComponentTop() {\n@@ -469,14 +483,9 @@ void SmartRefreshLayoutComponentInstance::handleCommand(std::string const &comma\n if (commandName == \"finishRefresh\" && args.isArray() && args.size() == 2) {\n auto delayed = args[0];\n auto success = args[1];\n- if (delayed != INFINITY) {\n- if (delayed >= 0) {\n- m_pullToRefreshNode.getPullToRefreshConfigurator()->setFinishDelay(delayed.asInt());\n- } else {\n- m_pullToRefreshNode.getPullToRefreshConfigurator()->setFinishDelay(0);\n- }\n- } else {\n- m_pullToRefreshNode.getPullToRefreshConfigurator()->setFinishDelay(500);\n+ auto config = m_pullToRefreshNode.getPullToRefreshConfigurator();\n+ if (config) {\n+ config->setFinishDelay(delayed != INFINITY ? delayed >= 0 ? delayed.asInt() : 0 : 500);\n }\n finishRefresh();\n }\n",
|
|
288
|
+
"target_branch": "br_rnoh0.77",
|
|
289
|
+
"source_branch": "br_rnoh0.77",
|
|
290
|
+
"source_project": {
|
|
291
|
+
"id": 10538787,
|
|
292
|
+
"full_name": "tyBrave_g/rntpc_react-native-SmartRefreshLayout",
|
|
293
|
+
"human_name": "tyBrave_g / rntpc_react-native-SmartRefreshLayout",
|
|
294
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
295
|
+
},
|
|
296
|
+
"target_project": {
|
|
297
|
+
"id": 4369237,
|
|
298
|
+
"full_name": "CPF-RN/rntpc_react-native-SmartRefreshLayout",
|
|
299
|
+
"human_name": "CPF-RN / rntpc_react-native-SmartRefreshLayout",
|
|
300
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"sha": "1fc307647a3c9e41673f8703942e11c1c0f58982",
|
|
305
|
+
"filename": "harmony/smart_refresh_layout/src/main/cpp/conversions.h",
|
|
306
|
+
"additions": 68,
|
|
307
|
+
"deletions": 64,
|
|
308
|
+
"blob_id": "506cd3cddf2a541cbf192e01cb474142ea0e9dde",
|
|
309
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/blob/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/conversions.h",
|
|
310
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-SmartRefreshLayout/raw/1fc307647a3c9e41673f8703942e11c1c0f58982/harmony/smart_refresh_layout/src/main/cpp/conversions.h",
|
|
311
|
+
"patch": "@@ -28,85 +28,89 @@ namespace react {\n inline void fromRawValue(\n const PropsParserContext &context,\n const RawValue &value,\n- ScrollViewSnapToAlignment &result) {\n- auto string = (std::string)value;\n- if (string == \"start\") {\n- result = ScrollViewSnapToAlignment::Start;\n- return;\n- }\n- if (string == \"center\") {\n- result = ScrollViewSnapToAlignment::Center;\n- return;\n- }\n- if (string == \"end\") {\n- result = ScrollViewSnapToAlignment::End;\n- return;\n- }\n- abort();\n+ ScrollViewSnapToAlignment &result)\n+{\n+ auto string = (std::string)value;\n+ if (string == \"start\") {\n+ result = ScrollViewSnapToAlignment::Start;\n+ return;\n+ }\n+ if (string == \"center\") {\n+ result = ScrollViewSnapToAlignment::Center;\n+ return;\n+ }\n+ if (string == \"end\") {\n+ result = ScrollViewSnapToAlignment::End;\n+ return;\n+ }\n+ throw std::runtime_error(\"Invalid value\");\n }\n \n inline void fromRawValue(\n const PropsParserContext &context,\n const RawValue &value,\n- ScrollViewIndicatorStyle &result) {\n- auto string = (std::string)value;\n- if (string == \"default\") {\n- result = ScrollViewIndicatorStyle::Default;\n- return;\n- }\n- if (string == \"black\") {\n- result = ScrollViewIndicatorStyle::Black;\n- return;\n- }\n- if (string == \"white\") {\n- result = ScrollViewIndicatorStyle::White;\n- return;\n- }\n- abort();\n+ ScrollViewIndicatorStyle &result)\n+{\n+ auto string = (std::string)value;\n+ if (string == \"default\") {\n+ result = ScrollViewIndicatorStyle::Default;\n+ return;\n+ }\n+ if (string == \"black\") {\n+ result = ScrollViewIndicatorStyle::Black;\n+ return;\n+ }\n+ if (string == \"white\") {\n+ result = ScrollViewIndicatorStyle::White;\n+ return;\n+ }\n+ throw std::runtime_error(\"Invalid value\");\n }\n \n inline void fromRawValue(\n const PropsParserContext &context,\n const RawValue &value,\n- ScrollViewKeyboardDismissMode &result) {\n- auto string = (std::string)value;\n- if (string == \"none\") {\n- result = ScrollViewKeyboardDismissMode::None;\n- return;\n- }\n- if (string == \"on-drag\") {\n- result = ScrollViewKeyboardDismissMode::OnDrag;\n- return;\n- }\n- if (string == \"interactive\") {\n- result = ScrollViewKeyboardDismissMode::Interactive;\n- return;\n- }\n- abort();\n+ ScrollViewKeyboardDismissMode &result)\n+{\n+ auto string = (std::string)value;\n+ if (string == \"none\") {\n+ result = ScrollViewKeyboardDismissMode::None;\n+ return;\n+ }\n+ if (string == \"on-drag\") {\n+ result = ScrollViewKeyboardDismissMode::OnDrag;\n+ return;\n+ }\n+ if (string == \"interactive\") {\n+ result = ScrollViewKeyboardDismissMode::Interactive;\n+ return;\n+ }\n+ throw std::runtime_error(\"Invalid value\");\n }\n \n inline void fromRawValue(\n const PropsParserContext &context,\n const RawValue &value,\n- ContentInsetAdjustmentBehavior &result) {\n- auto string = (std::string)value;\n- if (string == \"never\") {\n- result = ContentInsetAdjustmentBehavior::Never;\n- return;\n- }\n- if (string == \"automatic\") {\n- result = ContentInsetAdjustmentBehavior::Automatic;\n- return;\n- }\n- if (string == \"scrollableAxes\") {\n- result = ContentInsetAdjustmentBehavior::ScrollableAxes;\n- return;\n- }\n- if (string == \"always\") {\n- result = ContentInsetAdjustmentBehavior::Always;\n- return;\n- }\n- abort();\n+ ContentInsetAdjustmentBehavior &result)\n+{\n+ auto string = (std::string)value;\n+ if (string == \"never\") {\n+ result = ContentInsetAdjustmentBehavior::Never;\n+ return;\n+ }\n+ if (string == \"automatic\") {\n+ result = ContentInsetAdjustmentBehavior::Automatic;\n+ return;\n+ }\n+ if (string == \"scrollableAxes\") {\n+ result = ContentInsetAdjustmentBehavior::ScrollableAxes;\n+ return;\n+ }\n+ if (string == \"always\") {\n+ result = ContentInsetAdjustmentBehavior::Always;\n+ return;\n+ }\n+ throw std::runtime_error(\"Invalid value\");\n }\n \n inline void fromRawValue(\n",
|
|
312
|
+
"target_branch": "br_rnoh0.77",
|
|
313
|
+
"source_branch": "br_rnoh0.77",
|
|
314
|
+
"source_project": {
|
|
315
|
+
"id": 10538787,
|
|
316
|
+
"full_name": "tyBrave_g/rntpc_react-native-SmartRefreshLayout",
|
|
317
|
+
"human_name": "tyBrave_g / rntpc_react-native-SmartRefreshLayout",
|
|
318
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
319
|
+
},
|
|
320
|
+
"target_project": {
|
|
321
|
+
"id": 4369237,
|
|
322
|
+
"full_name": "CPF-RN/rntpc_react-native-SmartRefreshLayout",
|
|
323
|
+
"human_name": "CPF-RN / rntpc_react-native-SmartRefreshLayout",
|
|
324
|
+
"path": "rntpc_react-native-SmartRefreshLayout"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
}
|