feat: opt attachment preview

This commit is contained in:
2026-01-10 17:50:29 +08:00
parent f19b0d7c68
commit fa6e5f01b4
2 changed files with 6 additions and 1 deletions

View File

@@ -79,6 +79,9 @@ class IntExpMoveActivity : BaseBindingActivity<ActivityIntExpMoveBinding, IntExp
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) { FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh() viewModel.refresh()
} }
// 初始加载数据
viewModel.refresh()
} }
/** /**

View File

@@ -150,7 +150,9 @@ class GjcInspectionDetailsViewModel : BaseViewModel() {
attach.name.endsWith(".png", true) || attach.name.endsWith(".png", true) ||
attach.name.endsWith(".jpeg", true) -> { attach.name.endsWith(".jpeg", true) -> {
val fileBean = FileBean( val fileBean = FileBean(
url = MediaUtil.fillUrl(attach.path), // url = MediaUtil.fillUrl(attach.path),
// 服务器返回全url无需本地组装
url = attach.path,
originalPic = attach.path originalPic = attach.path
) )
PreviewActivity.start(getTopActivity(), listOf(fileBean)) PreviewActivity.start(getTopActivity(), listOf(fileBean))