V3 详情页右上角菜单补全:加载原图 / 画质增强 / 智能抠图,动图统一隐藏 AI 项 - #995
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
FragmentIllust/ImageDetailActivity)这三个功能链路完整,本次照抄经典实现落地到 V3,并顺手统一了动图(ugoira)的入口展示。改动内容
1. 加载原图(V3)
ArtworkV3ViewModel新增forceOriginalPreview开关,跨旋转/视图重建保留。isForceOriginal=true重建,rebindTick触发外层 FeedAdapter 原地重绑,图片从 large 切到 original。2. 画质增强 / 智能抠图(V3)
fragment_artwork_v3.xml复用经典的view_ai_upscale_overlay覆盖层(全屏进度遮罩 + 完成态按钮),零新增 UI 逻辑。ModelPickerDialog/RembgModelPickerDialog→IllustAiHelper.performUpscale/performRembg,修复原空壳回调。onViewCreated调用restoreUpscaleIfRunning,旋转后恢复进行中的画质增强任务。3. 动图(ugoira)统一隐藏
ugoira 的 original 是 zip,加载原图 / 画质增强 / 抠图都无法处理,因此 V3 与经典一致对动图隐藏这三项:
if (!illust.isGif)内。FragmentIllust:inflate 菜单后隐藏action_show_original、action_ai_upscale、action_ai_rembg。ImageDetailActivity:AI 弹窗按作品类型组装菜单,动图不再出现画质增强/智能抠图(剩余项索引自动对齐,不依赖魔法序号)。涉及文件
app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.ktapp/src/main/java/ceui/pixiv/ui/detail/ArtworkV3ViewModel.ktapp/src/main/res/layout/fragment_artwork_v3.xmlapp/src/main/java/ceui/lisa/fragments/FragmentIllust.ktapp/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt提交
a6985140dfeat(detail): V3 详情页右上角菜单补上「加载原图」,重建 adapter 强制原图分辨率d78c2813afeat(detail): V3 详情页落地画质增强与智能抠图,动图不显示 AI 项(经典同步)b4727f234fix(detail): 经典详情页动图(ugoira)不再显示「加载原图」,对齐 V3测试情况