依旧尝试修复测量问题
This commit is contained in:
+25
-36
@@ -95,11 +95,18 @@ jobs:
|
||||
sed "/def version/c def version = \"${{ env.VERSION }}\"" $GITHUB_WORKSPACE/app/build.gradle -i
|
||||
echo "开始${{ env.product }}${{ env.type }}构建"
|
||||
chmod +x gradlew
|
||||
./gradlew assemble${{ env.product }}release --build-cache --parallel --daemon --warning-mode all
|
||||
./gradlew assemble${{ env.product }}Release
|
||||
echo "修改APK文件名"
|
||||
mkdir -p ${{ github.workspace }}/apk/
|
||||
for file in `ls ${{ github.workspace }}/app/build/outputs/apk/*/*/*.apk`; do
|
||||
mv "$file" ${{ github.workspace }}/apk/legado_${{ env.product }}_${{ env.VERSIONL }}_${{ env.type }}.apk
|
||||
for file in ${{ github.workspace }}/app/build/outputs/apk/*/*-release.apk; do
|
||||
filename=$(basename "$file")
|
||||
if [[ "$filename" == *"armeabi-v7a"* ]]; then
|
||||
mv "$file" ${{ github.workspace }}/apk/legado_${{ env.product }}_${{ env.VERSIONL }}_${{ env.type }}_32.apk
|
||||
elif [[ "$filename" == *"arm64-v8a"* ]]; then
|
||||
mv "$file" ${{ github.workspace }}/apk/legado_${{ env.product }}_${{ env.VERSIONL }}_${{ env.type }}_64.apk
|
||||
elif [[ "$filename" == *"universal"* ]]; then
|
||||
mv "$file" ${{ github.workspace }}/apk/legado_${{ env.product }}_${{ env.VERSIONL }}_${{ env.type }}_universal.apk
|
||||
fi
|
||||
done
|
||||
echo "移动mapping文件"
|
||||
mkdir -p ${{ github.workspace }}/mapping/
|
||||
@@ -134,12 +141,23 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload App To Artifact
|
||||
- name: Upload 32-bit APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: legado.${{ env.product }}.${{ env.type }}
|
||||
if-no-files-found: ignore
|
||||
path: ${{ github.workspace }}/apk/*.apk
|
||||
name: legado.${{ env.product }}.${{ env.type }}.apk.32
|
||||
path: ${{ github.workspace }}/apk/*_32.apk
|
||||
|
||||
- name: Upload 64-bit APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: legado.${{ env.product }}.${{ env.type }}.apk.64
|
||||
path: ${{ github.workspace }}/apk/*_64.apk
|
||||
|
||||
- name: Upload Universal APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: legado.${{ env.product }}.${{ env.type }}.apk.universal
|
||||
path: ${{ github.workspace }}/apk/*_universal.apk
|
||||
|
||||
- name: Upload Mapping File To Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -148,35 +166,6 @@ jobs:
|
||||
if-no-files-found: ignore
|
||||
path: ${{ github.workspace }}/mapping/mapping.txt
|
||||
|
||||
prerelease:
|
||||
needs: [ prepare, build ]
|
||||
if: github.event_name != 'pull_request' && github.repository == 'HapeLee/legado-with-MD3'
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
VERSION: ${{ needs.prepare.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/download-artifact@v5
|
||||
with:
|
||||
path: apk/
|
||||
|
||||
- name: Delete Pre-Release
|
||||
run: |
|
||||
if gh release view beta &>/dev/null; then
|
||||
gh release delete beta -y
|
||||
fi
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Publish Pre-Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
name: legado_app_${{ env.VERSION }}
|
||||
tag: "beta"
|
||||
body: "此版本为测试版,签名与正式版不同,可能存在不稳定情况,升级前请务必备份好数据。"
|
||||
prerelease: true
|
||||
artifacts: ${{ github.workspace }}/apk/*.apk
|
||||
|
||||
lanzou:
|
||||
needs: [ prepare, build ]
|
||||
if: ${{ github.event_name != 'pull_request' && needs.prepare.outputs.lanzou == 'yes' }}
|
||||
|
||||
@@ -310,7 +310,13 @@ class ReadBookActivity : BaseReadBookActivity(),
|
||||
if (getPrefBoolean("disableReturnKey") && !menuLayoutIsVisible) {
|
||||
return@addCallback
|
||||
}
|
||||
supportFinishAfterTransition()
|
||||
if (savedInstanceState != null) {
|
||||
finish()
|
||||
} else {
|
||||
supportFinishAfterTransition()
|
||||
}
|
||||
//TODO: 有关测量相关问题
|
||||
//孩子们,我的水平不够,只能这样修复测量问题了
|
||||
}
|
||||
}
|
||||
|
||||
@@ -441,7 +447,6 @@ class ReadBookActivity : BaseReadBookActivity(),
|
||||
viewModel.initReadBookConfig(intent)
|
||||
viewModel.initData(intent)
|
||||
withContext(Main) {
|
||||
binding.readView.initAfterTransition()
|
||||
justInitData = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
|
||||
if (!isMainView) return
|
||||
ChapterProvider.upViewSize(w, h)
|
||||
textPage.format()
|
||||
//TODO: 有关测量相关问题
|
||||
}
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
|
||||
@@ -119,19 +119,13 @@ class ReadView(context: Context, attrs: AttributeSet) :
|
||||
nextPage.invisible()
|
||||
curPage.markAsMainView()
|
||||
if (!isInEditMode) {
|
||||
//upBg()
|
||||
upBg()
|
||||
setWillNotDraw(false)
|
||||
//upPageAnim()
|
||||
//upPageSlopSquare()
|
||||
upPageAnim()
|
||||
upPageSlopSquare()
|
||||
}
|
||||
}
|
||||
|
||||
fun initAfterTransition() {
|
||||
upBg()
|
||||
upPageAnim()
|
||||
upPageSlopSquare()
|
||||
}
|
||||
|
||||
private fun setRect9x() {
|
||||
tlRect.set(0f, 0f, width * 0.33f, height * 0.33f)
|
||||
tcRect.set(width * 0.33f, 0f, width * 0.66f, height * 0.33f)
|
||||
|
||||
@@ -33,7 +33,6 @@ import io.legato.kazusa.utils.postEvent
|
||||
import io.legato.kazusa.utils.spToPx
|
||||
import io.legato.kazusa.utils.splitNotBlank
|
||||
import io.legato.kazusa.utils.textHeight
|
||||
import io.legato.kazusa.utils.toastOnUi
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import splitties.init.appCtx
|
||||
import java.io.File
|
||||
@@ -1020,13 +1019,6 @@ object ChapterProvider {
|
||||
return
|
||||
}
|
||||
|
||||
visibleRect.set(
|
||||
paddingLeft.toFloat(),
|
||||
paddingTop.toFloat(),
|
||||
visibleRight.toFloat(),
|
||||
visibleBottom.toFloat()
|
||||
)
|
||||
|
||||
paddingLeft = ReadBookConfig.paddingLeft.dpToPx()
|
||||
paddingTop = ReadBookConfig.paddingTop.dpToPx()
|
||||
paddingRight = ReadBookConfig.paddingRight.dpToPx()
|
||||
@@ -1041,23 +1033,13 @@ object ChapterProvider {
|
||||
visibleRight = viewWidth - paddingRight
|
||||
visibleBottom = paddingTop + visibleHeight
|
||||
|
||||
if (paddingLeft >= visibleRight || paddingTop >= visibleBottom) {
|
||||
appCtx.toastOnUi("边距设置过大,请重新设置")
|
||||
visibleRect.set(
|
||||
0f,
|
||||
0f,
|
||||
viewWidth.toFloat(),
|
||||
viewHeight.toFloat()
|
||||
)
|
||||
} else {
|
||||
visibleRect.set(
|
||||
paddingLeft.toFloat(),
|
||||
paddingTop.toFloat(),
|
||||
visibleRight.toFloat(),
|
||||
visibleBottom.toFloat()
|
||||
)
|
||||
}
|
||||
|
||||
visibleRect.set(
|
||||
paddingLeft.toFloat(),
|
||||
paddingTop.toFloat(),
|
||||
visibleRight.toFloat(),
|
||||
visibleBottom.toFloat()
|
||||
)
|
||||
//TODO: 有关测量相关问题
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user