LuckSiege / LuckSiege/PictureSelector
压缩完成时调用call.onCallback()函数的第一个参数问题
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 13.6k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Current use version?
#### 当前使用的版本是多少?
```
3.11.2;Android 14
```
## Will this problem occur in demo?
#### Demo能否复现这问题?
```
可以
```
## Describe the problem or provide an error log?
在执行压缩后,调用onCallback时,第一个参数不能用uri.getPath(),否则内部“LocalMedia media = queue.get(srcPath)”为null。需要用 uri.toString()。
```
setCompressEngine(CompressFileEngine { context, source, call ->
source.forEach { uri ->
// 压缩逻辑。。。忽略
/* 在调用onCallback时,第一个参数不能用uri.getPath(),否则内部“LocalMedia media = queue.get(srcPath)”为null。需要用
uri.toString()。*/
call?.onCallback(it.toString(), compressFile.absolutePath)
}
})
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the compression callback behavior in the demo using PictureSelector 3.11.2 on Android 14. Trace the path from call.onCallback() to the internal queue.get(srcPath) lookup, comparing uri.getPath() with uri.toString(). Done means the callback resolves the queued LocalMedia entry with the documented URI form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100